diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json index b3afee5824320..43617f00c182c 100644 --- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json +++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json @@ -605,6 +605,34 @@ "new": "parameter com.azure.resourcemanager.appservice.models.FunctionsScaleAndConcurrencyTriggersHttp com.azure.resourcemanager.appservice.models.FunctionsScaleAndConcurrencyTriggersHttp::withPerInstanceConcurrency(===java.lang.Integer===)", "parameterIndex": "0", "justification": "Service bug fix." + }, + { + "ignore": true, + "code": "java.class.nowFinal", + "old": "class com.azure.resourcemanager.sql.models.DatabaseIdentity", + "new": "class com.azure.resourcemanager.sql.models.DatabaseIdentity", + "justification": "Customer unlikely to subclass this class." + }, + { + "ignore": true, + "code": "java.class.nowFinal", + "old": "class com.azure.resourcemanager.sql.models.DatabaseUserIdentity", + "new": "class com.azure.resourcemanager.sql.models.DatabaseUserIdentity", + "justification": "Customer unlikely to subclass this class." + }, + { + "ignore": true, + "code": "java.class.nowFinal", + "old": "class com.azure.resourcemanager.sql.models.ResourceIdentity", + "new": "class com.azure.resourcemanager.sql.models.ResourceIdentity", + "justification": "Customer unlikely to subclass this class." + }, + { + "ignore": true, + "code": "java.class.nowFinal", + "old": "class com.azure.resourcemanager.sql.models.UserIdentity", + "new": "class com.azure.resourcemanager.sql.models.UserIdentity", + "justification": "Customer unlikely to subclass this class." } ] } diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 0d7f582da4dd8..d7bd0ab6bb801 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -251,7 +251,7 @@ "dir": "azure-resourcemanager-sql", "source": "specification/sql/resource-manager/readme.md", "package": "com.azure.resourcemanager.sql", - "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication=true --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState --stream-style-serialization=false", + "args": "--tag=package-2021-11 --modelerfour.lenient-model-deduplication=true --rename-model=SecurityAlertsPolicyState:SecurityAlertPolicyState", "note": "Add '\"x-ms-long-running-operation\": true' to TransparentDataEncryptions_CreateOrUpdate in specs file TransparentDataEncryptions.json" }, "storage": { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java index 86e1d77e00088..567e489a6575e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java @@ -25,9 +25,9 @@ public interface BackupShortTermRetentionPoliciesClient { /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,14 +36,14 @@ public interface BackupShortTermRetentionPoliciesClient { * @return a database's short term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,14 +52,14 @@ PagedFlux listByDatabaseAsync( * @return a database's short term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -69,32 +69,32 @@ PagedIterable listByDatabase( * @return a database's short term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's short term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's short term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ShortTermRetentionPolicyName policyName); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -104,14 +104,14 @@ Mono> getWithResponseAsync( * @return a database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -122,18 +122,14 @@ Mono getAsync( * @return a database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, Context context); /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -143,14 +139,14 @@ Response getWithResponse( * @return a database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupShortTermRetentionPolicyInner get( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName); + BackupShortTermRetentionPolicyInner get(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -161,18 +157,14 @@ BackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -184,18 +176,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -207,18 +195,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -231,19 +215,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -254,18 +233,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -276,18 +251,14 @@ Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -299,19 +270,14 @@ BackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context); + BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -322,18 +288,14 @@ BackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -345,17 +307,14 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, BackupShortTermRetentionPolicyInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -367,17 +326,14 @@ PollerFlux, BackupShortTermReten */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -390,18 +346,14 @@ SyncPoller, BackupShortTermReten */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context); + String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, + BackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -412,18 +364,14 @@ SyncPoller, BackupShortTermReten * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -434,18 +382,14 @@ Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters); + BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters); /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -457,11 +401,6 @@ BackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context); + BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java index d82eb32a43948..3adb52ec45906 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java @@ -12,39 +12,41 @@ import com.azure.resourcemanager.sql.models.CapabilityGroup; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ public interface CapabilitiesClient { /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @param include If specified, restricts the response to only include the selected item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the subscription capabilities available for the specified location along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listByLocationWithResponseAsync( - String locationName, CapabilityGroup include); + Mono> listByLocationWithResponseAsync(String locationName, + CapabilityGroup include); /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the subscription capabilities available for the specified location on successful completion of {@link - * Mono}. + * @return the subscription capabilities available for the specified location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono listByLocationAsync(String locationName); /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @param include If specified, restricts the response to only include the selected item. * @param context The context to associate with this operation. @@ -54,12 +56,12 @@ Mono> listByLocationWithResponseAsync( * @return the subscription capabilities available for the specified location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listByLocationWithResponse( - String locationName, CapabilityGroup include, Context context); + Response listByLocationWithResponse(String locationName, CapabilityGroup include, + Context context); /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java index 11d83f3fcb7c9..0a9e75f8e144a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java @@ -12,13 +12,15 @@ import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataMaskingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DataMaskingPoliciesClient. + */ public interface DataMaskingPoliciesClient { /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -28,14 +30,14 @@ public interface DataMaskingPoliciesClient { * @return the database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName); /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -45,14 +47,14 @@ Mono> getWithResponseAsync( * @return the database data masking policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName); /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -63,18 +65,14 @@ Mono getAsync( * @return the database data masking policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, Context context); /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -84,14 +82,14 @@ Response getWithResponse( * @return the database data masking policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataMaskingPolicyInner get( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName); + DataMaskingPolicyInner get(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName); /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -102,18 +100,14 @@ DataMaskingPolicyInner get( * @return a database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters); /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -124,18 +118,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a database data masking policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters); /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -147,19 +137,15 @@ Mono createOrUpdateAsync( * @return a database data masking policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters, + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters, Context context); /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -170,10 +156,6 @@ Response createOrUpdateWithResponse( * @return a database data masking policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataMaskingPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters); + DataMaskingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java index 6dcb4bfbea372..982f97fa075d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataMaskingRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in DataMaskingRulesClient. + */ public interface DataMaskingRulesClient { /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -30,14 +32,14 @@ public interface DataMaskingRulesClient { * @return a list of database data masking rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName); /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -47,14 +49,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database data masking rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName); /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -65,18 +67,14 @@ PagedIterable listByDatabase( * @return a list of database data masking rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, Context context); /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -88,19 +86,15 @@ PagedIterable listByDatabase( * @return a database data masking rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters); /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -112,19 +106,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a database data masking rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters); /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -137,20 +126,15 @@ Mono createOrUpdateAsync( * @return a database data masking rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, + DataMaskingRuleInner parameters, Context context); /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -162,11 +146,6 @@ Response createOrUpdateWithResponse( * @return a database data masking rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataMaskingRuleInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters); + DataMaskingRuleInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java index 684d98bead6fa..0887bb781c072 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java @@ -21,9 +21,9 @@ public interface DataWarehouseUserActivitiesOperationsClient { /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,14 +32,14 @@ public interface DataWarehouseUserActivitiesOperationsClient { * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,14 +48,14 @@ PagedFlux listByDatabaseAsync( * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -65,35 +65,32 @@ PagedIterable listByDatabase( * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with {@link - * Response} on successful completion of {@link Mono}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName); /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -101,20 +98,17 @@ Mono> getWithResponseAsync( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the user activities of a data warehouse which includes running and suspended queries on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono getAsync(String resourceGroupName, String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName); /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -122,22 +116,18 @@ Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with {@link - * Response}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context); /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -147,9 +137,6 @@ Response getWithResponse( * @return the user activities of a data warehouse which includes running and suspended queries. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataWarehouseUserActivitiesInner get( - String resourceGroupName, - String serverName, - String databaseName, + DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java index c385be5d40b92..6afb3af3e1683 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java @@ -21,9 +21,9 @@ public interface DatabaseAdvancedThreatProtectionSettingsClient { /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,14 +32,14 @@ public interface DatabaseAdvancedThreatProtectionSettingsClient { * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,14 +48,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -65,14 +65,14 @@ PagedIterable listByDatabase( * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -80,20 +80,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 database's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -103,17 +100,14 @@ Mono> getWithResponseAsync( * @return a database's Advanced Threat Protection state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName); + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -124,18 +118,14 @@ Mono getAsync( * @return a database's Advanced Threat Protection state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context); /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -145,17 +135,14 @@ Response getWithResponse( * @return a database's Advanced Threat Protection state. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseAdvancedThreatProtectionInner get( - String resourceGroupName, - String serverName, - String databaseName, + DatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -163,22 +150,19 @@ DatabaseAdvancedThreatProtectionInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database Advanced Threat Protection along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database Advanced Threat Protection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters); /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -189,18 +173,15 @@ Mono> createOrUpdateWithResponse * @return a database Advanced Threat Protection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters); /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -212,19 +193,15 @@ Mono createOrUpdateAsync( * @return a database Advanced Threat Protection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner parameters, Context context); /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -235,10 +212,7 @@ Response createOrUpdateWithResponse( * @return a database Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java index cfdc919c5f52e..a427eb9846218 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java @@ -12,13 +12,15 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseAdvisorsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseAdvisorsClient. + */ public interface DatabaseAdvisorsClient { /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param expand The child resources to include in the response. @@ -28,14 +30,14 @@ public interface DatabaseAdvisorsClient { * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByDatabaseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String expand); + Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String expand); /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,9 +50,9 @@ Mono>> listByDatabaseWithResponseAsync( /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param expand The child resources to include in the response. @@ -61,14 +63,14 @@ Mono>> listByDatabaseWithResponseAsync( * @return a list of database advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByDatabaseWithResponse( - String resourceGroupName, String serverName, String databaseName, String expand, Context context); + Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, + String databaseName, String expand, Context context); /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,9 +83,9 @@ Response> listByDatabaseWithResponse( /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -93,14 +95,14 @@ Response> listByDatabaseWithResponse( * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName); /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -114,9 +116,9 @@ Mono> getWithResponseAsync( /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -127,14 +129,14 @@ Mono> getWithResponseAsync( * @return a database advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, Context context); /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -148,9 +150,9 @@ Response getWithResponse( /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -158,18 +160,18 @@ 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner parameters); /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -180,14 +182,14 @@ Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters); /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -199,19 +201,14 @@ Mono updateAsync( * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - AdvisorInner parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters, Context context); /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -222,6 +219,6 @@ Response updateWithResponse( * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvisorInner update( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters); + AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java index c78fd63d23607..547412083446e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java @@ -11,13 +11,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseAutomaticTuningsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseAutomaticTuningsClient. + */ public interface DatabaseAutomaticTuningsClient { /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,14 +28,14 @@ public interface DatabaseAutomaticTuningsClient { * @return a database's automatic tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,9 +48,9 @@ Mono> getWithResponseAsync( /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -58,14 +60,14 @@ Mono> getWithResponseAsync( * @return a database's automatic tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,9 +80,9 @@ Response getWithResponse( /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -90,14 +92,14 @@ Response getWithResponse( * @return database-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseAutomaticTuningInner parameters); /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -107,14 +109,14 @@ Mono> updateWithResponseAsync( * @return database-level Automatic Tuning on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseAutomaticTuningInner parameters); /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -125,18 +127,14 @@ Mono updateAsync( * @return database-level Automatic Tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseAutomaticTuningInner parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, DatabaseAutomaticTuningInner parameters, Context context); /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -146,6 +144,6 @@ Response updateWithResponse( * @return database-level Automatic Tuning. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseAutomaticTuningInner update( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters); + DatabaseAutomaticTuningInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseAutomaticTuningInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java index 88e05da494359..3002606d784a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseBlobAuditingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseBlobAuditingPoliciesClient. + */ public interface DatabaseBlobAuditingPoliciesClient { /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,14 +30,14 @@ public interface DatabaseBlobAuditingPoliciesClient { * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,14 +46,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -61,14 +63,14 @@ PagedIterable listByDatabase( * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ PagedIterable listByDatabase( * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono> getWithResponseAsync( * @return a database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -141,14 +143,14 @@ Response getWithResponse( * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -158,14 +160,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a database blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -176,18 +178,14 @@ Mono createOrUpdateAsync( * @return a database blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseBlobAuditingPolicyInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -197,6 +195,6 @@ Response createOrUpdateWithResponse( * @return a database blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters); + DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseBlobAuditingPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java index 6bd7b217151c2..590db9b5aac59 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java @@ -14,19 +14,21 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseColumnsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseColumnsClient. + */ public interface DatabaseColumnsClient { /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,21 +36,14 @@ public interface DatabaseColumnsClient { * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, + List schema, List table, List column, List orderBy, String skiptoken); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,14 +52,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,15 +72,15 @@ PagedFlux listByDatabaseAsync( /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,22 +89,15 @@ PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + List schema, List table, List column, List orderBy, String skiptoken, Context context); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -121,19 +109,14 @@ PagedIterable listByDatabase( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTableAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter); + PagedFlux listByTableAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String filter); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -144,14 +127,14 @@ PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTableAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName); + PagedFlux listByTableAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -162,14 +145,14 @@ PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTable( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName); + PagedIterable listByTable(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName); /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -182,20 +165,14 @@ PagedIterable listByTable( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTable( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context); + PagedIterable listByTable(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String filter, Context context); /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -207,19 +184,14 @@ PagedIterable listByTable( * @return database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName); /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -231,19 +203,14 @@ Mono> getWithResponseAsync( * @return database column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName); /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -256,20 +223,14 @@ Mono getAsync( * @return database column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -281,11 +242,6 @@ Response getWithResponse( * @return database column. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseColumnInner get( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java index 313e00ca26f2b..d751f04d649e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. + */ public interface DatabaseExtensionsOperationsClient { /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,14 +36,14 @@ public interface DatabaseExtensionsOperationsClient { * @return import export operation extensions list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName); /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,14 +52,14 @@ PagedFlux listByDatabaseAsync( * @return import export operation extensions list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName); /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -67,14 +69,14 @@ PagedIterable listByDatabase( * @return import export operation extensions list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context); /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -84,14 +86,14 @@ PagedIterable listByDatabase( * @return a database extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String extensionName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String extensionName); /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -105,9 +107,9 @@ Mono> getWithResponseAsync( /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -118,14 +120,14 @@ Mono> getWithResponseAsync( * @return a database extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String extensionName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String extensionName, Context context); /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -138,9 +140,9 @@ Response getWithResponse( /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -148,22 +150,18 @@ 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 Extension operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Extension operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -175,18 +173,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String extensionName, DatabaseExtensions parameters); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -198,18 +192,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String extensionName, DatabaseExtensions parameters); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -222,19 +212,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String extensionName, + DatabaseExtensions parameters, Context context); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -245,18 +230,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return an Extension operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -267,18 +248,14 @@ Mono createOrUpdateAsync( * @return an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportExtensionsOperationResultInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters); + ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters); /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -290,11 +267,6 @@ ImportExportExtensionsOperationResultInner createOrUpdate( * @return an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportExtensionsOperationResultInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context); + ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java index 6105a2abbf4f2..7d0422dcb774e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java @@ -14,13 +14,15 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseOperationsClient. + */ public interface DatabaseOperationsClient { /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,14 +31,14 @@ public interface DatabaseOperationsClient { * @return a list of operations performed on the database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of operations performed on the database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -62,14 +64,14 @@ PagedIterable listByDatabase( * @return a list of operations performed on the database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -79,14 +81,14 @@ PagedIterable listByDatabase( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, UUID operationId); + Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + UUID operationId); /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -100,9 +102,9 @@ Mono> cancelWithResponseAsync( /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -113,14 +115,14 @@ Mono> cancelWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String resourceGroupName, String serverName, String databaseName, UUID operationId, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String databaseName, + UUID operationId, Context context); /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java index cb8a45415ddff..4ac75fb34868c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java @@ -12,31 +12,33 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseRecommendedActionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseRecommendedActionsClient. + */ public interface DatabaseRecommendedActionsClient { /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Database Recommended Actions along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByDatabaseAdvisorWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName); + Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String advisorName); /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -46,14 +48,14 @@ Mono>> listByDatabaseAdvisorWithResponseAs * @return list of Database Recommended Actions on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listByDatabaseAdvisorAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName); + Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName); /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -64,14 +66,14 @@ Mono> listByDatabaseAdvisorAsync( * @return list of Database Recommended Actions along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByDatabaseAdvisorWithResponse( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context); + Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, + String serverName, String databaseName, String advisorName, Context context); /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -81,14 +83,14 @@ Response> listByDatabaseAdvisorWithResponse( * @return list of Database Recommended Actions. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listByDatabaseAdvisor( - String resourceGroupName, String serverName, String databaseName, String advisorName); + List listByDatabaseAdvisor(String resourceGroupName, String serverName, String databaseName, + String advisorName); /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -99,18 +101,14 @@ List listByDatabaseAdvisor( * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName); /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -121,18 +119,14 @@ Mono> getWithResponseAsync( * @return a database recommended action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName); /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -144,19 +138,14 @@ Mono getAsync( * @return a database recommended action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, Context context); /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -167,18 +156,14 @@ Response getWithResponse( * @return a database recommended action. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecommendedActionInner get( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, + RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, String advisorName, String recommendedActionName); /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -188,22 +173,17 @@ RecommendedActionInner 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 database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters); /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -215,19 +195,14 @@ Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters); /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -240,20 +215,15 @@ Mono updateAsync( * @return database, Server or Elastic Pool Recommended Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters, + Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, Context context); /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -265,11 +235,6 @@ Response updateWithResponse( * @return database, Server or Elastic Pool Recommended Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecommendedActionInner update( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters); + RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + String recommendedActionName, RecommendedActionInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java index 83e9231bb0984..938cedc6a78ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseSchemasClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseSchemasClient. + */ public interface DatabaseSchemasClient { /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -29,14 +31,14 @@ public interface DatabaseSchemasClient { * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, + String filter); /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,9 +67,9 @@ PagedFlux listByDatabaseAsync( /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -78,14 +80,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, String filter, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + String filter, Context context); /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -95,14 +97,14 @@ PagedIterable listByDatabase( * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName); /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -112,14 +114,14 @@ Mono> getWithResponseAsync( * @return database schema on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -130,14 +132,14 @@ Mono getAsync( * @return database schema along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String schemaName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, Context context); /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java index 204a5cc8958c0..e6689e7153922 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. + */ public interface DatabaseSecurityAlertPoliciesClient { /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,14 +31,14 @@ public interface DatabaseSecurityAlertPoliciesClient { * @return a list of database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param context The context to associate with this operation. @@ -62,14 +64,14 @@ PagedIterable listByDatabase( * @return a list of database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -79,17 +81,14 @@ PagedIterable listByDatabase( * @return a database's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -99,17 +98,14 @@ Mono> getWithResponseAsync( * @return a database's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono getAsync(String resourceGroupName, String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -120,18 +116,14 @@ Mono getAsync( * @return a database's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context); /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -141,17 +133,14 @@ Response getWithResponse( * @return a database's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSecurityAlertPolicyInner get( - String resourceGroupName, - String serverName, - String databaseName, + DatabaseSecurityAlertPolicyInner get(String resourceGroupName, String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -162,18 +151,15 @@ DatabaseSecurityAlertPolicyInner get( * @return a database security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -184,18 +170,15 @@ Mono> createOrUpdateWithResponseAsync * @return a database security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -207,19 +190,15 @@ Mono createOrUpdateAsync( * @return a database security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - DatabaseSecurityAlertPolicyInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, + DatabaseSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -230,10 +209,6 @@ Response createOrUpdateWithResponse( * @return a database security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - DatabaseSecurityAlertPolicyInner parameters); + DatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java index c71300bf1d843..4b9850ac06896 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseTablesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseTablesClient. + */ public interface DatabaseTablesClient { /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -30,14 +32,14 @@ public interface DatabaseTablesClient { * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String filter); + PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String filter); /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -47,14 +49,14 @@ PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName); + PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -64,14 +66,14 @@ PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema( - String resourceGroupName, String serverName, String databaseName, String schemaName); + PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -83,19 +85,14 @@ PagedIterable listBySchema( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String filter, - Context context); + PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, + String schemaName, String filter, Context context); /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -106,14 +103,14 @@ PagedIterable listBySchema( * @return database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName); /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -124,14 +121,14 @@ Mono> getWithResponseAsync( * @return database table on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName); /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -143,19 +140,14 @@ Mono getAsync( * @return database table along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, Context context); /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -166,6 +158,6 @@ Response getWithResponse( * @return database table. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseTableInner get( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName); + DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java index 7f8c079036492..7266929d0bddd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseUsageInner; -/** An instance of this class provides access to all the operations defined in DatabaseUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseUsagesClient. + */ public interface DatabaseUsagesClient { /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,9 +32,9 @@ public interface DatabaseUsagesClient { /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,9 +47,9 @@ public interface DatabaseUsagesClient { /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -57,6 +59,6 @@ public interface DatabaseUsagesClient { * @return database usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java index 066c851c79eaf..ccc33c6da6cc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -20,66 +20,58 @@ public interface DatabaseVulnerabilityAssessmentRuleBaselinesClient { /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -87,79 +79,67 @@ Mono getAsync( * @return a database's vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context); + Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentRuleBaselineInner get( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -167,26 +147,22 @@ Mono> createOrUpdateW * @return a database vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,27 +171,22 @@ Mono createOrUpdateAsync( * @return a database vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context); + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -223,76 +194,64 @@ Response createOrUpdateWithRes * @return a database vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -300,36 +259,27 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + void delete(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java index c7ed903f851e7..a85dd7cf771fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java @@ -27,9 +27,9 @@ public interface DatabaseVulnerabilityAssessmentScansClient { /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -39,17 +39,14 @@ public interface DatabaseVulnerabilityAssessmentScansClient { * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -59,17 +56,14 @@ PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -80,18 +74,14 @@ PagedIterable listByDatabase( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -100,21 +90,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -125,18 +111,14 @@ Mono> getWithResponseAsync( * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -148,19 +130,14 @@ Mono getAsync( * @return a vulnerability assessment scan record of a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -171,18 +148,14 @@ Response getWithResponse( * @return a vulnerability assessment scan record of a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - VulnerabilityAssessmentScanRecordInner get( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -191,21 +164,17 @@ VulnerabilityAssessmentScanRecordInner 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> exportWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono> exportWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -216,18 +185,14 @@ Mono> exportWithRespon * @return a database Vulnerability Assessment scan export resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono exportAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono exportAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -239,19 +204,15 @@ Mono exportAsync( * @return a database Vulnerability Assessment scan export resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response exportWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, + Response exportWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -262,18 +223,14 @@ Response exportWithResponse( * @return a database Vulnerability Assessment scan export resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentScansExportInner export( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -284,18 +241,14 @@ DatabaseVulnerabilityAssessmentScansExportInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono>> initiateScanWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -306,18 +259,14 @@ Mono>> initiateScanWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -328,18 +277,14 @@ PollerFlux, Void> beginInitiateScanAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + SyncPoller, Void> beginInitiateScan(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -351,19 +296,14 @@ SyncPoller, Void> beginInitiateScan( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + SyncPoller, Void> beginInitiateScan(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -374,18 +314,14 @@ SyncPoller, Void> beginInitiateScan( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono initiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono initiateScanAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -395,18 +331,14 @@ Mono initiateScanAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void initiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + void initiateScan(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -417,11 +349,6 @@ void initiateScan( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void initiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + void initiateScan(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java index ba64167f4b408..bb4960b8d3b43 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java @@ -20,9 +20,9 @@ public interface DatabaseVulnerabilityAssessmentsClient { /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,14 +31,14 @@ public interface DatabaseVulnerabilityAssessmentsClient { * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @param context The context to associate with this operation. @@ -64,35 +64,32 @@ PagedIterable listByDatabase( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -102,17 +99,14 @@ Mono> getWithResponseAsync( * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -123,18 +117,14 @@ Mono getAsync( * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -144,17 +134,14 @@ Response getWithResponse( * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner get( - String resourceGroupName, - String serverName, - String databaseName, + DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -165,18 +152,15 @@ DatabaseVulnerabilityAssessmentInner get( * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -187,18 +171,15 @@ Mono> createOrUpdateWithResponseA * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -210,19 +191,15 @@ Mono createOrUpdateAsync( * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentInner parameters, Context context); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -233,18 +210,15 @@ Response createOrUpdateWithResponse( * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -254,17 +228,14 @@ DatabaseVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -274,17 +245,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -295,18 +263,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -315,9 +279,6 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, + void delete(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java index 8876beca672f6..7433e1df4c5d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java @@ -24,13 +24,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabasesClient. + */ public interface DatabasesClient { /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,9 +45,9 @@ public interface DatabasesClient { /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,9 +59,9 @@ public interface DatabasesClient { /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -71,9 +73,9 @@ public interface DatabasesClient { /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @param context The context to associate with this operation. @@ -83,14 +85,14 @@ public interface DatabasesClient { * @return a list of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, String skipToken, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, String skipToken, + Context context); /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,14 +101,14 @@ PagedIterable listByServer( * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,9 +121,9 @@ Mono> getWithResponseAsync( /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -131,14 +133,14 @@ Mono> getWithResponseAsync( * @return a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,9 +153,9 @@ Response getWithResponse( /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -163,14 +165,14 @@ Response getWithResponse( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -180,14 +182,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); + PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -197,14 +199,14 @@ PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); + SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -215,14 +217,14 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); + SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -232,14 +234,14 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -249,14 +251,14 @@ Mono createOrUpdateAsync( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); + DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -267,14 +269,14 @@ DatabaseInner createOrUpdate( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); + DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters, Context context); /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,14 +285,14 @@ DatabaseInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,14 +301,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName); /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,9 +321,9 @@ PollerFlux, Void> beginDeleteAsync( /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -331,14 +333,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,9 +353,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -365,9 +367,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -380,9 +382,9 @@ SyncPoller, Void> beginDelete( /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -392,14 +394,14 @@ SyncPoller, Void> beginDelete( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -409,14 +411,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DatabaseInner> beginUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); + PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -426,14 +428,14 @@ PollerFlux, DatabaseInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); + SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -444,14 +446,14 @@ SyncPoller, DatabaseInner> beginUpdate( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context); + SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -461,14 +463,14 @@ SyncPoller, DatabaseInner> beginUpdate( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -482,9 +484,9 @@ Mono updateAsync( /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -495,32 +497,32 @@ Mono updateAsync( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner update( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context); + DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, + Context context); /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> exportWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters); + Mono>> exportWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ExportDatabaseDefinition parameters); /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -535,9 +537,9 @@ PollerFlux, ImportExportOperationRe /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -552,9 +554,9 @@ SyncPoller, ImportExportOperationRe /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -566,17 +568,14 @@ SyncPoller, ImportExportOperationRe */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ImportExportOperationResultInner> beginExport( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, + String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters, Context context); /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -586,14 +585,14 @@ SyncPoller, ImportExportOperationRe * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono exportAsync( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters); + Mono exportAsync(String resourceGroupName, String serverName, String databaseName, + ExportDatabaseDefinition parameters); /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -603,14 +602,14 @@ Mono exportAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner export( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters); + ImportExportOperationResultInner export(String resourceGroupName, String serverName, String databaseName, + ExportDatabaseDefinition parameters); /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -621,18 +620,14 @@ ImportExportOperationResultInner export( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner export( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, - Context context); + ImportExportOperationResultInner export(String resourceGroupName, String serverName, String databaseName, + ExportDatabaseDefinition parameters, Context context); /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -642,14 +637,14 @@ ImportExportOperationResultInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType); + Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType); /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -659,14 +654,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType); + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType); /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -675,14 +670,14 @@ PollerFlux, Void> beginFailoverAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName); + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String databaseName); /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -695,9 +690,9 @@ PollerFlux, Void> beginFailoverAsync( /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -708,14 +703,14 @@ PollerFlux, Void> beginFailoverAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context); + SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, String databaseName, + ReplicaType replicaType, Context context); /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -729,9 +724,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -744,9 +739,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -758,9 +753,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -770,32 +765,32 @@ SyncPoller, Void> beginFailover( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void failover( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context); + void failover(String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, + Context context); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> importMethodWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters); + Mono>> importMethodWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -810,9 +805,9 @@ PollerFlux, ImportExportOperationRe /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -827,9 +822,9 @@ SyncPoller, ImportExportOperationRe /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -841,17 +836,14 @@ SyncPoller, ImportExportOperationRe */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ImportExportOperationResultInner> beginImportMethod( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, + String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters, Context context); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -861,14 +853,14 @@ SyncPoller, ImportExportOperationRe * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono importMethodAsync( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters); + Mono importMethodAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -878,14 +870,14 @@ Mono importMethodAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner importMethod( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters); + ImportExportOperationResultInner importMethod(String resourceGroupName, String serverName, String databaseName, + ImportExistingDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -896,18 +888,14 @@ ImportExportOperationResultInner importMethod( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner importMethod( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, - Context context); + ImportExportOperationResultInner importMethod(String resourceGroupName, String serverName, String databaseName, + ImportExistingDatabaseDefinition parameters, Context context); /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -917,14 +905,14 @@ ImportExportOperationResultInner importMethod( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> renameWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters); + Mono> renameWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters); /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -934,14 +922,14 @@ Mono> renameWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono renameAsync( - String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters); + Mono renameAsync(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters); /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -952,18 +940,14 @@ Mono renameAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response renameWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ResourceMoveDefinition parameters, - Context context); + Response renameWithResponse(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters, Context context); /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -976,9 +960,9 @@ Response renameWithResponse( /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -987,14 +971,14 @@ Response renameWithResponse( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> pauseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono>> pauseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1003,14 +987,14 @@ Mono>> pauseWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DatabaseInner> beginPauseAsync( - String resourceGroupName, String serverName, String databaseName); + PollerFlux, DatabaseInner> beginPauseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1019,14 +1003,14 @@ PollerFlux, DatabaseInner> beginPauseAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginPause( - String resourceGroupName, String serverName, String databaseName); + SyncPoller, DatabaseInner> beginPause(String resourceGroupName, String serverName, + String databaseName); /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -1036,14 +1020,14 @@ SyncPoller, DatabaseInner> beginPause( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginPause( - String resourceGroupName, String serverName, String databaseName, Context context); + SyncPoller, DatabaseInner> beginPause(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1056,9 +1040,9 @@ SyncPoller, DatabaseInner> beginPause( /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1071,9 +1055,9 @@ SyncPoller, DatabaseInner> beginPause( /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -1087,9 +1071,9 @@ SyncPoller, DatabaseInner> beginPause( /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1098,14 +1082,14 @@ SyncPoller, DatabaseInner> beginPause( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resumeWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1114,14 +1098,14 @@ Mono>> resumeWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DatabaseInner> beginResumeAsync( - String resourceGroupName, String serverName, String databaseName); + PollerFlux, DatabaseInner> beginResumeAsync(String resourceGroupName, String serverName, + String databaseName); /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1130,14 +1114,14 @@ PollerFlux, DatabaseInner> beginResumeAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginResume( - String resourceGroupName, String serverName, String databaseName); + SyncPoller, DatabaseInner> beginResume(String resourceGroupName, String serverName, + String databaseName); /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -1147,14 +1131,14 @@ SyncPoller, DatabaseInner> beginResume( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginResume( - String resourceGroupName, String serverName, String databaseName, Context context); + SyncPoller, DatabaseInner> beginResume(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1167,9 +1151,9 @@ SyncPoller, DatabaseInner> beginResume( /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1182,9 +1166,9 @@ SyncPoller, DatabaseInner> beginResume( /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -1198,9 +1182,9 @@ SyncPoller, DatabaseInner> beginResume( /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1209,14 +1193,14 @@ SyncPoller, DatabaseInner> beginResume( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> upgradeDataWarehouseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono>> upgradeDataWarehouseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1225,14 +1209,14 @@ Mono>> upgradeDataWarehouseWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginUpgradeDataWarehouseAsync( - String resourceGroupName, String serverName, String databaseName); + PollerFlux, Void> beginUpgradeDataWarehouseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1241,14 +1225,14 @@ PollerFlux, Void> beginUpgradeDataWarehouseAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpgradeDataWarehouse( - String resourceGroupName, String serverName, String databaseName); + SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGroupName, String serverName, + String databaseName); /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -1258,14 +1242,14 @@ SyncPoller, Void> beginUpgradeDataWarehouse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpgradeDataWarehouse( - String resourceGroupName, String serverName, String databaseName, Context context); + SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1278,9 +1262,9 @@ SyncPoller, Void> beginUpgradeDataWarehouse( /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1292,9 +1276,9 @@ SyncPoller, Void> beginUpgradeDataWarehouse( /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -1307,9 +1291,9 @@ SyncPoller, Void> beginUpgradeDataWarehouse( /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1318,14 +1302,14 @@ SyncPoller, Void> beginUpgradeDataWarehouse( * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName); + PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1338,9 +1322,9 @@ PagedFlux listByElasticPoolAsync( /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1350,14 +1334,14 @@ PagedFlux listByElasticPoolAsync( * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName, Context context); + PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName, + Context context); /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1369,9 +1353,9 @@ PagedIterable listByElasticPool( /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1383,9 +1367,9 @@ PagedIterable listByElasticPool( /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java index ab9e7807d57e0..61348b8068705 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java @@ -18,11 +18,13 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeletedServersClient. */ +/** + * An instance of this class provides access to all the operations defined in DeletedServersClient. + */ public interface DeletedServersClient { /** * Gets a list of all deleted servers in a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. @@ -32,7 +34,7 @@ public interface DeletedServersClient { /** * Gets a list of all deleted servers in a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. @@ -42,7 +44,7 @@ public interface DeletedServersClient { /** * Gets a list of all deleted servers in a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,7 +56,7 @@ public interface DeletedServersClient { /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,7 +68,7 @@ public interface DeletedServersClient { /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -78,7 +80,7 @@ public interface DeletedServersClient { /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,7 +93,7 @@ public interface DeletedServersClient { /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,7 +106,7 @@ public interface DeletedServersClient { /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,7 +119,7 @@ public interface DeletedServersClient { /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -131,7 +133,7 @@ public interface DeletedServersClient { /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,7 +146,7 @@ public interface DeletedServersClient { /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,7 +159,7 @@ public interface DeletedServersClient { /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -166,12 +168,12 @@ public interface DeletedServersClient { * @return the {@link PollerFlux} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DeletedServerInner> beginRecoverAsync( - String locationName, String deletedServerName); + PollerFlux, DeletedServerInner> beginRecoverAsync(String locationName, + String deletedServerName); /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,12 +182,12 @@ PollerFlux, DeletedServerInner> beginRecoverAsync * @return the {@link SyncPoller} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeletedServerInner> beginRecover( - String locationName, String deletedServerName); + SyncPoller, DeletedServerInner> beginRecover(String locationName, + String deletedServerName); /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -195,12 +197,12 @@ SyncPoller, DeletedServerInner> beginRecover( * @return the {@link SyncPoller} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DeletedServerInner> beginRecover( - String locationName, String deletedServerName, Context context); + SyncPoller, DeletedServerInner> beginRecover(String locationName, + String deletedServerName, Context context); /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,7 +215,7 @@ SyncPoller, DeletedServerInner> beginRecover( /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -226,7 +228,7 @@ SyncPoller, DeletedServerInner> beginRecover( /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java index 6d4f83a3a5802..0418008fa43c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DistributedAvailabilityGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DistributedAvailabilityGroupsClient. + */ public interface DistributedAvailabilityGroupsClient { /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,14 +34,14 @@ public interface DistributedAvailabilityGroupsClient { * @return a list of a distributed availability groups in instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,14 +49,14 @@ PagedFlux listByInstanceAsync( * @return a list of a distributed availability groups in instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,31 +65,31 @@ PagedIterable listByInstance( * @return a list of a distributed availability groups in instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a distributed availability group info along with {@link Response} on successful completion of {@link - * Mono}. + * @return a distributed availability group info along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName); /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,14 +98,14 @@ Mono> getWithResponseAsync( * @return a distributed availability group info on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -113,14 +115,14 @@ Mono getAsync( * @return a distributed availability group info along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context); /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,14 +131,14 @@ Response getWithResponse( * @return a distributed availability group info. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner get( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + DistributedAvailabilityGroupInner get(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -144,20 +146,18 @@ DistributedAvailabilityGroupInner 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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -165,21 +165,18 @@ Mono>> createOrUpdateWithResponseAsync( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, DistributedAvailabilityGroupInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -187,20 +184,18 @@ Mono>> createOrUpdateWithResponseAsync( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DistributedAvailabilityGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -209,42 +204,36 @@ SyncPoller, DistributedAvailabilit * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DistributedAvailabilityGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context); + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -254,17 +243,14 @@ Mono createOrUpdateAsync( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -275,18 +261,14 @@ DistributedAvailabilityGroupInner createOrUpdate( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context); + DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,14 +277,14 @@ DistributedAvailabilityGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,14 +293,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,14 +309,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -344,14 +326,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,14 +342,14 @@ SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName); + Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName); /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,9 +361,9 @@ Mono deleteAsync( /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -390,14 +372,14 @@ Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, Context context); + void delete(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + Context context); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -405,20 +387,17 @@ 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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -426,20 +405,18 @@ Mono>> updateWithResponseAsync( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, DistributedAvailabilityGroupInner> beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -447,20 +424,18 @@ PollerFlux, DistributedAvailabilit * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -469,42 +444,36 @@ SyncPoller, DistributedAvailabilit * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context); + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -514,17 +483,14 @@ Mono updateAsync( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner update( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); + DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -535,10 +501,6 @@ DistributedAvailabilityGroupInner update( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner update( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context); + DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java index 8547bfb3a6c80..320c2cc6ea6a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java @@ -14,13 +14,15 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ElasticPoolOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ElasticPoolOperationsClient. + */ public interface ElasticPoolOperationsClient { /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,14 +31,14 @@ public interface ElasticPoolOperationsClient { * @return a list of operations performed on the elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName); + PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,14 +47,14 @@ PagedFlux listByElasticPoolAsync( * @return a list of operations performed on the elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName); + PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName); /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param context The context to associate with this operation. @@ -62,14 +64,14 @@ PagedIterable listByElasticPool( * @return a list of operations performed on the elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName, Context context); + PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName, Context context); /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -79,14 +81,14 @@ PagedIterable listByElasticPool( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId); + Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, String elasticPoolName, + UUID operationId); /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -100,9 +102,9 @@ Mono> cancelWithResponseAsync( /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -113,14 +115,14 @@ Mono> cancelWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String elasticPoolName, + UUID operationId, Context context); /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java index 096278231d013..91f59bf1e19b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ElasticPoolsClient. */ +/** + * An instance of this class provides access to all the operations defined in ElasticPoolsClient. + */ public interface ElasticPoolsClient { /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,9 +40,9 @@ public interface ElasticPoolsClient { /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +54,9 @@ public interface ElasticPoolsClient { /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,9 +68,9 @@ public interface ElasticPoolsClient { /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @param context The context to associate with this operation. @@ -78,14 +80,14 @@ public interface ElasticPoolsClient { * @return all elastic pools in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Long skip, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, + Context context); /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,14 +96,14 @@ PagedIterable listByServer( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,9 +116,9 @@ Mono> getWithResponseAsync( /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -126,14 +128,14 @@ Mono> getWithResponseAsync( * @return an elastic pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String elasticPoolName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String elasticPoolName, + Context context); /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,9 +148,9 @@ Response getWithResponse( /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -158,14 +160,14 @@ Response getWithResponse( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -175,14 +177,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters); + PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -192,14 +194,14 @@ PollerFlux, ElasticPoolInner> beginCreateOrUpdateAs * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters); + SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -210,18 +212,14 @@ SyncPoller, ElasticPoolInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context); + SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -231,14 +229,14 @@ SyncPoller, ElasticPoolInner> beginCreateOrUpdate( * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -248,14 +246,14 @@ Mono createOrUpdateAsync( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner createOrUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters); + ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters); /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -266,18 +264,14 @@ ElasticPoolInner createOrUpdate( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner createOrUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context); + ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters, Context context); /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,14 +280,14 @@ ElasticPoolInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,14 +296,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String elasticPoolName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,9 +316,9 @@ PollerFlux, Void> beginDeleteAsync( /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -334,14 +328,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String elasticPoolName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String elasticPoolName, + Context context); /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -354,9 +348,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -368,9 +362,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -383,9 +377,9 @@ SyncPoller, Void> beginDelete( /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -395,14 +389,14 @@ SyncPoller, Void> beginDelete( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -412,14 +406,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ElasticPoolInner> beginUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -429,14 +423,14 @@ PollerFlux, ElasticPoolInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -447,18 +441,14 @@ SyncPoller, ElasticPoolInner> beginUpdate( * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context); + SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters, Context context); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -468,14 +458,14 @@ SyncPoller, ElasticPoolInner> beginUpdate( * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -485,14 +475,14 @@ Mono updateAsync( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner update( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters); /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -503,18 +493,14 @@ ElasticPoolInner update( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner update( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context); + ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context); /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -523,14 +509,14 @@ ElasticPoolInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName); + Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -539,14 +525,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String elasticPoolName); + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -555,14 +541,14 @@ PollerFlux, Void> beginFailoverAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String elasticPoolName); + SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String elasticPoolName); /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -572,14 +558,14 @@ SyncPoller, Void> beginFailover( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String elasticPoolName, Context context); + SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String elasticPoolName, Context context); /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -592,9 +578,9 @@ SyncPoller, Void> beginFailover( /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -606,9 +592,9 @@ SyncPoller, Void> beginFailover( /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java index 981452536ed81..69084f1992fd3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. + */ public interface EncryptionProtectorsClient { /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface EncryptionProtectorsClient { /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface EncryptionProtectorsClient { /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +68,9 @@ public interface EncryptionProtectorsClient { /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ public interface EncryptionProtectorsClient { * @return a server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,14 +95,14 @@ Mono> getWithResponseAsync( * @return a server encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + Mono getAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -110,14 +112,14 @@ Mono getAsync( * @return a server encryption protector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context); /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,14 +128,14 @@ Response getWithResponse( * @return a server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - EncryptionProtectorInner get( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + EncryptionProtectorInner get(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -143,17 +145,14 @@ EncryptionProtectorInner get( * @return the server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -164,16 +163,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, EncryptionProtectorInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -184,16 +181,14 @@ PollerFlux, EncryptionProtectorInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -205,17 +200,14 @@ SyncPoller, EncryptionProtectorInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context); + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, + EncryptionProtectorInner parameters, Context context); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -225,17 +217,14 @@ SyncPoller, EncryptionProtectorInner> begin * @return the server encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -245,17 +234,14 @@ Mono createOrUpdateAsync( * @return the server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - EncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters); + EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -266,18 +252,14 @@ EncryptionProtectorInner createOrUpdate( * @return the server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - EncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context); + EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters, Context context); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,14 +268,14 @@ EncryptionProtectorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> revalidateWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,14 +284,14 @@ Mono>> revalidateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,14 +300,14 @@ PollerFlux, Void> beginRevalidateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -335,14 +317,14 @@ SyncPoller, Void> beginRevalidate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context); + SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,14 +333,14 @@ SyncPoller, Void> beginRevalidate( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono revalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName); + Mono revalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -370,9 +352,9 @@ Mono revalidateAsync( /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -381,6 +363,6 @@ Mono revalidateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void revalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context); + void revalidate(String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java index 96c301239e283..62801850cab2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.EndpointCertificateInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in EndpointCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in EndpointCertificatesClient. + */ public interface EndpointCertificatesClient { /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,9 +33,9 @@ public interface EndpointCertificatesClient { /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ public interface EndpointCertificatesClient { /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,31 +58,31 @@ public interface EndpointCertificatesClient { * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String endpointType); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String endpointType); /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +95,9 @@ Mono> getWithResponseAsync( /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @param context The context to associate with this operation. @@ -105,14 +107,14 @@ Mono> getWithResponseAsync( * @return a certificate used on the endpoint with the given id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String endpointType, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String endpointType, Context context); /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java index e906ef38acc14..0105f3acf6000 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java @@ -20,9 +20,9 @@ public interface ExtendedDatabaseBlobAuditingPoliciesClient { /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,14 +31,14 @@ public interface ExtendedDatabaseBlobAuditingPoliciesClient { * @return a list of database extended auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -64,31 +64,31 @@ PagedIterable listByDatabase( * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 extended database's blob auditing policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName); /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,14 +97,14 @@ Mono> getWithResponseAsync( * @return an extended database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName); + Mono getAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -114,14 +114,14 @@ Mono getAsync( * @return an extended database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,30 +134,27 @@ Response getWithResponse( /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 extended database blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended database blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -167,17 +164,14 @@ Mono> createOrUpdateWithRespon * @return an extended database blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -188,18 +182,14 @@ Mono createOrUpdateAsync( * @return an extended database blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -209,9 +199,6 @@ Response createOrUpdateWithResponse( * @return an extended database blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); + ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java index f773063afeee6..5933e2671ac97 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java @@ -24,9 +24,9 @@ public interface ExtendedServerBlobAuditingPoliciesClient { /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,9 +38,9 @@ public interface ExtendedServerBlobAuditingPoliciesClient { /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +52,9 @@ public interface ExtendedServerBlobAuditingPoliciesClient { /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,30 +63,30 @@ public interface ExtendedServerBlobAuditingPoliciesClient { * @return a list of server extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 extended server's blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server's blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName); /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,9 +98,9 @@ Mono> getWithResponseAsync( /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,14 +109,14 @@ Mono> getWithResponseAsync( * @return an extended server's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + Context context); /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,26 +128,26 @@ Response getWithResponse( /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 extended server blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,14 +157,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,14 +174,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); + beginCreateOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -192,17 +192,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,14 +208,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return an extended server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,14 +224,14 @@ Mono createOrUpdateAsync( * @return an extended server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtendedServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); + ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -244,6 +241,6 @@ ExtendedServerBlobAuditingPolicyInner createOrUpdate( * @return an extended server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtendedServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters, Context context); + ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java index f4828dc55dab4..59a4de51f6cb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FailoverGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in FailoverGroupsClient. + */ public interface FailoverGroupsClient { /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface FailoverGroupsClient { /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface FailoverGroupsClient { /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +68,9 @@ public interface FailoverGroupsClient { /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ public interface FailoverGroupsClient { * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono> getWithResponseAsync( * @return a failover group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String failoverGroupName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String failoverGroupName, + Context context); /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -141,14 +143,14 @@ Response getWithResponse( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -158,14 +160,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters); + PollerFlux, FailoverGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -175,14 +177,14 @@ PollerFlux, FailoverGroupInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters); + SyncPoller, FailoverGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -193,18 +195,14 @@ SyncPoller, FailoverGroupInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context); + SyncPoller, FailoverGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters, Context context); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -214,14 +212,14 @@ SyncPoller, FailoverGroupInner> beginCreateOrUpda * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -231,14 +229,14 @@ Mono createOrUpdateAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner createOrUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters); + FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -249,18 +247,14 @@ FailoverGroupInner createOrUpdate( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context); + FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupInner parameters, Context context); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,14 +263,14 @@ FailoverGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,14 +279,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String failoverGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,14 +295,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String failoverGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -318,14 +312,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String failoverGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName, Context context); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,9 +332,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,9 +346,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -367,9 +361,9 @@ SyncPoller, Void> beginDelete( /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -379,14 +373,14 @@ SyncPoller, Void> beginDelete( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate parameters); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -396,14 +390,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> beginUpdateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -413,14 +407,14 @@ PollerFlux, FailoverGroupInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -431,18 +425,14 @@ SyncPoller, FailoverGroupInner> beginUpdate( * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context); + SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -452,14 +442,14 @@ SyncPoller, FailoverGroupInner> beginUpdate( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -469,14 +459,14 @@ Mono updateAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner update( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters); /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -487,18 +477,14 @@ FailoverGroupInner update( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner update( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context); + FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -507,14 +493,14 @@ FailoverGroupInner update( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName); + Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -523,14 +509,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String serverName, String failoverGroupName); + PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, + String serverName, String failoverGroupName); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -539,14 +525,14 @@ PollerFlux, FailoverGroupInner> beginFailoverAsyn * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginFailover( - String resourceGroupName, String serverName, String failoverGroupName); + SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -556,14 +542,14 @@ SyncPoller, FailoverGroupInner> beginFailover( * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginFailover( - String resourceGroupName, String serverName, String failoverGroupName, Context context); + SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName, Context context); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -576,9 +562,9 @@ SyncPoller, FailoverGroupInner> beginFailover( /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -591,9 +577,9 @@ SyncPoller, FailoverGroupInner> beginFailover( /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -607,9 +593,9 @@ SyncPoller, FailoverGroupInner> beginFailover( /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,14 +604,14 @@ SyncPoller, FailoverGroupInner> beginFailover( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName); + Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String serverName, String failoverGroupName); /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -634,14 +620,14 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> beginForceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName); + PollerFlux, FailoverGroupInner> + beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName); /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -650,14 +636,14 @@ PollerFlux, FailoverGroupInner> beginForceFailove * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName); + SyncPoller, FailoverGroupInner> + beginForceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName); /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -672,9 +658,9 @@ SyncPoller, FailoverGroupInner> beginForceFailove /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -683,14 +669,14 @@ SyncPoller, FailoverGroupInner> beginForceFailove * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName); + Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -699,14 +685,14 @@ Mono forceFailoverAllowDataLossAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName); + FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, + String failoverGroupName); /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -716,6 +702,6 @@ FailoverGroupInner forceFailoverAllowDataLoss( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName, Context context); + FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java index 3aaf92afd2555..cc514a14d630e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.sql.models.FirewallRuleList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in FirewallRulesClient. + */ public interface FirewallRulesClient { /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,9 +34,9 @@ public interface FirewallRulesClient { /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +48,9 @@ public interface FirewallRulesClient { /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,27 +63,27 @@ public interface FirewallRulesClient { /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> replaceWithResponseAsync( - String resourceGroupName, String serverName, FirewallRuleList parameters); + Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters); /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -92,11 +94,11 @@ Mono> replaceWithResponseAsync( /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @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. @@ -104,16 +106,16 @@ Mono> replaceWithResponseAsync( * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceWithResponse( - String resourceGroupName, String serverName, FirewallRuleList parameters, Context context); + Response replaceWithResponse(String resourceGroupName, String serverName, + FirewallRuleList parameters, Context context); /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -124,9 +126,9 @@ Response replaceWithResponse( /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,14 +137,14 @@ Response replaceWithResponse( * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName); /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,9 +157,9 @@ Mono> getWithResponseAsync( /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -167,14 +169,14 @@ Mono> getWithResponseAsync( * @return a firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,9 +189,9 @@ Response getWithResponse( /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -199,14 +201,14 @@ Response getWithResponse( * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters); /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -216,14 +218,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters); /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -234,18 +236,14 @@ Mono createOrUpdateAsync( * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters, Context context); /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -255,14 +253,14 @@ Response createOrUpdateWithResponse( * @return a server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters); + FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters); /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,9 +273,9 @@ FirewallRuleInner createOrUpdate( /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -290,9 +288,9 @@ FirewallRuleInner createOrUpdate( /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -302,14 +300,14 @@ FirewallRuleInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java index 8a2bc251b3347..f7b6ee8b981fd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java @@ -14,63 +14,65 @@ import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. + */ public interface GeoBackupPoliciesClient { /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedFlux}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName); /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedIterable}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String serverName, String databaseName); /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedIterable}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable list(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -78,17 +80,17 @@ PagedIterable 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 a Geo backup policy for the given database resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName); /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -98,14 +100,14 @@ Mono> getWithResponseAsync( * @return a Geo backup policy for the given database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName); /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -116,18 +118,14 @@ Mono getAsync( * @return a Geo backup policy for the given database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName, Context context); /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -137,14 +135,14 @@ Response getWithResponse( * @return a Geo backup policy for the given database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - GeoBackupPolicyInner get( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName); + GeoBackupPolicyInner get(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName); /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -155,18 +153,14 @@ GeoBackupPolicyInner get( * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters); /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -177,18 +171,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a Geo backup policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters); /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -200,19 +190,14 @@ Mono createOrUpdateAsync( * @return a Geo backup policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters, Context context); /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -223,10 +208,6 @@ Response createOrUpdateWithResponse( * @return a Geo backup policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - GeoBackupPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters); + GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java index a30f64b347a4e..42ece2341717e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in IPv6FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in IPv6FirewallRulesClient. + */ public interface IPv6FirewallRulesClient { /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,9 +33,9 @@ public interface IPv6FirewallRulesClient { /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ public interface IPv6FirewallRulesClient { /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,9 +62,9 @@ public interface IPv6FirewallRulesClient { /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,14 +73,14 @@ public interface IPv6FirewallRulesClient { * @return an IPv6 firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName); /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,9 +93,9 @@ Mono> getWithResponseAsync( /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -103,14 +105,14 @@ Mono> getWithResponseAsync( * @return an IPv6 firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, Context context); /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,9 +125,9 @@ Response getWithResponse( /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -135,14 +137,14 @@ Response getWithResponse( * @return an IPv6 server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, IPv6FirewallRuleInner parameters); /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -152,14 +154,14 @@ Mono> createOrUpdateWithResponseAsync( * @return an IPv6 server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String firewallRuleName, IPv6FirewallRuleInner parameters); /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -170,18 +172,14 @@ Mono createOrUpdateAsync( * @return an IPv6 server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String firewallRuleName, - IPv6FirewallRuleInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, IPv6FirewallRuleInner parameters, Context context); /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -191,14 +189,14 @@ Response createOrUpdateWithResponse( * @return an IPv6 server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - IPv6FirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters); + IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + IPv6FirewallRuleInner parameters); /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,9 +209,9 @@ IPv6FirewallRuleInner createOrUpdate( /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -226,9 +224,9 @@ IPv6FirewallRuleInner createOrUpdate( /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -238,14 +236,14 @@ IPv6FirewallRuleInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java index 18a4569689fdd..3e3d4ecde138f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. + */ public interface InstanceFailoverGroupsClient { /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface InstanceFailoverGroupsClient { /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface InstanceFailoverGroupsClient { /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,14 +63,14 @@ public interface InstanceFailoverGroupsClient { * @return a list of instance failover groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation( - String resourceGroupName, String locationName, Context context); + PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context); /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ PagedIterable listByLocation( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono> getWithResponseAsync( * @return a failover group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String locationName, String failoverGroupName, Context context); + Response getWithResponse(String resourceGroupName, String locationName, + String failoverGroupName, Context context); /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -141,14 +143,14 @@ Response getWithResponse( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -163,9 +165,9 @@ PollerFlux, InstanceFailoverGroupInner> b /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -180,9 +182,9 @@ SyncPoller, InstanceFailoverGroupInner> b /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -194,17 +196,14 @@ SyncPoller, InstanceFailoverGroupInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InstanceFailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, + String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters, Context context); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -214,14 +213,14 @@ SyncPoller, InstanceFailoverGroupInner> b * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -231,14 +230,14 @@ Mono createOrUpdateAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstanceFailoverGroupInner createOrUpdate( - String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters); + InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locationName, String failoverGroupName, + InstanceFailoverGroupInner parameters); /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -249,18 +248,14 @@ InstanceFailoverGroupInner createOrUpdate( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstanceFailoverGroupInner createOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, - Context context); + InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locationName, String failoverGroupName, + InstanceFailoverGroupInner parameters, Context context); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,14 +264,14 @@ InstanceFailoverGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,14 +280,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String failoverGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,14 +296,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String failoverGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String failoverGroupName); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -318,14 +313,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String failoverGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String failoverGroupName, Context context); /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,9 +333,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,9 +347,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -367,9 +362,9 @@ SyncPoller, Void> beginDelete( /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -378,14 +373,14 @@ SyncPoller, Void> beginDelete( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono>> failoverWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,14 +389,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstanceFailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String locationName, String failoverGroupName); + PollerFlux, InstanceFailoverGroupInner> + beginFailoverAsync(String resourceGroupName, String locationName, String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,14 +405,14 @@ PollerFlux, InstanceFailoverGroupInner> b * @return the {@link SyncPoller} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstanceFailoverGroupInner> beginFailover( - String resourceGroupName, String locationName, String failoverGroupName); + SyncPoller, InstanceFailoverGroupInner> + beginFailover(String resourceGroupName, String locationName, String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -427,14 +422,14 @@ SyncPoller, InstanceFailoverGroupInner> b * @return the {@link SyncPoller} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstanceFailoverGroupInner> beginFailover( - String resourceGroupName, String locationName, String failoverGroupName, Context context); + SyncPoller, InstanceFailoverGroupInner> + beginFailover(String resourceGroupName, String locationName, String failoverGroupName, Context context); /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -443,14 +438,14 @@ SyncPoller, InstanceFailoverGroupInner> b * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono failoverAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono failoverAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -463,9 +458,9 @@ Mono failoverAsync( /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -475,15 +470,15 @@ Mono failoverAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstanceFailoverGroupInner failover( - String resourceGroupName, String locationName, String failoverGroupName, Context context); + InstanceFailoverGroupInner failover(String resourceGroupName, String locationName, String failoverGroupName, + Context context); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -492,15 +487,15 @@ InstanceFailoverGroupInner failover( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,15 +504,15 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync( * @return the {@link PollerFlux} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstanceFailoverGroupInner> beginForceFailoverAllowDataLossAsync( - String resourceGroupName, String locationName, String failoverGroupName); + PollerFlux, InstanceFailoverGroupInner> + beginForceFailoverAllowDataLossAsync(String resourceGroupName, String locationName, String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -526,15 +521,15 @@ PollerFlux, InstanceFailoverGroupInner> b * @return the {@link SyncPoller} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstanceFailoverGroupInner> beginForceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName); + SyncPoller, InstanceFailoverGroupInner> + beginForceFailoverAllowDataLoss(String resourceGroupName, String locationName, String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -550,9 +545,9 @@ SyncPoller, InstanceFailoverGroupInner> b /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -561,15 +556,15 @@ SyncPoller, InstanceFailoverGroupInner> b * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String locationName, String failoverGroupName); + Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String locationName, + String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -578,15 +573,15 @@ Mono forceFailoverAllowDataLossAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstanceFailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName); + InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String locationName, + String failoverGroupName); /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -596,6 +591,6 @@ InstanceFailoverGroupInner forceFailoverAllowDataLoss( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstanceFailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName, Context context); + InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String locationName, + String failoverGroupName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java index 0355b53840fe0..bf5474d6cd373 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java @@ -22,12 +22,14 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in InstancePoolsClient. */ +/** + * An instance of this class provides access to all the operations defined in InstancePoolsClient. + */ public interface InstancePoolsClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** * Gets a list of all instance pools 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. * @return a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. @@ -37,7 +39,7 @@ public interface InstancePoolsClient /** * Gets a list of all instance pools 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. * @return a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. @@ -47,7 +49,7 @@ public interface InstancePoolsClient /** * Gets a list of all instance pools 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. @@ -59,9 +61,9 @@ public interface InstancePoolsClient /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -72,9 +74,9 @@ public interface InstancePoolsClient /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -85,9 +87,9 @@ public interface InstancePoolsClient /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -99,9 +101,9 @@ public interface InstancePoolsClient /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,14 +111,14 @@ public interface InstancePoolsClient * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String instancePoolName); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName); /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,9 +130,9 @@ Mono> getByResourceGroupWithResponseAsync( /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,14 +141,14 @@ Mono> getByResourceGroupWithResponseAsync( * @return an instance pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String instancePoolName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, + Context context); /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,9 +160,9 @@ Response getByResourceGroupWithResponse( /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,14 +171,14 @@ Response getByResourceGroupWithResponse( * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters); /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -185,14 +187,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters); + PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters); /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,14 +203,14 @@ PollerFlux, InstancePoolInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginCreateOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters); + SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters); /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -218,14 +220,14 @@ SyncPoller, InstancePoolInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginCreateOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context); + SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters, Context context); /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,14 +236,14 @@ SyncPoller, InstancePoolInner> beginCreateOrUpdate * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters); /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,9 +256,9 @@ Mono createOrUpdateAsync( /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -266,14 +268,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner createOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context); + InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters, + Context context); /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -285,9 +287,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -299,9 +301,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -313,9 +315,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -328,9 +330,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -342,9 +344,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -355,9 +357,9 @@ InstancePoolInner createOrUpdate( /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -369,9 +371,9 @@ InstancePoolInner createOrUpdate( /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -380,14 +382,14 @@ InstancePoolInner createOrUpdate( * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters); /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -396,14 +398,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstancePoolInner> beginUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); + PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters); /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -412,14 +414,14 @@ PollerFlux, InstancePoolInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginUpdate( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); + SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters); /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -429,14 +431,14 @@ SyncPoller, InstancePoolInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginUpdate( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context); + SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context); /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -445,14 +447,14 @@ SyncPoller, InstancePoolInner> beginUpdate( * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); + Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters); /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,9 +467,9 @@ Mono updateAsync( /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -477,6 +479,6 @@ Mono updateAsync( * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner update( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context); + InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java index 21d2bdc82ef73..3bbb173095c98 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobAgentsClient. + */ public interface JobAgentsClient { /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface JobAgentsClient { /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface JobAgentsClient { /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +68,9 @@ public interface JobAgentsClient { /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ public interface JobAgentsClient { * @return a job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName); /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono> getWithResponseAsync( * @return a job agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -141,14 +143,14 @@ Response getWithResponse( * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentInner parameters); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -158,14 +160,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters); + PollerFlux, JobAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -175,14 +177,14 @@ PollerFlux, JobAgentInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters); + SyncPoller, JobAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -193,14 +195,14 @@ SyncPoller, JobAgentInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context); + SyncPoller, JobAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters, Context context); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -210,14 +212,14 @@ SyncPoller, JobAgentInner> beginCreateOrUpdate( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -227,14 +229,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobAgentInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters); + JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters); /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -245,14 +247,14 @@ JobAgentInner createOrUpdate( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobAgentInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context); + JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters, Context context); /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,14 +263,14 @@ JobAgentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName); /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,14 +279,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String jobAgentName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName); /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,9 +299,9 @@ PollerFlux, Void> beginDeleteAsync( /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -309,14 +311,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String jobAgentName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -329,9 +331,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -343,9 +345,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -358,9 +360,9 @@ SyncPoller, Void> beginDelete( /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -370,14 +372,14 @@ SyncPoller, Void> beginDelete( * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -387,14 +389,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobAgentInner> beginUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); + PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -404,14 +406,14 @@ PollerFlux, JobAgentInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); + SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -422,14 +424,14 @@ SyncPoller, JobAgentInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context); + SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters, Context context); /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -439,14 +441,14 @@ SyncPoller, JobAgentInner> beginUpdate( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters); /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -460,9 +462,9 @@ Mono updateAsync( /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -473,6 +475,6 @@ Mono updateAsync( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobAgentInner update( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context); + JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java index 358e37b0ba656..bb523a8f79350 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.JobCredentialInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobCredentialsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobCredentialsClient. + */ public interface JobCredentialsClient { /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,9 +34,9 @@ public interface JobCredentialsClient { /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,9 +49,9 @@ public interface JobCredentialsClient { /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -59,14 +61,14 @@ public interface JobCredentialsClient { * @return a list of jobs credentials as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context); + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -76,14 +78,14 @@ PagedIterable listByAgent( * @return a jobs credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName); /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -93,14 +95,14 @@ Mono> getWithResponseAsync( * @return a jobs credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String credentialName); /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -111,14 +113,14 @@ Mono getAsync( * @return a jobs credential along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, Context context); /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -132,9 +134,9 @@ Response getWithResponse( /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -143,21 +145,17 @@ 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 stored credential that can be used by a job to connect to target databases along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, JobCredentialInner parameters); /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -166,21 +164,17 @@ Mono> createOrUpdateWithResponseAsync( * @throws com.azure.core.management.exception.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 stored credential that can be used by a job to connect to target databases on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, JobCredentialInner parameters); /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -192,19 +186,14 @@ Mono createOrUpdateAsync( * @return a stored credential that can be used by a job to connect to target databases along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, JobCredentialInner parameters, Context context); /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -215,18 +204,14 @@ Response createOrUpdateWithResponse( * @return a stored credential that can be used by a job to connect to target databases. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobCredentialInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters); + JobCredentialInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, JobCredentialInner parameters); /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -236,14 +221,14 @@ JobCredentialInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String credentialName); /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -257,9 +242,9 @@ Mono> deleteWithResponseAsync( /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -270,14 +255,14 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, Context context); /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java index 0a208a2debf91..1d73775038907 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java @@ -20,13 +20,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobExecutionsClient. + */ public interface JobExecutionsClient { /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -42,23 +44,15 @@ public interface JobExecutionsClient { * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top); + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,9 +65,9 @@ PagedFlux listByAgentAsync( /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,9 +80,9 @@ PagedFlux listByAgentAsync( /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -105,24 +99,15 @@ PagedFlux listByAgentAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context); + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -139,24 +124,15 @@ PagedIterable listByAgent( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top); + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -166,14 +142,14 @@ PagedFlux listByJobAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -183,14 +159,14 @@ PagedFlux listByJobAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -208,25 +184,15 @@ PagedIterable listByJob( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -237,14 +203,14 @@ PagedIterable listByJob( * @return a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -255,14 +221,14 @@ Mono> getWithResponseAsync( * @return a job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId); /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -274,19 +240,14 @@ Mono getAsync( * @return a job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context); /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -297,14 +258,14 @@ Response getWithResponse( * @return a job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner get( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -315,14 +276,14 @@ JobExecutionInner get( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -333,14 +294,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -351,14 +312,14 @@ PollerFlux, JobExecutionInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -370,19 +331,14 @@ SyncPoller, JobExecutionInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context); + SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -393,14 +349,14 @@ SyncPoller, JobExecutionInner> beginCreateOrUpdate * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -411,14 +367,14 @@ Mono createOrUpdateAsync( * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId); /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -430,19 +386,14 @@ JobExecutionInner createOrUpdate( * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context); + JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, Context context); /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -453,14 +404,14 @@ JobExecutionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId); /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -471,14 +422,14 @@ Mono> cancelWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono cancelAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + Mono cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId); /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -490,19 +441,14 @@ Mono cancelAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, Context context); /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -516,9 +462,9 @@ Response cancelWithResponse( /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -528,14 +474,14 @@ Response cancelWithResponse( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName); /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -545,14 +491,14 @@ Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobExecutionInner> beginCreateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PollerFlux, JobExecutionInner> beginCreateAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName); /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -562,14 +508,14 @@ PollerFlux, JobExecutionInner> beginCreateAsync( * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionInner> beginCreate( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + SyncPoller, JobExecutionInner> beginCreate(String resourceGroupName, + String serverName, String jobAgentName, String jobName); /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -580,14 +526,14 @@ SyncPoller, JobExecutionInner> beginCreate( * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionInner> beginCreate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + SyncPoller, JobExecutionInner> beginCreate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, Context context); /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -597,14 +543,14 @@ SyncPoller, JobExecutionInner> beginCreate( * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + Mono createAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -618,9 +564,9 @@ Mono createAsync( /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -631,6 +577,6 @@ Mono createAsync( * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner create( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + JobExecutionInner create(String resourceGroupName, String serverName, String jobAgentName, String jobName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java index 3213e3fd94959..4c0c44bde3beb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java @@ -15,13 +15,15 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobStepExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobStepExecutionsClient. + */ public interface JobStepExecutionsClient { /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -39,25 +41,16 @@ public interface JobStepExecutionsClient { * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -68,14 +61,14 @@ PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -86,14 +79,14 @@ PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -112,26 +105,16 @@ PagedIterable listByJobExecution( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context); + PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context); /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -143,19 +126,14 @@ PagedIterable listByJobExecution( * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName); /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -167,19 +145,14 @@ Mono> getWithResponseAsync( * @return a step execution of a job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName); /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -192,20 +165,14 @@ Mono getAsync( * @return a step execution of a job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, Context context); /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -217,11 +184,6 @@ Response getWithResponse( * @return a step execution of a job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner get( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName); + JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java index 42f9bc9c5d53f..4a17d8ce9f9d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.JobStepInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobStepsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobStepsClient. + */ public interface JobStepsClient { /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -29,14 +31,14 @@ public interface JobStepsClient { * @return all job steps for a job's current version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -46,14 +48,14 @@ PagedFlux listByJobAsync( * @return all job steps for a job's current version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -64,14 +66,14 @@ PagedIterable listByJob( * @return all job steps for a job's current version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context); /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -79,18 +81,18 @@ PagedIterable listByJob( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 job step in a job's current version along with {@link Response} on successful completion of {@link - * Mono}. + * @return a job step in a job's current version along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName); /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -101,14 +103,14 @@ Mono> getWithResponseAsync( * @return a job step in a job's current version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName); /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -120,19 +122,14 @@ Mono getAsync( * @return a job step in a job's current version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, Context context); /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -147,9 +144,9 @@ Response getWithResponse( /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -161,19 +158,14 @@ Response getWithResponse( * @return a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, JobStepInner parameters); /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -185,19 +177,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a job step on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, JobStepInner parameters); /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -210,20 +197,14 @@ Mono createOrUpdateAsync( * @return a job step along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, JobStepInner parameters, Context context); /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -235,19 +216,14 @@ Response createOrUpdateWithResponse( * @return a job step. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobStepInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters); + JobStepInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName, JobStepInner parameters); /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -258,14 +234,14 @@ JobStepInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName); /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -276,14 +252,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName); + Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName); /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -295,19 +271,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName, Context context); /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -321,9 +292,9 @@ Response deleteWithResponse( /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -334,14 +305,14 @@ Response deleteWithResponse( * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByVersionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion); + PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion); /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -352,14 +323,14 @@ PagedFlux listByVersionAsync( * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVersion( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion); + PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion); /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -371,19 +342,14 @@ PagedIterable listByVersion( * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVersion( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context); + PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context); /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -395,19 +361,14 @@ PagedIterable listByVersion( * @return the specified version of a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByVersionWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName); + Mono> getByVersionWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, String stepName); /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -419,19 +380,14 @@ Mono> getByVersionWithResponseAsync( * @return the specified version of a job step on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByVersionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName); + Mono getByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, String stepName); /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -444,20 +400,14 @@ Mono getByVersionAsync( * @return the specified version of a job step along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByVersionWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName, - Context context); + Response getByVersionWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, String stepName, Context context); /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -469,11 +419,6 @@ Response getByVersionWithResponse( * @return the specified version of a job step. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobStepInner getByVersion( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName); + JobStepInner getByVersion(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion, String stepName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java index e57bd6590f55b..5db89980a2ac9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java @@ -15,13 +15,15 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobTargetExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobTargetExecutionsClient. + */ public interface JobTargetExecutionsClient { /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -40,26 +42,16 @@ public interface JobTargetExecutionsClient { * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByStepAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -71,19 +63,14 @@ PagedFlux listByStepAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByStepAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName); + PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName); /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -95,19 +82,14 @@ PagedFlux listByStepAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStep( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName); + PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName); /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -127,27 +109,16 @@ PagedIterable listByStep( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStep( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context); + PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context); /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -160,20 +131,14 @@ PagedIterable listByStep( * @return a target execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId); /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -186,20 +151,14 @@ Mono> getWithResponseAsync( * @return a target execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId); /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -213,21 +172,14 @@ Mono getAsync( * @return a target execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context); /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -240,20 +192,14 @@ Response getWithResponse( * @return a target execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner get( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId); + JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId); /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -271,25 +217,16 @@ JobExecutionInner get( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -300,14 +237,14 @@ PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -318,14 +255,14 @@ PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); + PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -344,18 +281,8 @@ PagedIterable listByJobExecution( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context); + PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java index 5750d344962e1..e9ca1a3c1da5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobTargetGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobTargetGroupsClient. + */ public interface JobTargetGroupsClient { /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,9 +34,9 @@ public interface JobTargetGroupsClient { /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,9 +49,9 @@ public interface JobTargetGroupsClient { /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -59,14 +61,14 @@ public interface JobTargetGroupsClient { * @return all target groups in an agent as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context); + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -76,14 +78,14 @@ PagedIterable listByAgent( * @return a target group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName); /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -93,14 +95,14 @@ Mono> getWithResponseAsync( * @return a target group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName); /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -111,14 +113,14 @@ Mono getAsync( * @return a target group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, Context context); /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -132,9 +134,9 @@ Response getWithResponse( /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -145,18 +147,14 @@ Response getWithResponse( * @return a group of job targets along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, JobTargetGroupInner parameters); /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -167,18 +165,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a group of job targets on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, JobTargetGroupInner parameters); /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -190,19 +184,14 @@ Mono createOrUpdateAsync( * @return a group of job targets along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, JobTargetGroupInner parameters, Context context); /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -213,18 +202,14 @@ Response createOrUpdateWithResponse( * @return a group of job targets. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobTargetGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters); + JobTargetGroupInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, JobTargetGroupInner parameters); /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -234,14 +219,14 @@ JobTargetGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName); /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -255,9 +240,9 @@ Mono> deleteWithResponseAsync( /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -268,14 +253,14 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, Context context); /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java index 2f7cc39233d80..36aa7e8b048a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.JobVersionInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobVersionsClient. + */ public interface JobVersionsClient { /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -29,14 +31,14 @@ public interface JobVersionsClient { * @return all versions of a job as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -46,14 +48,14 @@ PagedFlux listByJobAsync( * @return all versions of a job as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -64,14 +66,14 @@ PagedIterable listByJob( * @return all versions of a job as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context); /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -82,14 +84,14 @@ PagedIterable listByJob( * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion); /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -100,14 +102,14 @@ Mono> getWithResponseAsync( * @return a job version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion); + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion); /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -119,19 +121,14 @@ Mono getAsync( * @return a job version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context); /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -142,6 +139,6 @@ Response getWithResponse( * @return a job version. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobVersionInner get( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion); + JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java index 1a67b748d9fb6..43d4743598ce3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.JobInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public interface JobsClient { /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,9 +34,9 @@ public interface JobsClient { /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,9 +49,9 @@ public interface JobsClient { /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -59,14 +61,14 @@ public interface JobsClient { * @return a list of jobs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context); + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -76,14 +78,14 @@ PagedIterable listByAgent( * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -110,14 +112,14 @@ Mono> getWithResponseAsync( * @return a job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, String jobName, + Context context); /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -131,9 +133,9 @@ Response getWithResponse( /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -144,14 +146,14 @@ Response getWithResponse( * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, JobInner parameters); /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -162,14 +164,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + JobInner parameters); /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -181,19 +183,14 @@ Mono createOrUpdateAsync( * @return a job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - JobInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, JobInner parameters, Context context); /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -204,14 +201,14 @@ Response createOrUpdateWithResponse( * @return a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters); + JobInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + JobInner parameters); /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -221,14 +218,14 @@ JobInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -242,9 +239,9 @@ Mono> deleteWithResponseAsync( /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -255,14 +252,14 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, String jobName, + Context context); /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java index b7d2a5038c0f8..beab10c03b806 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LedgerDigestUploadsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LedgerDigestUploadsOperationsClient. + */ public interface LedgerDigestUploadsOperationsClient { /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,14 +36,14 @@ public interface LedgerDigestUploadsOperationsClient { * @return all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,14 +52,14 @@ PagedFlux listByDatabaseAsync( * @return all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -67,14 +69,14 @@ PagedIterable listByDatabase( * @return all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -82,17 +84,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads); /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -102,14 +104,14 @@ Mono> getWithResponseAsync( * @return the current ledger digest upload configuration for a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads); /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -120,18 +122,14 @@ Mono getAsync( * @return the current ledger digest upload configuration for a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, Context context); /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -141,41 +139,37 @@ Response getWithResponse( * @return the current ledger digest upload configuration for a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - LedgerDigestUploadsInner get( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + LedgerDigestUploadsInner get(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,21 +177,18 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LedgerDigestUploadsInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -205,21 +196,18 @@ PollerFlux, LedgerDigestUploadsInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @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. @@ -228,66 +216,54 @@ SyncPoller, LedgerDigestUploadsInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context); + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, + LedgerDigestUploadsInner parameters, Context context); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - LedgerDigestUploadsInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters); + LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters); /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @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. @@ -295,19 +271,14 @@ LedgerDigestUploadsInner createOrUpdate( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - LedgerDigestUploadsInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context); + LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters, Context context); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -315,17 +286,17 @@ LedgerDigestUploadsInner createOrUpdate( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> disableWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -340,9 +311,9 @@ PollerFlux, LedgerDigestUploadsInner> begin /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -352,14 +323,14 @@ PollerFlux, LedgerDigestUploadsInner> begin * @return the {@link SyncPoller} for polling of azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LedgerDigestUploadsInner> beginDisable( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + SyncPoller, LedgerDigestUploadsInner> beginDisable(String resourceGroupName, + String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -370,18 +341,14 @@ SyncPoller, LedgerDigestUploadsInner> begin * @return the {@link SyncPoller} for polling of azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LedgerDigestUploadsInner> beginDisable( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context); + SyncPoller, LedgerDigestUploadsInner> beginDisable(String resourceGroupName, + String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -391,14 +358,14 @@ SyncPoller, LedgerDigestUploadsInner> begin * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + Mono disableAsync(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -408,14 +375,14 @@ Mono disableAsync( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - LedgerDigestUploadsInner disable( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads); + LedgerDigestUploadsInner disable(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads); /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -426,10 +393,6 @@ LedgerDigestUploadsInner disable( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - LedgerDigestUploadsInner disable( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context); + LedgerDigestUploadsInner disable(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java index ee8156e2bf992..6d4bb0bc95282 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java @@ -22,11 +22,13 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LongTermRetentionBackupsClient. */ +/** + * An instance of this class provides access to all the operations defined in LongTermRetentionBackupsClient. + */ public interface LongTermRetentionBackupsClient { /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -36,12 +38,12 @@ public interface LongTermRetentionBackupsClient { * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByLocationAsync(String locationName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState); /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -53,7 +55,7 @@ PagedFlux listByLocationAsync( /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,7 +67,7 @@ PagedFlux listByLocationAsync( /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -76,12 +78,12 @@ PagedFlux listByLocationAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); + PagedIterable listByLocation(String locationName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context); /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -92,15 +94,12 @@ PagedIterable listByLocation( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByServerAsync(String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,7 +112,7 @@ PagedFlux listByServerAsync( /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,7 +125,7 @@ PagedFlux listByServerAsync( /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -138,16 +137,12 @@ PagedFlux listByServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByServer(String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -159,16 +154,12 @@ PagedIterable listByServer( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -178,12 +169,12 @@ PagedFlux listByDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); + PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName); /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -193,12 +184,12 @@ PagedFlux listByDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); + PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName); /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -211,17 +202,13 @@ PagedIterable listByDatabase( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -232,15 +219,12 @@ PagedIterable listByDatabase( * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -251,15 +235,12 @@ Mono> getWithResponseAsync( * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono getAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -271,16 +252,12 @@ Mono getAsync( * @return a long term retention backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + Response getWithResponse(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context); /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -291,15 +268,12 @@ Response getWithResponse( * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner get( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -310,15 +284,12 @@ LongTermRetentionBackupInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono>> deleteWithResponseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -329,15 +300,12 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -348,15 +316,12 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -368,16 +333,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -388,15 +349,12 @@ SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono deleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -406,15 +364,12 @@ Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -425,16 +380,12 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -444,19 +395,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 a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> copyWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + Mono>> copyWithResponseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -469,16 +416,12 @@ Mono>> copyWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionBackupOperationResultInner> - beginCopyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + beginCopyAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -491,16 +434,12 @@ Mono>> copyWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + beginCopy(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -514,17 +453,12 @@ Mono>> copyWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context); + beginCopy(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -536,16 +470,12 @@ Mono>> copyWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono copyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + Mono copyAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -557,16 +487,12 @@ Mono copyAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + LongTermRetentionBackupOperationResultInner copy(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -579,17 +505,13 @@ LongTermRetentionBackupOperationResultInner copy( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, + LongTermRetentionBackupOperationResultInner copy(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -599,19 +521,15 @@ LongTermRetentionBackupOperationResultInner copy( * @throws com.azure.core.management.exception.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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + Mono>> updateWithResponseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -624,16 +542,12 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -646,16 +560,12 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -669,17 +579,12 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context); + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -691,16 +596,13 @@ Mono>> updateWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -712,16 +614,12 @@ Mono updateAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner update( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -734,19 +632,15 @@ LongTermRetentionBackupOperationResultInner update( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner update( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, + LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -756,14 +650,14 @@ LongTermRetentionBackupOperationResultInner update( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -771,14 +665,14 @@ PagedFlux listByResourceGroupLocationAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -786,14 +680,14 @@ PagedFlux listByResourceGroupLocationAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation( - String resourceGroupName, String locationName); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -804,18 +698,14 @@ PagedIterable listByResourceGroupLocation( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -826,18 +716,15 @@ PagedIterable listByResourceGroupLocation( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupServerAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, + PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -846,14 +733,14 @@ PagedFlux listByResourceGroupServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupServerAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName); + PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName); /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -862,14 +749,14 @@ PagedFlux listByResourceGroupServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupServer( - String resourceGroupName, String locationName, String longTermRetentionServerName); + PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, + String longTermRetentionServerName); /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -881,19 +768,15 @@ PagedIterable listByResourceGroupServer( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupServer( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -905,19 +788,15 @@ PagedIterable listByResourceGroupServer( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -927,17 +806,14 @@ PagedFlux listByResourceGroupDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName); + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -947,17 +823,14 @@ PagedFlux listByResourceGroupDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -970,20 +843,15 @@ PagedIterable listByResourceGroupDatabase( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -994,18 +862,15 @@ PagedIterable listByResourceGroupDatabase( * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1016,18 +881,14 @@ Mono> getByResourceGroupWithResponseAsync * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono getByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1039,19 +900,14 @@ Mono getByResourceGroupAsync( * @return a long term retention backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1062,18 +918,14 @@ Response getByResourceGroupWithResponse( * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner getByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1084,18 +936,15 @@ LongTermRetentionBackupInner getByResourceGroup( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1106,18 +955,14 @@ Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1128,18 +973,14 @@ PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1151,19 +992,14 @@ SyncPoller, Void> beginDeleteByResourceGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1174,18 +1010,14 @@ SyncPoller, Void> beginDeleteByResourceGroup( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1195,18 +1027,14 @@ Mono deleteByResourceGroupAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName); + void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1217,19 +1045,14 @@ void deleteByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context); + void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1239,22 +1062,18 @@ void deleteByResourceGroup( * @throws com.azure.core.management.exception.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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> copyByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1267,19 +1086,14 @@ Mono>> copyByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1292,19 +1106,14 @@ Mono>> copyByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1318,20 +1127,15 @@ Mono>> copyByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1343,19 +1147,15 @@ Mono>> copyByResourceGroupWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono copyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters); + Mono copyByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1367,19 +1167,15 @@ Mono copyByResourceGroupAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1392,20 +1188,15 @@ LongTermRetentionBackupOperationResultInner copyByResourceGroup( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context); + LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters, Context context); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1415,22 +1206,18 @@ LongTermRetentionBackupOperationResultInner copyByResourceGroup( * @throws com.azure.core.management.exception.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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1443,19 +1230,15 @@ Mono>> updateByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1468,19 +1251,15 @@ Mono>> updateByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1494,20 +1273,15 @@ Mono>> updateByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1519,19 +1293,15 @@ Mono>> updateByResourceGroupWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters); + Mono updateByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1543,19 +1313,15 @@ Mono updateByResourceGroupAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner updateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1568,12 +1334,7 @@ LongTermRetentionBackupOperationResultInner updateByResourceGroup( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner updateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context); + LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java index 0911c9f3b5d77..be32d4328413b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java @@ -26,49 +26,49 @@ public interface LongTermRetentionManagedInstanceBackupsClient { /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByLocationAsync(String locationName); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByLocation(String locationName); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -76,16 +76,16 @@ PagedFlux listByLocationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); + PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -94,52 +94,48 @@ PagedIterable listByLocation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String locationName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String locationName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -149,21 +145,17 @@ PagedIterable listByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -172,15 +164,15 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName); + Mono> getWithResponseAsync(String locationName, + String managedInstanceName, String databaseName, String backupName); /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -191,12 +183,12 @@ Mono> getWithResponseAsync * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String locationName, String managedInstanceName, String databaseName, String backupName); + Mono getAsync(String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -208,12 +200,12 @@ Mono getAsync( * @return a long term retention backup for a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context); + Response getWithResponse(String locationName, + String managedInstanceName, String databaseName, String backupName, Context context); /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -224,12 +216,12 @@ Response getWithResponse( * @return a long term retention backup for a managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionBackupInner get( - String locationName, String managedInstanceName, String databaseName, String backupName); + ManagedInstanceLongTermRetentionBackupInner get(String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -240,12 +232,12 @@ ManagedInstanceLongTermRetentionBackupInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName); + Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -256,12 +248,12 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String locationName, String managedInstanceName, String databaseName, String backupName); + PollerFlux, Void> beginDeleteAsync(String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -272,12 +264,12 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String locationName, String managedInstanceName, String databaseName, String backupName); + SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, String databaseName, + String backupName); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -289,12 +281,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context); + SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, String databaseName, + String backupName, Context context); /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -309,7 +301,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -323,7 +315,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -334,12 +326,12 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context); + void delete(String locationName, String managedInstanceName, String databaseName, String backupName, + Context context); /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -347,46 +339,46 @@ void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String locationName, String managedInstanceName); + PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName); /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String locationName, String managedInstanceName); + PagedIterable listByInstance(String locationName, + String managedInstanceName); /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -395,72 +387,68 @@ PagedIterable listByInstance( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByInstance(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation( - String resourceGroupName, String locationName); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -468,22 +456,18 @@ PagedIterable listByResourceGroupLo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -492,59 +476,55 @@ PagedIterable listByResourceGroupLo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName); + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -554,24 +534,19 @@ PagedIterable listByResourceGroupDa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context); /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -580,21 +555,18 @@ PagedIterable listByResourceGroupDa * @throws com.azure.core.management.exception.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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, String backupName); /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -605,18 +577,14 @@ Mono> getByResourceGroupWi * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + Mono getByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName); /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -628,19 +596,14 @@ Mono getByResourceGroupAsync( * @return a long term retention backup for a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context); /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -651,18 +614,14 @@ Response getByResourceGroupWithResp * @return a long term retention backup for a managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionBackupInner getByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -673,18 +632,14 @@ ManagedInstanceLongTermRetentionBackupInner getByResourceGroup( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -695,18 +650,14 @@ Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -717,18 +668,14 @@ PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -740,19 +687,14 @@ SyncPoller, Void> beginDeleteByResourceGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -763,18 +705,14 @@ SyncPoller, Void> beginDeleteByResourceGroup( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -784,18 +722,14 @@ Mono deleteByResourceGroupAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName); + void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName); /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -806,19 +740,14 @@ void deleteByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context); + void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName, Context context); /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -826,56 +755,52 @@ void deleteByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupInstanceAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByResourceGroupInstanceAsync(String resourceGroupName, + String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupInstanceAsync( - String resourceGroupName, String locationName, String managedInstanceName); + PagedFlux listByResourceGroupInstanceAsync(String resourceGroupName, + String locationName, String managedInstanceName); /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupInstance( - String resourceGroupName, String locationName, String managedInstanceName); + PagedIterable listByResourceGroupInstance(String resourceGroupName, + String locationName, String managedInstanceName); /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -884,15 +809,11 @@ PagedIterable listByResourceGroupIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupInstance( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + PagedIterable listByResourceGroupInstance(String resourceGroupName, + String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java index cd6c0eda9e69a..6d4e60ed8ddb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LongTermRetentionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in LongTermRetentionPoliciesClient. + */ public interface LongTermRetentionPoliciesClient { /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,14 +36,14 @@ public interface LongTermRetentionPoliciesClient { * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,14 +52,14 @@ PagedFlux listByDatabaseAsync( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -67,32 +69,32 @@ PagedIterable listByDatabase( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's long term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's long term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -102,14 +104,14 @@ Mono> getWithResponseAsync( * @return a database's long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -120,18 +122,14 @@ Mono getAsync( * @return a database's long term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, Context context); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -141,14 +139,14 @@ Response getWithResponse( * @return a database's long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionPolicyInner get( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName); + LongTermRetentionPolicyInner get(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -159,18 +157,14 @@ LongTermRetentionPolicyInner get( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -182,17 +176,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -204,17 +195,14 @@ PollerFlux, LongTermRetentionPolicyInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -227,18 +215,14 @@ SyncPoller, LongTermRetentionPolicyInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context); + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, + LongTermRetentionPolicyInner parameters, Context context); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -249,18 +233,14 @@ SyncPoller, LongTermRetentionPolicyInne * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -271,18 +251,14 @@ Mono createOrUpdateAsync( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters); + LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -294,11 +270,6 @@ LongTermRetentionPolicyInner createOrUpdate( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context); + LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java index 0db2e04b7b625..d9190b7ba63db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java @@ -17,27 +17,27 @@ public interface MaintenanceWindowOptionsOperationsClient { /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available maintenance windows along with {@link Response} on successful completion of {@link - * Mono}. + * @return a list of available maintenance windows along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowOptionsName); /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -47,14 +47,14 @@ Mono> getWithResponseAsync( * @return a list of available maintenance windows on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowOptionsName); /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -65,18 +65,14 @@ Mono getAsync( * @return a list of available maintenance windows along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowOptionsName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowOptionsName, Context context); /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -86,6 +82,6 @@ Response getWithResponse( * @return a list of available maintenance windows. */ @ServiceMethod(returns = ReturnType.SINGLE) - MaintenanceWindowOptionsInner get( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName); + MaintenanceWindowOptionsInner get(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowOptionsName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java index c0f923b55c313..3ce570cc436ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java @@ -11,13 +11,15 @@ import com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MaintenanceWindowsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in MaintenanceWindowsOperationsClient. + */ public interface MaintenanceWindowsOperationsClient { /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -25,17 +27,17 @@ public interface MaintenanceWindowsOperationsClient { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return maintenance windows settings for a database along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName); /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -45,14 +47,14 @@ Mono> getWithResponseAsync( * @return maintenance windows settings for a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName); /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -63,18 +65,14 @@ Mono getAsync( * @return maintenance windows settings for a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, Context context); /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -84,62 +82,54 @@ Response getWithResponse( * @return maintenance windows settings for a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - MaintenanceWindowsInner get( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName); + MaintenanceWindowsInner get(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName); /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName, MaintenanceWindowsInner parameters); /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, MaintenanceWindowsInner parameters); /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @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. @@ -147,32 +137,23 @@ Mono createOrUpdateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, MaintenanceWindowsInner parameters, Context context); /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, + void createOrUpdate(String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName, MaintenanceWindowsInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java index 48c248ccbe030..b181409705635 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java @@ -26,9 +26,9 @@ public interface ManagedBackupShortTermRetentionPoliciesClient { /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,14 +37,14 @@ public interface ManagedBackupShortTermRetentionPoliciesClient { * @return a managed database's short term retention policy list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,14 +53,14 @@ PagedFlux listByDatabaseAsync( * @return a managed database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -70,14 +70,14 @@ PagedIterable listByDatabase( * @return a managed database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -85,20 +85,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 managed database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName); /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -108,17 +105,14 @@ Mono> getWithResponseAsync( * @return a managed database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName); /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -129,18 +123,15 @@ Mono getAsync( * @return a managed database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, Context context); /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -150,17 +141,14 @@ Response getWithResponse( * @return a managed database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName); + ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -171,18 +159,15 @@ ManagedBackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -194,18 +179,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -217,18 +198,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -241,19 +218,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -264,18 +237,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -286,18 +256,15 @@ Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -309,19 +276,15 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context); + ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -332,18 +295,15 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -355,18 +315,14 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -378,18 +334,14 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -402,19 +354,15 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -425,18 +373,15 @@ Mono>> updateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + Mono updateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -447,18 +392,15 @@ Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -470,11 +412,7 @@ ManagedBackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context); + ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java index 178bb388351fc..30e290f0521db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java @@ -14,19 +14,21 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseColumnsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseColumnsClient. + */ public interface ManagedDatabaseColumnsClient { /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,21 +36,15 @@ public interface ManagedDatabaseColumnsClient { * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, String skiptoken); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,14 +53,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,20 +69,20 @@ PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,22 +91,15 @@ PagedIterable listByDatabase( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -122,19 +111,14 @@ PagedIterable listByDatabase( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTableAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter); + PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String filter); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -145,14 +129,14 @@ PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTableAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName); + PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -163,14 +147,14 @@ PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTable( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName); + PagedIterable listByTable(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName); /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -183,20 +167,14 @@ PagedIterable listByTable( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTable( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context); + PagedIterable listByTable(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String filter, Context context); /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -208,19 +186,14 @@ PagedIterable listByTable( * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -232,19 +205,14 @@ Mono> getWithResponseAsync( * @return managed database column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -257,20 +225,14 @@ Mono getAsync( * @return managed database column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -282,11 +244,6 @@ Response getWithResponse( * @return managed database column. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseColumnInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java index 6ac761d8d74a6..e13668cf1e953 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java @@ -15,13 +15,15 @@ import com.azure.resourcemanager.sql.models.QueryTimeGrainType; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseQueriesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseQueriesClient. + */ public interface ManagedDatabaseQueriesClient { /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -31,14 +33,14 @@ public interface ManagedDatabaseQueriesClient { * @return query by query id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId); /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -48,14 +50,14 @@ Mono> getWithResponseAsync( * @return query by query id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String queryId); /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -66,14 +68,14 @@ Mono getAsync( * @return query by query id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, Context context); /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -83,14 +85,14 @@ Response getWithResponse( * @return query by query id. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceQueryInner get( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId); + ManagedInstanceQueryInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String queryId); /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -103,20 +105,14 @@ ManagedInstanceQueryInner get( * @return query execution statistics by query id as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByQueryAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval); + PagedFlux listByQueryAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval); /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -126,14 +122,14 @@ PagedFlux listByQueryAsync( * @return query execution statistics by query id as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByQueryAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId); + PagedFlux listByQueryAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId); /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -143,14 +139,14 @@ PagedFlux listByQueryAsync( * @return query execution statistics by query id as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByQuery( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId); + PagedIterable listByQuery(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId); /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -164,13 +160,7 @@ PagedIterable listByQuery( * @return query execution statistics by query id as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByQuery( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval, + PagedIterable listByQuery(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java index b2435d9e3c8fe..77efc6da99427 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java @@ -18,52 +18,46 @@ public interface ManagedDatabaseRecommendedSensitivityLabelsClient { /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, RecommendedSensitivityLabelUpdateList parameters); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, RecommendedSensitivityLabelUpdateList parameters); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @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. @@ -71,29 +65,22 @@ Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + RecommendedSensitivityLabelUpdateList parameters, Context context); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void update(String resourceGroupName, String managedInstanceName, String databaseName, RecommendedSensitivityLabelUpdateList parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java index e704738e833db..a0f9883f87d31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java @@ -12,13 +12,15 @@ import com.azure.resourcemanager.sql.models.RestoreDetailsName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseRestoreDetailsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseRestoreDetailsClient. + */ public interface ManagedDatabaseRestoreDetailsClient { /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -28,17 +30,14 @@ public interface ManagedDatabaseRestoreDetailsClient { * @return managed database restore details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, RestoreDetailsName restoreDetailsName); /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -48,17 +47,14 @@ Mono> getWithResponseAsync( * @return managed database restore details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, RestoreDetailsName restoreDetailsName); /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -69,18 +65,14 @@ Mono getAsync( * @return managed database restore details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, RestoreDetailsName restoreDetailsName, Context context); /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -90,9 +82,6 @@ Response getWithResponse( * @return managed database restore details. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseRestoreDetailsResultInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName); + ManagedDatabaseRestoreDetailsResultInner get(String resourceGroupName, String managedInstanceName, + String databaseName, RestoreDetailsName restoreDetailsName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java index 8ea59b490b239..c44f2ff44e7cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseSchemasClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseSchemasClient. + */ public interface ManagedDatabaseSchemasClient { /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -29,14 +31,14 @@ public interface ManagedDatabaseSchemasClient { * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter); /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,14 +47,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,14 +63,14 @@ PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -79,14 +81,14 @@ PagedIterable listByDatabase( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context); /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -96,14 +98,14 @@ PagedIterable listByDatabase( * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -113,14 +115,14 @@ Mono> getWithResponseAsync( * @return managed database schema on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName); /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -131,14 +133,14 @@ Mono getAsync( * @return managed database schema along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, Context context); /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -148,6 +150,6 @@ Response getWithResponse( * @return managed database schema. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSchemaInner get( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName); + DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java index f873759ffbdde..8816ca4101599 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java @@ -21,9 +21,9 @@ public interface ManagedDatabaseSecurityAlertPoliciesClient { /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,14 +32,14 @@ public interface ManagedDatabaseSecurityAlertPoliciesClient { * @return a list of managed database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,14 +48,14 @@ PagedFlux listByDatabaseAsync( * @return a list of managed database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @param context The context to associate with this operation. @@ -65,35 +65,32 @@ PagedIterable listByDatabase( * @return a list of managed database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed database's security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database's security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -103,17 +100,14 @@ Mono> getWithResponseAsync( * @return a managed database's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -124,18 +118,15 @@ Mono getAsync( * @return a managed database's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context); /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -145,17 +136,14 @@ Response getWithResponse( * @return a managed database's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseSecurityAlertPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName); + ManagedDatabaseSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -163,22 +151,19 @@ ManagedDatabaseSecurityAlertPolicyInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed database security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -189,18 +174,15 @@ Mono> createOrUpdateWithRespon * @return a managed database security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -212,19 +194,15 @@ Mono createOrUpdateAsync( * @return a managed database security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - ManagedDatabaseSecurityAlertPolicyInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, + ManagedDatabaseSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -235,10 +213,7 @@ Response createOrUpdateWithResponse( * @return a managed database security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + ManagedDatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java index 38f3d0a8c1bb5..b8790340f30b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SecurityEventInner; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseSecurityEventsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseSecurityEventsClient. + */ public interface ManagedDatabaseSecurityEventsClient { /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -30,20 +32,14 @@ public interface ManagedDatabaseSecurityEventsClient { * @return a list of security events as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Long skip, Long top, String skiptoken); /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,14 +48,14 @@ PagedFlux listByDatabaseAsync( * @return a list of security events as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,14 +64,14 @@ PagedFlux listByDatabaseAsync( * @return a list of security events as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -89,13 +85,6 @@ PagedIterable listByDatabase( * @return a list of security events as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken, - Context context); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Long skip, Long top, String skiptoken, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java index 6fe1c08fab932..9d6bb1b6c00d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java @@ -21,9 +21,9 @@ public interface ManagedDatabaseSensitivityLabelsClient { /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -35,19 +35,14 @@ public interface ManagedDatabaseSensitivityLabelsClient { * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter); + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean count, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,14 +51,14 @@ PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,14 +67,14 @@ PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -92,63 +87,51 @@ PagedIterable listCurrentByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter, - Context context); + PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean count, String filter, Context context); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SensitivityLabelUpdateList parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList parameters); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, SensitivityLabelUpdateList parameters); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @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. @@ -156,37 +139,30 @@ Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters, Context context); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void update(String resourceGroupName, String managedInstanceName, String databaseName, SensitivityLabelUpdateList parameters); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -198,19 +174,15 @@ void update( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,14 +191,14 @@ PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,14 +207,14 @@ PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -255,20 +227,14 @@ PagedIterable listRecommendedByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context); + PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -278,24 +244,19 @@ PagedIterable listRecommendedByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -308,20 +269,14 @@ Mono> getWithResponseAsync( * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -335,21 +290,15 @@ Mono getAsync( * @return the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, - Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelSource sensitivityLabelSource, Context context); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -362,20 +311,14 @@ Response getWithResponse( * @return the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource); + SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -388,20 +331,15 @@ SensitivityLabelInner get( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -414,20 +352,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -441,21 +373,15 @@ Mono createOrUpdateAsync( * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, + Response createOrUpdateWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, Context context); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -468,20 +394,14 @@ Response createOrUpdateWithResponse( * @return a sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters); + SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -493,19 +413,14 @@ SensitivityLabelInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -517,19 +432,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -542,20 +452,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -566,19 +470,14 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -590,19 +489,14 @@ void delete( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -614,19 +508,14 @@ Mono> disableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableRecommendationAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -639,20 +528,14 @@ Mono disableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response disableRecommendationWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -663,19 +546,14 @@ Response disableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void disableRecommendation( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -687,19 +565,14 @@ void disableRecommendation( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -711,19 +584,14 @@ Mono> enableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono enableRecommendationAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -736,20 +604,14 @@ Mono enableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response enableRecommendationWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -760,19 +622,14 @@ Response enableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void enableRecommendation( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName); + void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -782,14 +639,14 @@ void enableRecommendation( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -798,14 +655,14 @@ PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -814,14 +671,14 @@ PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -832,6 +689,6 @@ PagedIterable listByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context); + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java index 83d60b4a03c75..46e6b116c67f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseTablesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseTablesClient. + */ public interface ManagedDatabaseTablesClient { /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -30,14 +32,14 @@ public interface ManagedDatabaseTablesClient { * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String filter); + PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter); /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -47,14 +49,14 @@ PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName); + PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -64,14 +66,14 @@ PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName); + PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -83,19 +85,14 @@ PagedIterable listBySchema( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String filter, - Context context); + PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context); /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -106,14 +103,14 @@ PagedIterable listBySchema( * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName); /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -124,14 +121,14 @@ Mono> getWithResponseAsync( * @return managed database table on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName); /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -143,19 +140,14 @@ Mono getAsync( * @return managed database table along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, Context context); /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -166,6 +158,6 @@ Response getWithResponse( * @return managed database table. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseTableInner get( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName); + DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java index 63b5db9386f74..d88d3dca21bb3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java @@ -21,9 +21,9 @@ public interface ManagedDatabaseTransparentDataEncryptionsClient { /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,49 +32,49 @@ public interface ManagedDatabaseTransparentDataEncryptionsClient { * @return a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed database's transparent data encryptions as paginated response with {@link - * PagedIterable}. + * @return a list of managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed database's transparent data encryptions as paginated response with {@link - * PagedIterable}. + * @return a list of managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -82,20 +82,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 managed database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName); /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -105,17 +102,14 @@ Mono> getWithResponseAsync( * @return a managed database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName); /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -126,18 +120,14 @@ Mono getAsync( * @return a managed database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context); /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -147,17 +137,14 @@ Response getWithResponse( * @return a managed database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedTransparentDataEncryptionInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, + ManagedTransparentDataEncryptionInner get(String resourceGroupName, String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName); /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -166,21 +153,18 @@ ManagedTransparentDataEncryptionInner 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 managed database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters); /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -191,18 +175,15 @@ Mono> createOrUpdateWithResponse * @return a managed database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters); /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -214,19 +195,15 @@ Mono createOrUpdateAsync( * @return a managed database transparent data encryption state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, + ManagedTransparentDataEncryptionInner parameters, Context context); /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -237,10 +214,6 @@ Response createOrUpdateWithResponse( * @return a managed database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters); + ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java index cee432b5daa27..716613463978d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -20,66 +20,58 @@ public interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName); + Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -87,79 +79,67 @@ Mono getAsync( * @return a database's vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 database's vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentRuleBaselineInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -167,26 +147,22 @@ Mono> createOrUpdateW * @return a database vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,27 +171,22 @@ Mono createOrUpdateAsync( * @return a database vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context); /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -223,76 +194,64 @@ Response createOrUpdateWithRes * @return a database vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, + DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -300,36 +259,27 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context); + Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + void delete(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java index d9f64a3587aa0..12c0f076fff71 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java @@ -27,9 +27,9 @@ public interface ManagedDatabaseVulnerabilityAssessmentScansClient { /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -39,17 +39,14 @@ public interface ManagedDatabaseVulnerabilityAssessmentScansClient { * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -59,17 +56,14 @@ PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -80,18 +74,15 @@ PagedIterable listByDatabase( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -100,21 +91,18 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -125,18 +113,14 @@ Mono> getWithResponseAsync( * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -148,19 +132,15 @@ Mono getAsync( * @return a vulnerability assessment scan record of a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context); /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -171,18 +151,14 @@ Response getWithResponse( * @return a vulnerability assessment scan record of a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - VulnerabilityAssessmentScanRecordInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -191,21 +167,18 @@ VulnerabilityAssessmentScanRecordInner 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> exportWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono> exportWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -216,18 +189,15 @@ Mono> exportWithRespon * @return a database Vulnerability Assessment scan export resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono exportAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono exportAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -239,19 +209,15 @@ Mono exportAsync( * @return a database Vulnerability Assessment scan export resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response exportWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + Response exportWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -262,18 +228,14 @@ Response exportWithResponse( * @return a database Vulnerability Assessment scan export resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentScansExportInner export( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -284,18 +246,14 @@ DatabaseVulnerabilityAssessmentScansExportInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono>> initiateScanWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -306,18 +264,14 @@ Mono>> initiateScanWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -328,18 +282,14 @@ PollerFlux, Void> beginInitiateScanAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + SyncPoller, Void> beginInitiateScan(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -351,19 +301,14 @@ SyncPoller, Void> beginInitiateScan( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + SyncPoller, Void> beginInitiateScan(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -374,18 +319,14 @@ SyncPoller, Void> beginInitiateScan( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono initiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + Mono initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -395,18 +336,14 @@ Mono initiateScanAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void initiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + void initiateScan(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -417,11 +354,6 @@ void initiateScan( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void initiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context); + void initiateScan(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java index e9f64b5881e6a..c53ea267cb051 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java @@ -10,7 +10,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -21,9 +21,9 @@ public interface ManagedDatabaseVulnerabilityAssessmentsClient { /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,14 +32,14 @@ public interface ManagedDatabaseVulnerabilityAssessmentsClient { * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,14 +48,14 @@ PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param context The context to associate with this operation. @@ -65,35 +65,32 @@ PagedIterable listByDatabase( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -103,17 +100,14 @@ Mono> getWithResponseAsync( * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -124,18 +118,15 @@ Mono getAsync( * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -145,17 +136,14 @@ Response getWithResponse( * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + DatabaseVulnerabilityAssessmentAutoGeneratedInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -166,18 +154,16 @@ DatabaseVulnerabilityAssessmentInner get( * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -188,18 +174,15 @@ Mono> createOrUpdateWithResponseA * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -211,19 +194,15 @@ Mono createOrUpdateAsync( * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, Context context); /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -234,18 +213,15 @@ Response createOrUpdateWithResponse( * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + DatabaseVulnerabilityAssessmentAutoGeneratedInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -255,17 +231,14 @@ DatabaseVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -275,17 +248,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -296,18 +266,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -316,9 +282,6 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void delete(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java index 7ad20a9f16495..40744a6a95605 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java @@ -22,13 +22,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabasesClient. + */ public interface ManagedDatabasesClient { /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,9 +42,9 @@ public interface ManagedDatabasesClient { /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,9 +56,9 @@ public interface ManagedDatabasesClient { /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,14 +67,14 @@ public interface ManagedDatabasesClient { * @return a list of managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,14 +83,14 @@ PagedIterable listByInstance( * @return a managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,9 +103,9 @@ Mono> getWithResponseAsync( /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -113,14 +115,14 @@ Mono> getWithResponseAsync( * @return a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, Context context); /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,9 +135,9 @@ Response getWithResponse( /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -145,14 +147,14 @@ Response getWithResponse( * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -167,9 +169,9 @@ PollerFlux, ManagedDatabaseInner> beginCreateOr /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -179,14 +181,14 @@ PollerFlux, ManagedDatabaseInner> beginCreateOr * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); + SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -197,18 +199,14 @@ SyncPoller, ManagedDatabaseInner> beginCreateOr * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, - Context context); + SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseInner parameters, Context context); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -218,14 +216,14 @@ SyncPoller, ManagedDatabaseInner> beginCreateOr * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -235,14 +233,14 @@ Mono createOrUpdateAsync( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner createOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); + ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseInner parameters); /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -253,18 +251,14 @@ ManagedDatabaseInner createOrUpdate( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, - Context context); + ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseInner parameters, Context context); /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,14 +267,14 @@ ManagedDatabaseInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,14 +283,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,14 +299,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String databaseName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName); /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -322,14 +316,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName, Context context); /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -342,9 +336,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -356,9 +350,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -371,9 +365,9 @@ SyncPoller, Void> beginDelete( /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -383,14 +377,14 @@ SyncPoller, Void> beginDelete( * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -400,14 +394,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedDatabaseInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -417,14 +411,14 @@ PollerFlux, ManagedDatabaseInner> beginUpdateAs * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -435,18 +429,14 @@ SyncPoller, ManagedDatabaseInner> beginUpdate( * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context); + SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -456,14 +446,14 @@ SyncPoller, ManagedDatabaseInner> beginUpdate( * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -473,14 +463,14 @@ Mono updateAsync( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner update( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters); /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -491,18 +481,14 @@ ManagedDatabaseInner update( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context); + ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters, Context context); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -512,17 +498,14 @@ ManagedDatabaseInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> cancelMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + Mono>> cancelMoveWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -532,17 +515,14 @@ Mono>> cancelMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginCancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + PollerFlux, Void> beginCancelMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -552,17 +532,14 @@ PollerFlux, Void> beginCancelMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + SyncPoller, Void> beginCancelMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -573,18 +550,14 @@ SyncPoller, Void> beginCancelMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context); + SyncPoller, Void> beginCancelMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters, Context context); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -594,17 +567,14 @@ SyncPoller, Void> beginCancelMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono cancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono cancelMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -613,17 +583,14 @@ Mono cancelMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void cancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void cancelMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -633,18 +600,14 @@ void cancelMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void cancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context); + void cancelMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -654,17 +617,14 @@ void cancelMove( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> completeMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + Mono>> completeMoveWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -674,17 +634,14 @@ Mono>> completeMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginCompleteMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + PollerFlux, Void> beginCompleteMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -694,17 +651,14 @@ PollerFlux, Void> beginCompleteMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCompleteMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters); + SyncPoller, Void> beginCompleteMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -715,18 +669,14 @@ SyncPoller, Void> beginCompleteMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCompleteMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context); + SyncPoller, Void> beginCompleteMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters, Context context); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -736,17 +686,14 @@ SyncPoller, Void> beginCompleteMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono completeMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono completeMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -755,17 +702,14 @@ Mono completeMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void completeMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void completeMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters); /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -775,18 +719,14 @@ void completeMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void completeMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context); + void completeMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -796,17 +736,14 @@ void completeMove( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> completeRestoreWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters); + Mono>> completeRestoreWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -816,17 +753,14 @@ Mono>> completeRestoreWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginCompleteRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters); + PollerFlux, Void> beginCompleteRestoreAsync(String resourceGroupName, String managedInstanceName, + String databaseName, CompleteDatabaseRestoreDefinition parameters); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -836,17 +770,14 @@ PollerFlux, Void> beginCompleteRestoreAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCompleteRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters); + SyncPoller, Void> beginCompleteRestore(String resourceGroupName, String managedInstanceName, + String databaseName, CompleteDatabaseRestoreDefinition parameters); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -857,18 +788,14 @@ SyncPoller, Void> beginCompleteRestore( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCompleteRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, - Context context); + SyncPoller, Void> beginCompleteRestore(String resourceGroupName, String managedInstanceName, + String databaseName, CompleteDatabaseRestoreDefinition parameters, Context context); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -878,17 +805,14 @@ SyncPoller, Void> beginCompleteRestore( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono completeRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono completeRestoreAsync(String resourceGroupName, String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -897,17 +821,14 @@ Mono completeRestoreAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void completeRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void completeRestore(String resourceGroupName, String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters); /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -917,18 +838,14 @@ void completeRestore( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void completeRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, - Context context); + void completeRestore(String resourceGroupName, String managedInstanceName, String databaseName, + CompleteDatabaseRestoreDefinition parameters, Context context); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -938,17 +855,14 @@ void completeRestore( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters); + Mono>> startMoveWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -958,17 +872,14 @@ Mono>> startMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStartMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters); + PollerFlux, Void> beginStartMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -978,17 +889,14 @@ PollerFlux, Void> beginStartMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters); + SyncPoller, Void> beginStartMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -999,18 +907,14 @@ SyncPoller, Void> beginStartMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context); + SyncPoller, Void> beginStartMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters, Context context); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -1020,17 +924,14 @@ SyncPoller, Void> beginStartMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono startMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + Mono startMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -1039,17 +940,14 @@ Mono startMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + void startMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters); /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -1059,59 +957,55 @@ void startMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context); + void startMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseStartMoveDefinition parameters, Context context); /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedFlux}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listInaccessibleByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listInaccessibleByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedIterable}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInaccessibleByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listInaccessibleByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedIterable}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInaccessibleByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listInaccessibleByInstance(String resourceGroupName, String managedInstanceName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java index 7a1fbb773fbde..9c594868489fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceAdministratorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceAdministratorsClient. + */ public interface ManagedInstanceAdministratorsClient { /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,14 +35,14 @@ public interface ManagedInstanceAdministratorsClient { * @return a list of managed instance administrators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -48,14 +50,14 @@ PagedFlux listByInstanceAsync( * @return a list of managed instance administrators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -64,14 +66,14 @@ PagedIterable listByInstance( * @return a list of managed instance administrators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,14 +82,14 @@ PagedIterable listByInstance( * @return a managed instance administrator along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName); /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,14 +98,14 @@ Mono> getWithResponseAsync( * @return a managed instance administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName); /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -113,14 +115,14 @@ Mono getAsync( * @return a managed instance administrator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, Context context); /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,14 +131,14 @@ Response getWithResponse( * @return a managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdministratorInner get( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + ManagedInstanceAdministratorInner get(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -144,20 +146,17 @@ ManagedInstanceAdministratorInner 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 an Azure SQL managed instance administrator along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -168,17 +167,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedInstanceAdministratorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -189,16 +185,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, + String resourceGroupName, String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -210,17 +204,14 @@ SyncPoller, ManagedInstanceAdminis */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, - Context context); + String resourceGroupName, String managedInstanceName, AdministratorName administratorName, + ManagedInstanceAdministratorInner parameters, Context context); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -230,17 +221,14 @@ SyncPoller, ManagedInstanceAdminis * @return an Azure SQL managed instance administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -250,17 +238,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdministratorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters); + ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters); /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -271,18 +256,14 @@ ManagedInstanceAdministratorInner createOrUpdate( * @return an Azure SQL managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdministratorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, - Context context); + ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters, Context context); /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,14 +272,14 @@ ManagedInstanceAdministratorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName); /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,14 +288,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName); /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,14 +304,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName); /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -340,14 +321,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, Context context); /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,9 +341,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,9 +355,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -385,6 +366,6 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context); + void delete(String resourceGroupName, String managedInstanceName, AdministratorName administratorName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java index 0ecd25f39400d..6ff1f40c1bcad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java @@ -26,75 +26,75 @@ public interface ManagedInstanceAzureADOnlyAuthenticationsClient { /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,14 +103,14 @@ Mono> getWithResponseAsy * @return a specific Azure Active Directory only authentication property on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -120,14 +120,14 @@ Mono getAsync( * @return a specific Azure Active Directory only authentication property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, Context context); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,42 +136,40 @@ Response getWithResponse( * @return a specific Azure Active Directory only authentication property. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAzureADOnlyAuthenticationInner get( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + ManagedInstanceAzureADOnlyAuthenticationInner get(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -179,22 +177,19 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -202,22 +197,19 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -226,67 +218,58 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, + ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters); + ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -294,18 +277,15 @@ ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, + ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,14 +294,14 @@ ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,14 +310,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -346,14 +326,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -363,14 +343,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, Context context); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -383,9 +363,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -397,9 +377,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -408,6 +388,6 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context); + void delete(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java index 8049e4d785117..e39e43e5a08e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java @@ -25,9 +25,9 @@ public interface ManagedInstanceEncryptionProtectorsClient { /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,14 +35,14 @@ public interface ManagedInstanceEncryptionProtectorsClient { * @return a list of managed instance encryption protectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,14 +50,14 @@ PagedFlux listByInstanceAsync( * @return a list of managed instance encryption protectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,31 +66,31 @@ PagedIterable listByInstance( * @return a list of managed instance encryption protectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName); /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,14 +99,14 @@ Mono> getWithResponseAsync( * @return a managed instance encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -116,17 +116,14 @@ Mono getAsync( * @return a managed instance encryption protector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, Context context); /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,35 +132,33 @@ Response getWithResponse( * @return a managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceEncryptionProtectorInner get( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + ManagedInstanceEncryptionProtectorInner get(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return the managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -174,17 +169,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -195,17 +187,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters); + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -217,18 +206,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -238,17 +224,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return the managed instance encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -258,17 +242,14 @@ Mono createOrUpdateAsync( * @return the managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceEncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters); + ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters); /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -279,18 +260,15 @@ ManagedInstanceEncryptionProtectorInner createOrUpdate( * @return the managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceEncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, + ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,14 +277,14 @@ ManagedInstanceEncryptionProtectorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> revalidateWithResponseAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + Mono>> revalidateWithResponseAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,14 +293,14 @@ Mono>> revalidateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,14 +309,14 @@ PollerFlux, Void> beginRevalidateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + SyncPoller, Void> beginRevalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -348,17 +326,14 @@ SyncPoller, Void> beginRevalidate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context); + SyncPoller, Void> beginRevalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, Context context); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,14 +342,14 @@ SyncPoller, Void> beginRevalidate( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono revalidateAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + Mono revalidateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -382,14 +357,14 @@ Mono revalidateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void revalidate( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName); + void revalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName); /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -398,9 +373,6 @@ void revalidate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void revalidate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context); + void revalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java index b1f36138ff4da..6a0816d1433c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceKeysClient. + */ public interface ManagedInstanceKeysClient { /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,14 +35,14 @@ public interface ManagedInstanceKeysClient { * @return a list of managed instance keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, String filter); + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter); /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +54,9 @@ PagedFlux listByInstanceAsync( /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -66,9 +68,9 @@ PagedFlux listByInstanceAsync( /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @param context The context to associate with this operation. @@ -78,14 +80,14 @@ PagedFlux listByInstanceAsync( * @return a list of managed instance keys as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, String filter, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + String filter, Context context); /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,14 +96,14 @@ PagedIterable listByInstance( * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String keyName); /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,9 +116,9 @@ Mono> getWithResponseAsync( /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -126,14 +128,14 @@ Mono> getWithResponseAsync( * @return a managed instance key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String keyName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String keyName, Context context); /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,9 +148,9 @@ Response getWithResponse( /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -158,14 +160,14 @@ Response getWithResponse( * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters); /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -180,9 +182,9 @@ PollerFlux, ManagedInstanceKeyInner> beginCr /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -197,9 +199,9 @@ SyncPoller, ManagedInstanceKeyInner> beginCr /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -211,17 +213,14 @@ SyncPoller, ManagedInstanceKeyInner> beginCr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceKeyInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, + String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters, Context context); /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -231,14 +230,14 @@ SyncPoller, ManagedInstanceKeyInner> beginCr * @return a managed instance key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String keyName, ManagedInstanceKeyInner parameters); /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -248,14 +247,14 @@ Mono createOrUpdateAsync( * @return a managed instance key. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceKeyInner createOrUpdate( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters); + ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String keyName, + ManagedInstanceKeyInner parameters); /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -266,18 +265,14 @@ ManagedInstanceKeyInner createOrUpdate( * @return a managed instance key. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceKeyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, - Context context); + ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String keyName, + ManagedInstanceKeyInner parameters, Context context); /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,14 +281,14 @@ ManagedInstanceKeyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String keyName); /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,14 +297,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String keyName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String keyName); /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,14 +313,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String keyName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String keyName); /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -335,14 +330,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String keyName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, String keyName, + Context context); /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -355,9 +350,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -369,9 +364,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java index 7b123756ba107..4ca75ce478c43 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java @@ -26,9 +26,9 @@ public interface ManagedInstanceLongTermRetentionPoliciesClient { /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,14 +37,14 @@ public interface ManagedInstanceLongTermRetentionPoliciesClient { * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,14 +53,14 @@ PagedFlux listByDatabaseAsync( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -70,14 +70,14 @@ PagedIterable listByDatabase( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -85,20 +85,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 managed database's long term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -108,17 +105,14 @@ Mono> getWithResponseAsync * @return a managed database's long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -129,18 +123,15 @@ Mono getAsync( * @return a managed database's long term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context); /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -150,17 +141,14 @@ Response getWithResponse( * @return a managed database's long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName); + ManagedInstanceLongTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -171,18 +159,15 @@ ManagedInstanceLongTermRetentionPolicyInner get( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -194,18 +179,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -217,18 +199,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -241,19 +220,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context); + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -264,18 +239,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -286,18 +258,15 @@ Mono createOrUpdateAsync( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters); /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -309,11 +278,7 @@ ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context); + ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java index a8748944eec97..df99233099db0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java @@ -14,13 +14,15 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceOperationsClient. + */ public interface ManagedInstanceOperationsClient { /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,14 +30,14 @@ public interface ManagedInstanceOperationsClient { * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,14 +45,14 @@ PagedFlux listByManagedInstanceAsync( * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -59,31 +61,31 @@ PagedIterable listByManagedInstance( * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId); /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,14 +94,14 @@ Mono> getWithResponseAsync( * @return a management operation on a managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, UUID operationId); + Mono getAsync(String resourceGroupName, String managedInstanceName, + UUID operationId); /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono getAsync( * @return a management operation on a managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + UUID operationId, Context context); /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,14 +142,14 @@ Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> cancelWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId); + Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, + UUID operationId); /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -160,9 +162,9 @@ Mono> cancelWithResponseAsync( /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -172,14 +174,14 @@ Mono> cancelWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context); + Response cancelWithResponse(String resourceGroupName, String managedInstanceName, UUID operationId, + Context context); /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java index dfc88fec9be84..506cc3d1c6b89 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java @@ -25,9 +25,9 @@ public interface ManagedInstancePrivateEndpointConnectionsClient { /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,14 +35,14 @@ public interface ManagedInstancePrivateEndpointConnectionsClient { * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,14 +50,14 @@ PagedFlux listByManagedInstanceAs * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,14 +66,14 @@ PagedIterable listByManagedInstan * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,14 +82,14 @@ PagedIterable listByManagedInstan * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,14 +98,14 @@ Mono> getWithResponseAsy * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -115,14 +115,14 @@ Mono getAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,37 +131,35 @@ Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstancePrivateEndpointConnectionInner get( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + ManagedInstancePrivateEndpointConnectionInner get(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,20 +167,17 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -190,20 +185,17 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @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. @@ -212,61 +204,52 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, + ManagedInstancePrivateEndpointConnectionInner parameters, Context context); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstancePrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters); + ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @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. @@ -274,18 +257,15 @@ ManagedInstancePrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstancePrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, + ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,14 +274,14 @@ ManagedInstancePrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,14 +290,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -326,14 +306,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -343,14 +323,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -363,9 +343,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,9 +357,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -388,6 +368,6 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context); + void delete(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java index d2ddd3b41d90a..0dec5eaf7b5cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java @@ -19,9 +19,9 @@ public interface ManagedInstancePrivateLinkResourcesClient { /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,14 +29,14 @@ public interface ManagedInstancePrivateLinkResourcesClient { * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -44,14 +44,14 @@ PagedFlux listByManagedInstanceAsync( * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,31 +60,31 @@ PagedIterable listByManagedInstance( * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String groupName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,14 +93,14 @@ Mono> getWithResponseAsync( * @return a private link resource for SQL server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String groupName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String groupName); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. @@ -110,14 +110,14 @@ Mono getAsync( * @return a private link resource for SQL server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String groupName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String groupName, Context context); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java index fa8c3e5478074..4c6d27c66831e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java @@ -16,13 +16,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceTdeCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceTdeCertificatesClient. + */ public interface ManagedInstanceTdeCertificatesClient { /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,14 +33,14 @@ public interface ManagedInstanceTdeCertificatesClient { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters); + Mono>> createWithResponseAsync(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,14 +49,14 @@ Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters); + PollerFlux, Void> beginCreateAsync(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,14 +65,14 @@ PollerFlux, Void> beginCreateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreate( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters); + SyncPoller, Void> beginCreate(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -80,14 +82,14 @@ SyncPoller, Void> beginCreate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreate( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context); + SyncPoller, Void> beginCreate(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters, Context context); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,9 +102,9 @@ SyncPoller, Void> beginCreate( /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,9 +116,9 @@ SyncPoller, Void> beginCreate( /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java index 6516f6a34a693..70f242337e2e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java @@ -21,9 +21,9 @@ public interface ManagedInstanceVulnerabilityAssessmentsClient { /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,64 +31,64 @@ public interface ManagedInstanceVulnerabilityAssessmentsClient { * @return the managed instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed instance's vulnerability assessment policies as paginated response with {@link - * PagedIterable}. + * @return the managed instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @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 managed instance's vulnerability assessment policies as paginated response with {@link - * PagedIterable}. + * @return the managed instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the managed instance's vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,14 +97,14 @@ Mono> getWithResponseAsync * @return the managed instance's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -114,17 +114,14 @@ Mono getAsync( * @return the managed instance's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,16 +130,16 @@ Response getWithResponse( * @return the managed instance's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceVulnerabilityAssessmentInner get( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + ManagedInstanceVulnerabilityAssessmentInner get(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -150,22 +147,20 @@ ManagedInstanceVulnerabilityAssessmentInner 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 managed instance vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters); /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -175,19 +170,17 @@ Mono> createOrUpdateWithRe * @return a managed instance vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters); /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -198,20 +191,17 @@ Mono createOrUpdateAsync( * @return a managed instance vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ManagedInstanceVulnerabilityAssessmentInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + ManagedInstanceVulnerabilityAssessmentInner parameters, Context context); /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -221,17 +211,15 @@ Response createOrUpdateWithResponse * @return a managed instance vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, + ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters); /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,14 +228,14 @@ ManagedInstanceVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,14 +244,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono deleteAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -273,17 +261,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response deleteWithResponse(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,6 +276,6 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + void delete(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java index 15cd7c3c1c9c1..8419d4c2fa006 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java @@ -28,14 +28,14 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstancesClient. */ -public interface ManagedInstancesClient - extends InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete { +/** + * An instance of this class provides access to all the operations defined in ManagedInstancesClient. + */ +public interface ManagedInstancesClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,7 +47,7 @@ public interface ManagedInstancesClient /** * Gets a list of all managed instances 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. * @return a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. @@ -57,7 +57,7 @@ public interface ManagedInstancesClient /** * Gets a list of all managed instances 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. * @return a list of all managed instances in the subscription as paginated response with {@link PagedIterable}. @@ -67,7 +67,7 @@ public interface ManagedInstancesClient /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,9 +80,9 @@ public interface ManagedInstancesClient /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,14 +91,14 @@ public interface ManagedInstancesClient * @return a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, String expand); + PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand); /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -110,9 +110,9 @@ PagedFlux listByInstancePoolAsync( /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,9 +124,9 @@ PagedFlux listByInstancePoolAsync( /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -136,14 +136,14 @@ PagedFlux listByInstancePoolAsync( * @return a list of all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool( - String resourceGroupName, String instancePoolName, String expand, Context context); + PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + String expand, Context context); /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -155,9 +155,9 @@ PagedIterable listByInstancePool( /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -168,9 +168,9 @@ PagedIterable listByInstancePool( /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -181,9 +181,9 @@ PagedIterable listByInstancePool( /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,9 +196,9 @@ PagedIterable listByInstancePool( /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,14 +207,14 @@ PagedIterable listByInstancePool( * @return a managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String managedInstanceName, String expand); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand); /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -226,9 +226,9 @@ Mono> getByResourceGroupWithResponseAsync( /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -238,14 +238,14 @@ Mono> getByResourceGroupWithResponseAsync( * @return a managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String managedInstanceName, String expand, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String managedInstanceName, + String expand, Context context); /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,9 +257,9 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,14 +268,14 @@ Response getByResourceGroupWithResponse( * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,14 +284,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); + PollerFlux, ManagedInstanceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,14 +300,14 @@ PollerFlux, ManagedInstanceInner> beginCreateOr * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); + SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -317,14 +317,14 @@ SyncPoller, ManagedInstanceInner> beginCreateOr * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context); + SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters, Context context); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -333,14 +333,14 @@ SyncPoller, ManagedInstanceInner> beginCreateOr * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -349,14 +349,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner createOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); + ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters); /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -366,14 +366,14 @@ ManagedInstanceInner createOrUpdate( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner createOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context); + ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context); /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -385,9 +385,9 @@ ManagedInstanceInner createOrUpdate( /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -399,9 +399,9 @@ ManagedInstanceInner createOrUpdate( /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -413,9 +413,9 @@ ManagedInstanceInner createOrUpdate( /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -424,14 +424,14 @@ ManagedInstanceInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + Context context); /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -443,9 +443,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -456,9 +456,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,9 +470,9 @@ SyncPoller, Void> beginDelete( /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -481,14 +481,14 @@ SyncPoller, Void> beginDelete( * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters); /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -497,14 +497,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); + PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters); /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -513,14 +513,14 @@ PollerFlux, ManagedInstanceInner> beginUpdateAs * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); + SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters); /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -530,14 +530,14 @@ SyncPoller, ManagedInstanceInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context); + SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters, Context context); /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,14 +546,14 @@ SyncPoller, ManagedInstanceInner> beginUpdate( * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); + Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters); /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -566,9 +566,9 @@ Mono updateAsync( /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -578,14 +578,14 @@ Mono updateAsync( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner update( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context); + ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, + Context context); /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -594,14 +594,14 @@ ManagedInstanceInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType); + Mono>> failoverWithResponseAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType); /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -610,14 +610,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType); + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType); /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -629,9 +629,9 @@ PollerFlux, Void> beginFailoverAsync( /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -643,9 +643,9 @@ PollerFlux, Void> beginFailoverAsync( /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -655,14 +655,14 @@ PollerFlux, Void> beginFailoverAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginFailover( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context); + SyncPoller, Void> beginFailover(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context); /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -675,9 +675,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -689,9 +689,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -702,9 +702,9 @@ SyncPoller, Void> beginFailover( /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -717,48 +717,48 @@ SyncPoller, Void> beginFailover( /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listOutboundNetworkDependenciesByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux + listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesByManagedInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable + listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName); /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listOutboundNetworkDependenciesByManagedInstance( @@ -766,13 +766,13 @@ PagedIterable listOutboundNetworkDependenciesB /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -784,22 +784,15 @@ PagedIterable listOutboundNetworkDependenciesB * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric); /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -811,9 +804,9 @@ PagedFlux listByManagedInstanceAsync( /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -825,13 +818,13 @@ PagedFlux listByManagedInstanceAsync( /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -844,15 +837,7 @@ PagedFlux listByManagedInstanceAsync( * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric, - Context context); + PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java index f0bf6d40ff6f3..630388490da62 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java @@ -26,9 +26,9 @@ public interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient { /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,14 +37,14 @@ public interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicie * @return a dropped database's short term retention policy list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByRestorableDroppedDatabaseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId); + PagedFlux listByRestorableDroppedDatabaseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,14 +53,14 @@ PagedFlux listByRestorableDroppedDat * @return a dropped database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRestorableDroppedDatabase( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId); + PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -70,14 +70,14 @@ PagedIterable listByRestorableDroppe * @return a dropped database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRestorableDroppedDatabase( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context); + PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context); /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -85,20 +85,17 @@ PagedIterable listByRestorableDroppe * @throws com.azure.core.management.exception.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 dropped database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName); /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -108,17 +105,14 @@ Mono> getWithResponseAsync( * @return a dropped database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName); /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -129,18 +123,15 @@ Mono getAsync( * @return a dropped database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, Context context); /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -150,17 +141,14 @@ Response getWithResponse( * @return a dropped database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName); + ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -171,18 +159,15 @@ ManagedBackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -194,18 +179,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -217,18 +199,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -241,19 +219,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -264,18 +238,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -286,18 +257,15 @@ Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -309,19 +277,15 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context); + ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -332,18 +296,15 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -355,18 +316,14 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -378,18 +335,14 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters); + beginUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -402,19 +355,15 @@ Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + beginUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -425,18 +374,15 @@ Mono>> updateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + Mono updateAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -447,18 +393,15 @@ Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters); /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -470,11 +413,7 @@ ManagedBackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context); + ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java index 40fd46a6a492f..17df432749c09 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java @@ -20,13 +20,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedServerDnsAliasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedServerDnsAliasesClient. + */ public interface ManagedServerDnsAliasesClient { /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,47 +36,47 @@ public interface ManagedServerDnsAliasesClient { * @return a list of managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases for a managed server as paginated response with {@link - * PagedIterable}. + * @return a list of managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases for a managed server as paginated response with {@link - * PagedIterable}. + * @return a list of managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,14 +85,14 @@ PagedIterable listByManagedInstance( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,14 +101,14 @@ Mono> getWithResponseAsync( * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -116,14 +118,14 @@ Mono getAsync( * @return a server DNS alias along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String dnsAliasName, Context context); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,32 +138,29 @@ Response getWithResponse( /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,19 +168,17 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -189,19 +186,17 @@ PollerFlux, ManagedServerDnsAliasInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @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. @@ -210,60 +205,51 @@ SyncPoller, ManagedServerDnsAliasInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context); + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasCreation parameters, Context context); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasCreation parameters); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerDnsAliasInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters); /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @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. @@ -271,18 +257,14 @@ ManagedServerDnsAliasInner createOrUpdate( * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerDnsAliasInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context); + ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasCreation parameters, Context context); /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,14 +273,14 @@ ManagedServerDnsAliasInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName); /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,14 +289,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName); /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,14 +305,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String dnsAliasName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String dnsAliasName); /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -340,14 +322,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String dnsAliasName, Context context); /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,9 +342,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,9 +356,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -389,32 +371,29 @@ SyncPoller, Void> beginDelete( /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> acquireWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters); + Mono>> acquireWithResponseAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasAcquisition parameters); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -422,19 +401,17 @@ Mono>> acquireWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -442,19 +419,17 @@ PollerFlux, ManagedServerDnsAliasInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @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. @@ -463,60 +438,51 @@ SyncPoller, ManagedServerDnsAliasInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context); + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasAcquisition parameters, Context context); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono acquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters); + Mono acquireAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasAcquisition parameters); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerDnsAliasInner acquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + ManagedServerDnsAliasInner acquire(String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters); /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @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. @@ -524,10 +490,6 @@ ManagedServerDnsAliasInner acquire( * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerDnsAliasInner acquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context); + ManagedServerDnsAliasInner acquire(String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasAcquisition parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java index 2dc2674cbd5fd..e84531f82af31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java @@ -25,9 +25,9 @@ public interface ManagedServerSecurityAlertPoliciesClient { /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,14 +35,14 @@ public interface ManagedServerSecurityAlertPoliciesClient { * @return the managed server's threat detection policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,14 +50,14 @@ PagedFlux listByInstanceAsync( * @return the managed server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,33 +66,31 @@ PagedIterable listByInstance( * @return the managed server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server's threat detection policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server's threat detection policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,16 +99,14 @@ Mono> getWithResponseAsync( * @return a managed server's threat detection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String managedInstanceName, + Mono getAsync(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -120,17 +116,14 @@ Mono getAsync( * @return a managed server's threat detection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context); /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,37 +132,33 @@ Response getWithResponse( * @return a managed server's threat detection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerSecurityAlertPolicyInner get( - String resourceGroupName, - String managedInstanceName, + ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed server security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -180,17 +169,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -201,17 +188,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -223,18 +208,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, - Context context); + ManagedServerSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -244,17 +226,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return a managed server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -264,17 +244,14 @@ Mono createOrUpdateAsync( * @return a managed server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters); + ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -285,10 +262,7 @@ ManagedServerSecurityAlertPolicyInner createOrUpdate( * @return a managed server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, + ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java index e3dd94a4b6c6e..af088e1767c5c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations as paginated response with {@link PagedFlux}. @@ -25,7 +27,7 @@ public interface OperationsClient { /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations as paginated response with {@link PagedIterable}. @@ -35,7 +37,7 @@ public interface OperationsClient { /** * Lists all of the available SQL Rest 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. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java index a3f1a8ba21436..fbdd5fa0cf453 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OutboundFirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in OutboundFirewallRulesClient. + */ public interface OutboundFirewallRulesClient { /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface OutboundFirewallRulesClient { /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface OutboundFirewallRulesClient { /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,9 +67,9 @@ public interface OutboundFirewallRulesClient { /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,14 +78,14 @@ public interface OutboundFirewallRulesClient { * @return an outbound firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,9 +98,9 @@ Mono> getWithResponseAsync( /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -108,14 +110,14 @@ Mono> getWithResponseAsync( * @return an outbound firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context); /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,26 +130,26 @@ Response getWithResponse( /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure SQL DB Server Outbound Firewall Rule along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,14 +158,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, OutboundFirewallRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + PollerFlux, OutboundFirewallRuleInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String outboundRuleFqdn); /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,14 +174,14 @@ PollerFlux, OutboundFirewallRuleInner> beg * @return the {@link SyncPoller} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn); + SyncPoller, OutboundFirewallRuleInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String outboundRuleFqdn); /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -189,14 +191,14 @@ SyncPoller, OutboundFirewallRuleInner> beg * @return the {@link SyncPoller} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); + SyncPoller, OutboundFirewallRuleInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,14 +207,14 @@ SyncPoller, OutboundFirewallRuleInner> beg * @return an Azure SQL DB Server Outbound Firewall Rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,9 +227,9 @@ Mono createOrUpdateAsync( /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -237,14 +239,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - OutboundFirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); + OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String outboundRuleFqdn, + Context context); /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,14 +255,14 @@ OutboundFirewallRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,14 +271,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,14 +287,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String outboundRuleFqdn); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String outboundRuleFqdn); /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -302,14 +304,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String outboundRuleFqdn, + Context context); /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,9 +324,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,9 +338,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java index 95d826e358223..33bb6fbda1c59 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public interface PrivateEndpointConnectionsClient { /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface PrivateEndpointConnectionsClient { /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface PrivateEndpointConnectionsClient { /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,14 +63,14 @@ public interface PrivateEndpointConnectionsClient { * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ PagedIterable listByServer( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,14 +95,14 @@ Mono> getWithResponseAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + Mono getAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -110,14 +112,14 @@ Mono getAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,37 +128,34 @@ Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -164,19 +163,17 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, + String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -184,19 +181,17 @@ PollerFlux, PrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, + String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @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. @@ -205,60 +200,51 @@ SyncPoller, PrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @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. @@ -266,18 +252,14 @@ PrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,14 +268,14 @@ PrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,14 +284,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,14 +300,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String privateEndpointConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -335,14 +317,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -355,9 +337,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -369,9 +351,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java index 80a8dcd325c1c..0aada0f70eabf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.PrivateLinkResourceInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public interface PrivateLinkResourcesClient { /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,9 +33,9 @@ public interface PrivateLinkResourcesClient { /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ public interface PrivateLinkResourcesClient { /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,26 +62,26 @@ public interface PrivateLinkResourcesClient { /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String groupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,9 +94,9 @@ Mono> getWithResponseAsync( /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. @@ -104,14 +106,14 @@ Mono> getWithResponseAsync( * @return a private link resource for SQL server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String groupName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String groupName, + Context context); /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java index b392a894809cd..7ca1c1e642209 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java @@ -11,56 +11,52 @@ import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecommendedSensitivityLabelsClient. */ +/** + * An instance of this class provides access to all the operations defined in RecommendedSensitivityLabelsClient. + */ public interface RecommendedSensitivityLabelsClient { /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, RecommendedSensitivityLabelUpdateList parameters); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, RecommendedSensitivityLabelUpdateList parameters); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @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. @@ -68,29 +64,22 @@ Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + RecommendedSensitivityLabelUpdateList parameters, Context context); /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( - String resourceGroupName, - String serverName, - String databaseName, + void update(String resourceGroupName, String serverName, String databaseName, RecommendedSensitivityLabelUpdateList parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java index 587e6f9a18d20..40480d37f2886 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.RecoverableDatabaseInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecoverableDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoverableDatabasesClient. + */ public interface RecoverableDatabasesClient { /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,9 +33,9 @@ public interface RecoverableDatabasesClient { /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ public interface RecoverableDatabasesClient { /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,9 +62,9 @@ public interface RecoverableDatabasesClient { /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,14 +73,14 @@ public interface RecoverableDatabasesClient { * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,9 +93,9 @@ Mono> getWithResponseAsync( /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -103,14 +105,14 @@ Mono> getWithResponseAsync( * @return a recoverable database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java index ec845d2c65274..d76468f403813 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.RecoverableManagedDatabaseInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecoverableManagedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoverableManagedDatabasesClient. + */ public interface RecoverableManagedDatabasesClient { /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,14 +29,14 @@ public interface RecoverableManagedDatabasesClient { * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +48,9 @@ PagedFlux listByInstanceAsync( /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,14 +59,14 @@ PagedFlux listByInstanceAsync( * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,14 +75,14 @@ PagedIterable listByInstance( * @return a recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName); /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,14 +91,14 @@ Mono> getWithResponseAsync( * @return a recoverable managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName); /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @param context The context to associate with this operation. @@ -106,14 +108,14 @@ Mono getAsync( * @return a recoverable managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName, Context context); /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,6 +124,6 @@ Response getWithResponse( * @return a recoverable managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecoverableManagedDatabaseInner get( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName); + RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java index db68a49571c18..154515543b6b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ReplicationLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in ReplicationLinksClient. + */ public interface ReplicationLinksClient { /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,14 +35,14 @@ public interface ReplicationLinksClient { * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,14 +51,14 @@ PagedFlux listByDatabaseAsync( * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -66,14 +68,14 @@ PagedIterable listByDatabase( * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -83,14 +85,14 @@ PagedIterable listByDatabase( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -100,14 +102,14 @@ Mono> getWithResponseAsync( * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String linkId); /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -118,14 +120,14 @@ Mono getAsync( * @return a replication link along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context); /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -139,9 +141,9 @@ Response getWithResponse( /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -151,14 +153,14 @@ Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -168,14 +170,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -185,14 +187,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String linkId); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String linkId); /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -203,14 +205,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context); /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -224,9 +226,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -239,9 +241,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -255,9 +257,9 @@ SyncPoller, Void> beginDelete( /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -267,14 +269,14 @@ SyncPoller, Void> beginDelete( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -284,14 +286,14 @@ Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ReplicationLinkInner> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + PollerFlux, ReplicationLinkInner> beginFailoverAsync(String resourceGroupName, + String serverName, String databaseName, String linkId); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -301,14 +303,14 @@ PollerFlux, ReplicationLinkInner> beginFailover * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginFailover( - String resourceGroupName, String serverName, String databaseName, String linkId); + SyncPoller, ReplicationLinkInner> beginFailover(String resourceGroupName, + String serverName, String databaseName, String linkId); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -319,14 +321,14 @@ SyncPoller, ReplicationLinkInner> beginFailover * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginFailover( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context); + SyncPoller, ReplicationLinkInner> beginFailover(String resourceGroupName, + String serverName, String databaseName, String linkId, Context context); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -336,14 +338,14 @@ SyncPoller, ReplicationLinkInner> beginFailover * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono failoverAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono failoverAsync(String resourceGroupName, String serverName, String databaseName, + String linkId); /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -357,9 +359,9 @@ Mono failoverAsync( /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -370,14 +372,14 @@ Mono failoverAsync( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner failover( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context); + ReplicationLinkInner failover(String resourceGroupName, String serverName, String databaseName, String linkId, + Context context); /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -387,14 +389,14 @@ ReplicationLinkInner failover( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono>> failoverAllowDataLossWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -409,9 +411,9 @@ PollerFlux, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -421,14 +423,14 @@ PollerFlux, ReplicationLinkInner> beginFailover * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginFailoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId); + SyncPoller, ReplicationLinkInner> + beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, String linkId); /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -444,9 +446,9 @@ SyncPoller, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -456,14 +458,14 @@ SyncPoller, ReplicationLinkInner> beginFailover * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono failoverAllowDataLossAsync( - String resourceGroupName, String serverName, String databaseName, String linkId); + Mono failoverAllowDataLossAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -473,14 +475,14 @@ Mono failoverAllowDataLossAsync( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner failoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId); + ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, + String linkId); /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -491,14 +493,14 @@ ReplicationLinkInner failoverAllowDataLoss( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner failoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context); + ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context); /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -510,9 +512,9 @@ ReplicationLinkInner failoverAllowDataLoss( /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -524,9 +526,9 @@ ReplicationLinkInner failoverAllowDataLoss( /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java index e91ebf9125d2c..34c81e826c50f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.sql.fluent.models.RestorableDroppedDatabaseInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RestorableDroppedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorableDroppedDatabasesClient. + */ public interface RestorableDroppedDatabasesClient { /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,9 +33,9 @@ public interface RestorableDroppedDatabasesClient { /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ public interface RestorableDroppedDatabasesClient { /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,14 +58,14 @@ public interface RestorableDroppedDatabasesClient { * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,14 +74,14 @@ PagedIterable listByServer( * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId); /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,14 +90,14 @@ Mono> getWithResponseAsync( * @return a restorable dropped database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId); + Mono getAsync(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId); /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -105,14 +107,14 @@ Mono getAsync( * @return a restorable dropped database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId, Context context); /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java index 4a6a1ff32c25f..c9d124bc490b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java @@ -19,9 +19,9 @@ public interface RestorableDroppedManagedDatabasesClient { /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,14 +29,14 @@ public interface RestorableDroppedManagedDatabasesClient { * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName); + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -44,14 +44,14 @@ PagedFlux listByInstanceAsync( * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,31 +60,31 @@ PagedIterable listByInstance( * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 restorable dropped managed database along with {@link Response} on successful completion of {@link - * Mono}. + * @return a restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,14 +93,14 @@ Mono> getWithResponseAsync( * @return a restorable dropped managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId); /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -110,14 +110,14 @@ Mono getAsync( * @return a restorable dropped managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context); /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,6 +126,6 @@ Response getWithResponse( * @return a restorable dropped managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorableDroppedManagedDatabaseInner get( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId); + RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java index 11051e152b7be..9493bfb356bd3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RestorePointsClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorePointsClient. + */ public interface RestorePointsClient { /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,9 +40,9 @@ public interface RestorePointsClient { /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,9 +55,9 @@ public interface RestorePointsClient { /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -65,14 +67,14 @@ public interface RestorePointsClient { * @return a list of database restore points as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -82,17 +84,14 @@ PagedIterable listByDatabase( * @return database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters); + Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition parameters); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -102,17 +101,14 @@ Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RestorePointInner> beginCreateAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters); + PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -122,17 +118,14 @@ PollerFlux, RestorePointInner> beginCreateAsync( * @return the {@link SyncPoller} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RestorePointInner> beginCreate( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters); + SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -143,18 +136,14 @@ SyncPoller, RestorePointInner> beginCreate( * @return the {@link SyncPoller} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RestorePointInner> beginCreate( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context); + SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -164,17 +153,14 @@ SyncPoller, RestorePointInner> beginCreate( * @return database restore points on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync( - String resourceGroupName, - String serverName, - String databaseName, + Mono createAsync(String resourceGroupName, String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -184,17 +170,14 @@ Mono createAsync( * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorePointInner create( - String resourceGroupName, - String serverName, - String databaseName, + RestorePointInner create(String resourceGroupName, String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -205,18 +188,14 @@ RestorePointInner create( * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorePointInner create( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context); + RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context); /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -226,14 +205,14 @@ RestorePointInner create( * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName); /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -243,14 +222,14 @@ Mono> getWithResponseAsync( * @return a restore point on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName); /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -261,14 +240,14 @@ Mono getAsync( * @return a restore point along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context); /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -282,9 +261,9 @@ Response getWithResponse( /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -294,14 +273,14 @@ Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName); /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -315,9 +294,9 @@ Mono> deleteWithResponseAsync( /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -328,14 +307,14 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context); /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java index c7f977414bb87..cab1a46584aea 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java @@ -15,13 +15,15 @@ import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SensitivityLabelsClient. */ +/** + * An instance of this class provides access to all the operations defined in SensitivityLabelsClient. + */ public interface SensitivityLabelsClient { /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -33,19 +35,14 @@ public interface SensitivityLabelsClient { * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter); + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean count, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,14 +51,14 @@ PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,14 +67,14 @@ PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listCurrentByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -90,57 +87,51 @@ PagedIterable listCurrentByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter, - Context context); + PagedIterable listCurrentByDatabase(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean count, String filter, Context context); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @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. @@ -148,34 +139,30 @@ Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters, Context context); /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters); + void update(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -187,19 +174,14 @@ void update( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter); + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,14 +190,14 @@ PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -224,14 +206,14 @@ PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listRecommendedByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -244,20 +226,14 @@ PagedIterable listRecommendedByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context); + PagedIterable listRecommendedByDatabase(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -267,24 +243,19 @@ PagedIterable listRecommendedByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -297,20 +268,14 @@ Mono> getWithResponseAsync( * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -324,21 +289,15 @@ Mono getAsync( * @return the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource, Context context); /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -351,20 +310,14 @@ Response getWithResponse( * @return the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner get( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource); + SensitivityLabelInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -377,20 +330,14 @@ SensitivityLabelInner get( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -403,20 +350,14 @@ Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -430,21 +371,15 @@ Mono createOrUpdateAsync( * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, Context context); /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -457,20 +392,14 @@ Response createOrUpdateWithResponse( * @return a sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters); + SensitivityLabelInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -482,19 +411,14 @@ SensitivityLabelInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -506,19 +430,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -531,20 +450,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -555,19 +468,14 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, + void delete(String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -579,19 +487,14 @@ void delete( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -603,19 +506,14 @@ Mono> disableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableRecommendationAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono disableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -628,20 +526,14 @@ Mono disableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response disableRecommendationWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response disableRecommendationWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -652,19 +544,14 @@ Response disableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void disableRecommendation( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + void disableRecommendation(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -676,19 +563,14 @@ void disableRecommendation( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -700,19 +582,14 @@ Mono> enableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono enableRecommendationAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + Mono enableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -725,20 +602,14 @@ Mono enableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response enableRecommendationWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context); + Response enableRecommendationWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -749,19 +620,14 @@ Response enableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void enableRecommendation( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName); + void enableRecommendation(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -771,14 +637,14 @@ void enableRecommendation( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -787,14 +653,14 @@ PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -803,14 +669,14 @@ PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -821,6 +687,6 @@ PagedIterable listByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, String filter, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java index 46348d38cb5d0..65f5efae1445e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java @@ -26,9 +26,9 @@ public interface ServerAdvancedThreatProtectionSettingsClient { /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,58 +40,58 @@ public interface ServerAdvancedThreatProtectionSettingsClient { /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection states as paginated response with {@link - * PagedIterable}. + * @return a list of the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection states as paginated response with {@link - * PagedIterable}. + * @return a list of the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AdvancedThreatProtectionName advancedThreatProtectionName); /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,14 +100,14 @@ Mono> getWithResponseAsync( * @return a server's Advanced Threat Protection state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName); + Mono getAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName); /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -117,17 +117,14 @@ Mono getAsync( * @return a server's Advanced Threat Protection state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, Context context); /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,14 +133,14 @@ Response getWithResponse( * @return a server's Advanced Threat Protection state. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAdvancedThreatProtectionInner get( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName); + ServerAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -153,17 +150,14 @@ ServerAdvancedThreatProtectionInner get( * @return a server Advanced Threat Protection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -174,17 +168,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -195,17 +186,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters); + beginCreateOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -217,18 +205,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + beginCreateOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -238,17 +223,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return a server Advanced Threat Protection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -258,17 +240,14 @@ Mono createOrUpdateAsync( * @return a server Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters); + ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters); /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -279,10 +258,7 @@ ServerAdvancedThreatProtectionInner createOrUpdate( * @return a server Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java index 45a8ef37e9049..fda3653c5a4d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java @@ -12,13 +12,15 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAdvisorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAdvisorsClient. + */ public interface ServerAdvisorsClient { /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,14 +29,14 @@ public interface ServerAdvisorsClient { * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByServerWithResponseAsync( - String resourceGroupName, String serverName, String expand); + Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, + String expand); /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +48,9 @@ Mono>> listByServerWithResponseAsync( /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -58,14 +60,14 @@ Mono>> listByServerWithResponseAsync( * @return a list of server advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByServerWithResponse( - String resourceGroupName, String serverName, String expand, Context context); + Response> listByServerWithResponse(String resourceGroupName, String serverName, String expand, + Context context); /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -77,9 +79,9 @@ Response> listByServerWithResponse( /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,9 +94,9 @@ Response> listByServerWithResponse( /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,9 +109,9 @@ Response> listByServerWithResponse( /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param context The context to associate with this operation. @@ -119,14 +121,14 @@ Response> listByServerWithResponse( * @return a server advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String advisorName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String advisorName, + Context context); /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,27 +141,27 @@ Response getWithResponse( /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner parameters); /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -169,14 +171,14 @@ Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters); /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -187,14 +189,14 @@ Mono updateAsync( * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters, Context context); /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java index 792097da7b32a..43fcaeab316d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java @@ -11,13 +11,15 @@ import com.azure.resourcemanager.sql.fluent.models.ServerAutomaticTuningInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAutomaticTuningsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAutomaticTuningsClient. + */ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,9 +31,9 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,9 +45,9 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,9 +60,9 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -72,9 +74,9 @@ public interface ServerAutomaticTuningsClient { /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,14 +85,14 @@ public interface ServerAutomaticTuningsClient { * @return server-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters); /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,14 +101,14 @@ Mono> updateWithResponseAsync( * @return server-level Automatic Tuning on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters); /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -116,14 +118,14 @@ Mono updateAsync( * @return server-level Automatic Tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters, Context context); /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,6 +134,6 @@ Response updateWithResponse( * @return server-level Automatic Tuning. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAutomaticTuningInner update( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters); + ServerAutomaticTuningInner update(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java index 8880804080efc..246b620c8ea9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAzureADAdministratorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAzureADAdministratorsClient. + */ public interface ServerAzureADAdministratorsClient { /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,58 +39,58 @@ public interface ServerAzureADAdministratorsClient { /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Active Directory administrators in a server as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Active Directory administrators in a server as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,14 +99,14 @@ Mono> getWithResponseAsync( * @return a Azure Active Directory administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, AdministratorName administratorName); + Mono getAsync(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -114,14 +116,14 @@ Mono getAsync( * @return a Azure Active Directory administrator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context); /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,35 +132,32 @@ Response getWithResponse( * @return a Azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADAdministratorInner get( - String resourceGroupName, String serverName, AdministratorName administratorName); + ServerAzureADAdministratorInner get(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -169,16 +168,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerAzureADAdministratorInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, + String resourceGroupName, String serverName, AdministratorName administratorName, ServerAzureADAdministratorInner parameters); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -189,16 +186,14 @@ PollerFlux, ServerAzureADAdministrat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAzureADAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, + String resourceGroupName, String serverName, AdministratorName administratorName, ServerAzureADAdministratorInner parameters); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -210,17 +205,14 @@ SyncPoller, ServerAzureADAdministrat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAzureADAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context); + String resourceGroupName, String serverName, AdministratorName administratorName, + ServerAzureADAdministratorInner parameters, Context context); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -230,17 +222,14 @@ SyncPoller, ServerAzureADAdministrat * @return azure Active Directory administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -250,17 +239,14 @@ Mono createOrUpdateAsync( * @return azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADAdministratorInner createOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters); + ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters); /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -271,18 +257,14 @@ ServerAzureADAdministratorInner createOrUpdate( * @return azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADAdministratorInner createOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context); + ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters, Context context); /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,14 +273,14 @@ ServerAzureADAdministratorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,14 +289,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AdministratorName administratorName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,14 +305,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AdministratorName administratorName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AdministratorName administratorName); /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -340,14 +322,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context); /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,9 +342,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,9 +356,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java index bb45519f8dba3..c0e0ecb863680 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java @@ -25,73 +25,73 @@ public interface ServerAzureADOnlyAuthenticationsClient { /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AuthenticationName authenticationName); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,14 +100,14 @@ Mono> getWithResponseAsync( * @return a specific Azure Active Directory only authentication property on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + Mono getAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -117,14 +117,14 @@ Mono getAsync( * @return a specific Azure Active Directory only authentication property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context); /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,42 +133,39 @@ Response getWithResponse( * @return a specific Azure Active Directory only authentication property. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADOnlyAuthenticationInner get( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + ServerAzureADOnlyAuthenticationInner get(String resourceGroupName, String serverName, + AuthenticationName authenticationName); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -176,22 +173,19 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,22 +193,19 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, + beginCreateOrUpdate(String resourceGroupName, String serverName, AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -223,67 +214,57 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context); + beginCreateOrUpdate(String resourceGroupName, String serverName, AuthenticationName authenticationName, + ServerAzureADOnlyAuthenticationInner parameters, Context context); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters); + ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters); /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -291,18 +272,14 @@ ServerAzureADOnlyAuthenticationInner createOrUpdate( * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context); + ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters, Context context); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,14 +288,14 @@ ServerAzureADOnlyAuthenticationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,14 +304,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -343,14 +320,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AuthenticationName authenticationName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AuthenticationName authenticationName); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -360,14 +337,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context); /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -380,9 +357,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,9 +371,9 @@ SyncPoller, Void> beginDelete( /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java index 645b8e33ffbfa..9bd4b319510db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerBlobAuditingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerBlobAuditingPoliciesClient. + */ public interface ServerBlobAuditingPoliciesClient { /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface ServerBlobAuditingPoliciesClient { /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface ServerBlobAuditingPoliciesClient { /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,14 +63,14 @@ public interface ServerBlobAuditingPoliciesClient { * @return a list of server auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -80,9 +82,9 @@ PagedIterable listByServer( /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,9 +96,9 @@ PagedIterable listByServer( /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,14 +107,14 @@ PagedIterable listByServer( * @return a server's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + Context context); /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,9 +126,9 @@ Response getWithResponse( /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,14 +137,14 @@ Response getWithResponse( * @return a server blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,14 +153,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); + PollerFlux, ServerBlobAuditingPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,14 +169,14 @@ PollerFlux, ServerBlobAuditingPolicyIn * @return the {@link SyncPoller} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); + SyncPoller, ServerBlobAuditingPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -189,9 +191,9 @@ SyncPoller, ServerBlobAuditingPolicyIn /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,14 +202,14 @@ SyncPoller, ServerBlobAuditingPolicyIn * @return a server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,14 +218,14 @@ Mono createOrUpdateAsync( * @return a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); + ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -233,6 +235,6 @@ ServerBlobAuditingPolicyInner createOrUpdate( * @return a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context); + ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java index d3c182a535231..f49424bf39603 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerConnectionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerConnectionPoliciesClient. + */ public interface ServerConnectionPoliciesClient { /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface ServerConnectionPoliciesClient { /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface ServerConnectionPoliciesClient { /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,14 +64,14 @@ public interface ServerConnectionPoliciesClient { * @return a list of server connection policy objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,14 +80,14 @@ PagedIterable listByServer( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName); /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,14 +96,14 @@ Mono> getWithResponseAsync( * @return a server connection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName); + Mono getAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName); /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -111,14 +113,14 @@ Mono getAsync( * @return a server connection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, Context context); /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,14 +129,14 @@ Response getWithResponse( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConnectionPolicyInner get( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName); + ServerConnectionPolicyInner get(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -144,17 +146,14 @@ ServerConnectionPolicyInner get( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -165,16 +164,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerConnectionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -185,16 +182,14 @@ PollerFlux, ServerConnectionPolicyInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerConnectionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -206,17 +201,14 @@ SyncPoller, ServerConnectionPolicyInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerConnectionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context); + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, + ServerConnectionPolicyInner parameters, Context context); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -226,17 +218,14 @@ SyncPoller, ServerConnectionPolicyInner> * @return a server connection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -246,17 +235,14 @@ Mono createOrUpdateAsync( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConnectionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters); + ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters); /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -267,10 +253,6 @@ ServerConnectionPolicyInner createOrUpdate( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerConnectionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context); + ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java index 861d603fe7c27..a2184c6ca0abd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerDevOpsAuditSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerDevOpsAuditSettingsClient. + */ public interface ServerDevOpsAuditSettingsClient { /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface ServerDevOpsAuditSettingsClient { /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface ServerDevOpsAuditSettingsClient { /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,14 +63,14 @@ public interface ServerDevOpsAuditSettingsClient { * @return a list of server DevOps audit settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ PagedIterable listByServer( * @return a server's DevOps audit settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName); /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,14 +95,14 @@ Mono> getWithResponseAsync( * @return a server's DevOps audit settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName); + Mono getAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName); /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param context The context to associate with this operation. @@ -110,14 +112,14 @@ Mono getAsync( * @return a server's DevOps audit settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, Context context); /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,14 +128,14 @@ Response getWithResponse( * @return a server's DevOps audit settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDevOpsAuditingSettingsInner get( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName); + ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -143,17 +145,14 @@ ServerDevOpsAuditingSettingsInner get( * @return a server DevOps auditing settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -164,17 +163,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -185,16 +181,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerDevOpsAuditingSettingsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, + String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -206,17 +200,14 @@ SyncPoller, ServerDevOpsAuditingSe */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerDevOpsAuditingSettingsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context); + String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters, Context context); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -226,17 +217,14 @@ SyncPoller, ServerDevOpsAuditingSe * @return a server DevOps auditing settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -246,17 +234,14 @@ Mono createOrUpdateAsync( * @return a server DevOps auditing settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDevOpsAuditingSettingsInner createOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters); + ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -267,10 +252,6 @@ ServerDevOpsAuditingSettingsInner createOrUpdate( * @return a server DevOps auditing settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDevOpsAuditingSettingsInner createOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context); + ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java index 4a939c6e3fce6..96dff1bf1a161 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerDnsAliasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerDnsAliasesClient. + */ public interface ServerDnsAliasesClient { /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface ServerDnsAliasesClient { /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface ServerDnsAliasesClient { /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +68,9 @@ public interface ServerDnsAliasesClient { /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,14 +79,14 @@ public interface ServerDnsAliasesClient { * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,9 +99,9 @@ Mono> getWithResponseAsync( /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -109,14 +111,14 @@ Mono> getWithResponseAsync( * @return a server DNS alias along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String dnsAliasName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String dnsAliasName, + Context context); /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,9 +131,9 @@ Response getWithResponse( /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,14 +142,14 @@ Response getWithResponse( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName); /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,14 +158,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String dnsAliasName); + PollerFlux, ServerDnsAliasInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String dnsAliasName); /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,14 +174,14 @@ PollerFlux, ServerDnsAliasInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName); + SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String dnsAliasName); /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -189,14 +191,14 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName, Context context); + SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String dnsAliasName, Context context); /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,9 +211,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -224,9 +226,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -236,14 +238,14 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp * @return a server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDnsAliasInner createOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName, Context context); + ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serverName, String dnsAliasName, + Context context); /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,14 +254,14 @@ ServerDnsAliasInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName); /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,14 +270,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String dnsAliasName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String dnsAliasName); /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,9 +290,9 @@ PollerFlux, Void> beginDeleteAsync( /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -300,14 +302,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String dnsAliasName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String dnsAliasName, + Context context); /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,9 +322,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -334,9 +336,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -349,63 +351,63 @@ SyncPoller, Void> beginDelete( /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> acquireWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); + Mono>> acquireWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName, ServerDnsAliasAcquisition parameters); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); + PollerFlux, ServerDnsAliasInner> beginAcquireAsync(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerDnsAliasInner> beginAcquire( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); + SyncPoller, ServerDnsAliasInner> beginAcquire(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @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. @@ -413,55 +415,51 @@ SyncPoller, ServerDnsAliasInner> beginAcquire( * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context); + SyncPoller, ServerDnsAliasInner> beginAcquire(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters, Context context); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono acquireAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); + Mono acquireAsync(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDnsAliasInner acquire( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters); + ServerDnsAliasInner acquire(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters); /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @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. @@ -469,10 +467,6 @@ ServerDnsAliasInner acquire( * @return a server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerDnsAliasInner acquire( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context); + ServerDnsAliasInner acquire(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java index 191aeb0eb3328..0252fe85cccd8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerKeysClient. + */ public interface ServerKeysClient { /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface ServerKeysClient { /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface ServerKeysClient { /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,9 +67,9 @@ public interface ServerKeysClient { /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,9 +82,9 @@ public interface ServerKeysClient { /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,9 +97,9 @@ public interface ServerKeysClient { /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -107,14 +109,14 @@ public interface ServerKeysClient { * @return a server key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String keyName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String keyName, + Context context); /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,14 +129,14 @@ Response getWithResponse( /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -142,19 +144,19 @@ Response getWithResponse( * @return a server key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String keyName, ServerKeyInner parameters); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,19 +164,19 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters); + PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,19 +184,19 @@ PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerKeyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters); + SyncPoller, ServerKeyInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,19 +205,19 @@ SyncPoller, ServerKeyInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerKeyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context); + SyncPoller, ServerKeyInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters, Context context); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -223,19 +225,19 @@ SyncPoller, ServerKeyInner> beginCreateOrUpdate( * @return a server key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -243,19 +245,19 @@ Mono createOrUpdateAsync( * @return a server key. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerKeyInner createOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters); + ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters); /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,14 +266,14 @@ ServerKeyInner createOrUpdate( * @return a server key. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerKeyInner createOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context); + ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters, Context context); /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,14 +282,14 @@ ServerKeyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String keyName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String keyName); /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,9 +302,9 @@ Mono>> deleteWithResponseAsync( /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,9 +317,9 @@ Mono>> deleteWithResponseAsync( /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -327,14 +329,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String keyName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String keyName, + Context context); /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -347,9 +349,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,9 +363,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java index c48a301182cc8..a50b987376987 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerOperationInner; -/** An instance of this class provides access to all the operations defined in ServerOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerOperationsClient. + */ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,9 +31,9 @@ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,9 +45,9 @@ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java index 3a47189574648..449ccf421620e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. + */ public interface ServerSecurityAlertPoliciesClient { /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +39,9 @@ public interface ServerSecurityAlertPoliciesClient { /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,9 @@ public interface ServerSecurityAlertPoliciesClient { /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,14 +64,14 @@ public interface ServerSecurityAlertPoliciesClient { * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,14 +80,14 @@ PagedIterable listByServer( * @return a server's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,14 +96,14 @@ Mono> getWithResponseAsync( * @return a server's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); + Mono getAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -111,17 +113,14 @@ Mono getAsync( * @return a server's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context); /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,14 +129,14 @@ Response getWithResponse( * @return a server's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerSecurityAlertPolicyInner get( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); + ServerSecurityAlertPolicyInner get(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -147,17 +146,14 @@ ServerSecurityAlertPolicyInner get( * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -168,16 +164,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -188,16 +182,14 @@ PollerFlux, ServerSecurityAlertPolicy */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -209,17 +201,14 @@ SyncPoller, ServerSecurityAlertPolicy */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, - Context context); + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ServerSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -229,17 +218,14 @@ SyncPoller, ServerSecurityAlertPolicy * @return a server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -249,17 +235,14 @@ Mono createOrUpdateAsync( * @return a server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters); + ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -270,10 +253,7 @@ ServerSecurityAlertPolicyInner createOrUpdate( * @return a server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, + ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java index da58ac0f77cea..4554615ed52d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java @@ -18,112 +18,114 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerTrustCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerTrustCertificatesClient. + */ public interface ServerTrustCertificatesClient { /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedFlux}. + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName); /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 server trust certificate that was uploaded from box to Sql Managed Instance on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String managedInstanceName, String certificateName); + Mono getAsync(String resourceGroupName, String managedInstanceName, + String certificateName); /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with {@link - * Response}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String certificateName, Context context); /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,9 +138,9 @@ Response getWithResponse( /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -146,20 +148,17 @@ 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 server trust certificate imported from box to enable connection between box and Sql Managed Instance - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -167,20 +166,18 @@ Mono>> createOrUpdateWithResponseAsync( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerTrustCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, + String resourceGroupName, String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -188,20 +185,18 @@ PollerFlux, ServerTrustCertificateInner> * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerTrustCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, + String resourceGroupName, String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -210,21 +205,18 @@ SyncPoller, ServerTrustCertificateInner> * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerTrustCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context); + String resourceGroupName, String managedInstanceName, String certificateName, + ServerTrustCertificateInner parameters, Context context); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -232,20 +224,17 @@ SyncPoller, ServerTrustCertificateInner> * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -255,17 +244,14 @@ Mono createOrUpdateAsync( * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerTrustCertificateInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters); + ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters); /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -276,18 +262,14 @@ ServerTrustCertificateInner createOrUpdate( * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerTrustCertificateInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context); + ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters, Context context); /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,14 +278,14 @@ ServerTrustCertificateInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String certificateName); /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -312,14 +294,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String certificateName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String certificateName); /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -328,14 +310,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String certificateName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String certificateName); /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -345,14 +327,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String certificateName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String certificateName, Context context); /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -365,9 +347,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,9 +361,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java index 8ee2f7f00573f..44abfd4c65bd9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerTrustGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerTrustGroupsClient. + */ public interface ServerTrustGroupsClient { /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface ServerTrustGroupsClient { /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface ServerTrustGroupsClient { /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,9 +67,9 @@ public interface ServerTrustGroupsClient { /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,14 +78,14 @@ public interface ServerTrustGroupsClient { * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName); /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,9 +98,9 @@ Mono> getWithResponseAsync( /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -108,14 +110,14 @@ Mono> getWithResponseAsync( * @return a server trust group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context); + Response getWithResponse(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context); /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,9 +130,9 @@ Response getWithResponse( /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -140,14 +142,14 @@ Response getWithResponse( * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters); /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -162,9 +164,9 @@ PollerFlux, ServerTrustGroupInner> beginCreate /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -174,14 +176,14 @@ PollerFlux, ServerTrustGroupInner> beginCreate * @return the {@link SyncPoller} for polling of a server trust group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters); + SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate(String resourceGroupName, + String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters); /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -192,18 +194,14 @@ SyncPoller, ServerTrustGroupInner> beginCreate * @return the {@link SyncPoller} for polling of a server trust group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, - Context context); + SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate(String resourceGroupName, + String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters, Context context); /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -213,14 +211,14 @@ SyncPoller, ServerTrustGroupInner> beginCreate * @return a server trust group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters); /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -230,14 +228,14 @@ Mono createOrUpdateAsync( * @return a server trust group. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerTrustGroupInner createOrUpdate( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters); + ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationName, String serverTrustGroupName, + ServerTrustGroupInner parameters); /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -248,18 +246,14 @@ ServerTrustGroupInner createOrUpdate( * @return a server trust group. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerTrustGroupInner createOrUpdate( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, - Context context); + ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationName, String serverTrustGroupName, + ServerTrustGroupInner parameters, Context context); /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,14 +262,14 @@ ServerTrustGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName); /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,14 +278,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String serverTrustGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String serverTrustGroupName); /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,14 +294,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String serverTrustGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String serverTrustGroupName); /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -317,14 +311,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context); /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -337,9 +331,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,9 +345,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -366,9 +360,9 @@ SyncPoller, Void> beginDelete( /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -380,9 +374,9 @@ SyncPoller, Void> beginDelete( /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -394,9 +388,9 @@ SyncPoller, Void> beginDelete( /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,6 +399,6 @@ SyncPoller, Void> beginDelete( * @return a server trust groups by instance name as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java index a3f363543781a..d604652737590 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerUsageInner; -/** An instance of this class provides access to all the operations defined in ServerUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerUsagesClient. + */ public interface ServerUsagesClient { /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,9 +31,9 @@ public interface ServerUsagesClient { /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,9 +45,9 @@ public interface ServerUsagesClient { /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java index 0be504aaab16a..0a2686f62fc01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. + */ public interface ServerVulnerabilityAssessmentsClient { /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,9 +34,9 @@ public interface ServerVulnerabilityAssessmentsClient { /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +48,9 @@ public interface ServerVulnerabilityAssessmentsClient { /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,31 +59,31 @@ public interface ServerVulnerabilityAssessmentsClient { * @return a list of the server's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer( - String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the server's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the server's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -90,14 +92,14 @@ Mono> getWithResponseAsync( * @return the server's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono getAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -107,17 +109,14 @@ Mono getAsync( * @return the server's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,16 +125,16 @@ Response getWithResponse( * @return the server's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerVulnerabilityAssessmentInner get( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + ServerVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -145,19 +144,17 @@ ServerVulnerabilityAssessmentInner get( * @return a server vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters); /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -167,19 +164,16 @@ Mono> createOrUpdateWithResponseAsy * @return a server vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters); /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -190,20 +184,17 @@ Mono createOrUpdateAsync( * @return a server vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters, + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters, Context context); /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -213,17 +204,14 @@ Response createOrUpdateWithResponse( * @return a server vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters); + ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters); /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -232,14 +220,14 @@ ServerVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,14 +236,14 @@ Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono deleteAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -265,17 +253,14 @@ Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java index 95f8a69c5a97d..2a8bee8a1f945 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java @@ -26,26 +26,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServersClient. */ +/** + * An instance of this class provides access to all the operations defined in ServersClient. + */ public interface ServersClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> checkNameAvailabilityWithResponseAsync( - CheckNameAvailabilityRequest parameters); + Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters); /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,7 +59,7 @@ Mono> checkNameAvailabilityWithResp /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,12 +68,12 @@ Mono> checkNameAvailabilityWithResp * @return the result of a name availability check along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest parameters, Context context); + Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context); /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,7 +85,7 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,7 +97,7 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of all servers 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. * @return a list of all servers in the subscription as paginated response with {@link PagedFlux}. @@ -105,7 +107,7 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of all servers 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. * @return a list of all servers in the subscription as paginated response with {@link PagedIterable}. @@ -115,7 +117,7 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,9 +130,9 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -142,9 +144,9 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -155,9 +157,9 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -168,9 +170,9 @@ Response checkNameAvailabilityWithResponse( /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,9 +185,9 @@ Response checkNameAvailabilityWithResponse( /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,14 +196,14 @@ Response checkNameAvailabilityWithResponse( * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String serverName, String expand); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand); /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -213,9 +215,9 @@ Mono> getByResourceGroupWithResponseAsync( /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -225,14 +227,14 @@ Mono> getByResourceGroupWithResponseAsync( * @return a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String serverName, String expand, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, String expand, + Context context); /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -244,9 +246,9 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,14 +257,14 @@ Response getByResourceGroupWithResponse( * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerInner parameters); /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,14 +273,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerInner parameters); + PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters); /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,14 +289,14 @@ PollerFlux, ServerInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerInner parameters); + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, + ServerInner parameters); /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -304,14 +306,14 @@ SyncPoller, ServerInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerInner parameters, Context context); + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, + ServerInner parameters, Context context); /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,9 +326,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,9 +341,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -355,9 +357,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -369,9 +371,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -383,9 +385,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -397,9 +399,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -412,9 +414,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -426,9 +428,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -439,9 +441,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,9 +455,9 @@ SyncPoller, ServerInner> beginCreateOrUpdate( /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,14 +466,14 @@ SyncPoller, ServerInner> beginCreateOrUpdate( * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate parameters); /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -480,14 +482,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginUpdateAsync( - String resourceGroupName, String serverName, ServerUpdate parameters); + PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, + ServerUpdate parameters); /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -496,14 +498,14 @@ PollerFlux, ServerInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginUpdate( - String resourceGroupName, String serverName, ServerUpdate parameters); + SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters); /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -513,14 +515,14 @@ SyncPoller, ServerInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginUpdate( - String resourceGroupName, String serverName, ServerUpdate parameters, Context context); + SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context); /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -533,9 +535,9 @@ SyncPoller, ServerInner> beginUpdate( /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,9 +550,9 @@ SyncPoller, ServerInner> beginUpdate( /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -564,26 +566,26 @@ SyncPoller, ServerInner> beginUpdate( /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> importDatabaseWithResponseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); + Mono>> importDatabaseWithResponseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -592,14 +594,14 @@ Mono>> importDatabaseWithResponseAsync( * @return the {@link PollerFlux} for polling of an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ImportExportOperationResultInner> beginImportDatabaseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); + PollerFlux, ImportExportOperationResultInner> + beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -608,14 +610,14 @@ PollerFlux, ImportExportOperationRe * @return the {@link SyncPoller} for polling of an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ImportExportOperationResultInner> beginImportDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); + SyncPoller, ImportExportOperationResultInner> + beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -630,9 +632,9 @@ SyncPoller, ImportExportOperationRe /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -641,14 +643,14 @@ SyncPoller, ImportExportOperationRe * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono importDatabaseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); + Mono importDatabaseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -657,14 +659,14 @@ Mono importDatabaseAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner importDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters); + ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters); /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -674,6 +676,6 @@ ImportExportOperationResultInner importDatabase( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ImportExportOperationResultInner importDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context); + ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java index 3ed2b168f21c7..50ad4bcde7b01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java @@ -11,29 +11,31 @@ import com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SqlAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SqlAgentsClient. + */ public interface SqlAgentsClient { /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return current instance sql agent configuration along with {@link Response} on successful completion of {@link - * Mono}. + * @return current instance sql agent configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName); /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ Mono> getWithResponseAsync( /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,14 +58,14 @@ Mono> getWithResponseAsync( * @return current instance sql agent configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String managedInstanceName, Context context); + Response getWithResponse(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -75,44 +77,44 @@ Response getWithResponse( /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SqlAgentConfigurationInner parameters); /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + SqlAgentConfigurationInner parameters); /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @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. @@ -120,22 +122,22 @@ Mono createOrUpdateAsync( * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, SqlAgentConfigurationInner parameters, Context context); /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 recoverable managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SqlAgentConfigurationInner createOrUpdate( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters); + SqlAgentConfigurationInner createOrUpdate(String resourceGroupName, String managedInstanceName, + SqlAgentConfigurationInner parameters); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java index cb50a37ec967d..b8e2d60e24162 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java @@ -7,585 +7,587 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for SqlManagementClient class. */ +/** + * The interface for SqlManagementClient class. + */ public interface SqlManagementClient { /** * Gets The subscription ID that identifies an Azure subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the BackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the BackupShortTermRetentionPoliciesClient object. */ BackupShortTermRetentionPoliciesClient getBackupShortTermRetentionPolicies(); /** * Gets the ServerBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ServerBlobAuditingPoliciesClient object. */ ServerBlobAuditingPoliciesClient getServerBlobAuditingPolicies(); /** * Gets the DatabaseBlobAuditingPoliciesClient object to access its operations. - * + * * @return the DatabaseBlobAuditingPoliciesClient object. */ DatabaseBlobAuditingPoliciesClient getDatabaseBlobAuditingPolicies(); /** * Gets the ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ExtendedDatabaseBlobAuditingPoliciesClient object. */ ExtendedDatabaseBlobAuditingPoliciesClient getExtendedDatabaseBlobAuditingPolicies(); /** * Gets the ExtendedServerBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ExtendedServerBlobAuditingPoliciesClient object. */ ExtendedServerBlobAuditingPoliciesClient getExtendedServerBlobAuditingPolicies(); /** * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. - * + * * @return the DatabaseAdvancedThreatProtectionSettingsClient object. */ DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings(); /** * Gets the DatabaseAdvisorsClient object to access its operations. - * + * * @return the DatabaseAdvisorsClient object. */ DatabaseAdvisorsClient getDatabaseAdvisors(); /** * Gets the DatabaseAutomaticTuningsClient object to access its operations. - * + * * @return the DatabaseAutomaticTuningsClient object. */ DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings(); /** * Gets the DatabaseColumnsClient object to access its operations. - * + * * @return the DatabaseColumnsClient object. */ DatabaseColumnsClient getDatabaseColumns(); /** * Gets the DatabaseExtensionsOperationsClient object to access its operations. - * + * * @return the DatabaseExtensionsOperationsClient object. */ DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations(); /** * Gets the DatabaseOperationsClient object to access its operations. - * + * * @return the DatabaseOperationsClient object. */ DatabaseOperationsClient getDatabaseOperations(); /** * Gets the DatabaseRecommendedActionsClient object to access its operations. - * + * * @return the DatabaseRecommendedActionsClient object. */ DatabaseRecommendedActionsClient getDatabaseRecommendedActions(); /** * Gets the DatabasesClient object to access its operations. - * + * * @return the DatabasesClient object. */ DatabasesClient getDatabases(); /** * Gets the DatabaseSchemasClient object to access its operations. - * + * * @return the DatabaseSchemasClient object. */ DatabaseSchemasClient getDatabaseSchemas(); /** * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. - * + * * @return the DatabaseSecurityAlertPoliciesClient object. */ DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies(); /** * Gets the DatabaseTablesClient object to access its operations. - * + * * @return the DatabaseTablesClient object. */ DatabaseTablesClient getDatabaseTables(); /** * Gets the DatabaseUsagesClient object to access its operations. - * + * * @return the DatabaseUsagesClient object. */ DatabaseUsagesClient getDatabaseUsages(); /** * Gets the DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ DatabaseVulnerabilityAssessmentRuleBaselinesClient getDatabaseVulnerabilityAssessmentRuleBaselines(); /** * Gets the DatabaseVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentsClient object. */ DatabaseVulnerabilityAssessmentsClient getDatabaseVulnerabilityAssessments(); /** * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentScansClient object. */ DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans(); /** * Gets the DataMaskingPoliciesClient object to access its operations. - * + * * @return the DataMaskingPoliciesClient object. */ DataMaskingPoliciesClient getDataMaskingPolicies(); /** * Gets the DataMaskingRulesClient object to access its operations. - * + * * @return the DataMaskingRulesClient object. */ DataMaskingRulesClient getDataMaskingRules(); /** * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. - * + * * @return the DataWarehouseUserActivitiesOperationsClient object. */ DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations(); /** * Gets the DeletedServersClient object to access its operations. - * + * * @return the DeletedServersClient object. */ DeletedServersClient getDeletedServers(); /** * Gets the DistributedAvailabilityGroupsClient object to access its operations. - * + * * @return the DistributedAvailabilityGroupsClient object. */ DistributedAvailabilityGroupsClient getDistributedAvailabilityGroups(); /** * Gets the ElasticPoolOperationsClient object to access its operations. - * + * * @return the ElasticPoolOperationsClient object. */ ElasticPoolOperationsClient getElasticPoolOperations(); /** * Gets the ElasticPoolsClient object to access its operations. - * + * * @return the ElasticPoolsClient object. */ ElasticPoolsClient getElasticPools(); /** * Gets the EncryptionProtectorsClient object to access its operations. - * + * * @return the EncryptionProtectorsClient object. */ EncryptionProtectorsClient getEncryptionProtectors(); /** * Gets the EndpointCertificatesClient object to access its operations. - * + * * @return the EndpointCertificatesClient object. */ EndpointCertificatesClient getEndpointCertificates(); /** * Gets the FailoverGroupsClient object to access its operations. - * + * * @return the FailoverGroupsClient object. */ FailoverGroupsClient getFailoverGroups(); /** * Gets the FirewallRulesClient object to access its operations. - * + * * @return the FirewallRulesClient object. */ FirewallRulesClient getFirewallRules(); /** * Gets the GeoBackupPoliciesClient object to access its operations. - * + * * @return the GeoBackupPoliciesClient object. */ GeoBackupPoliciesClient getGeoBackupPolicies(); /** * Gets the InstanceFailoverGroupsClient object to access its operations. - * + * * @return the InstanceFailoverGroupsClient object. */ InstanceFailoverGroupsClient getInstanceFailoverGroups(); /** * Gets the InstancePoolsClient object to access its operations. - * + * * @return the InstancePoolsClient object. */ InstancePoolsClient getInstancePools(); /** * Gets the IPv6FirewallRulesClient object to access its operations. - * + * * @return the IPv6FirewallRulesClient object. */ IPv6FirewallRulesClient getIPv6FirewallRules(); /** * Gets the JobAgentsClient object to access its operations. - * + * * @return the JobAgentsClient object. */ JobAgentsClient getJobAgents(); /** * Gets the JobCredentialsClient object to access its operations. - * + * * @return the JobCredentialsClient object. */ JobCredentialsClient getJobCredentials(); /** * Gets the JobExecutionsClient object to access its operations. - * + * * @return the JobExecutionsClient object. */ JobExecutionsClient getJobExecutions(); /** * Gets the JobsClient object to access its operations. - * + * * @return the JobsClient object. */ JobsClient getJobs(); /** * Gets the JobStepExecutionsClient object to access its operations. - * + * * @return the JobStepExecutionsClient object. */ JobStepExecutionsClient getJobStepExecutions(); /** * Gets the JobStepsClient object to access its operations. - * + * * @return the JobStepsClient object. */ JobStepsClient getJobSteps(); /** * Gets the JobTargetExecutionsClient object to access its operations. - * + * * @return the JobTargetExecutionsClient object. */ JobTargetExecutionsClient getJobTargetExecutions(); /** * Gets the JobTargetGroupsClient object to access its operations. - * + * * @return the JobTargetGroupsClient object. */ JobTargetGroupsClient getJobTargetGroups(); /** * Gets the JobVersionsClient object to access its operations. - * + * * @return the JobVersionsClient object. */ JobVersionsClient getJobVersions(); /** * Gets the LedgerDigestUploadsOperationsClient object to access its operations. - * + * * @return the LedgerDigestUploadsOperationsClient object. */ LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations(); /** * Gets the CapabilitiesClient object to access its operations. - * + * * @return the CapabilitiesClient object. */ CapabilitiesClient getCapabilities(); /** * Gets the LongTermRetentionBackupsClient object to access its operations. - * + * * @return the LongTermRetentionBackupsClient object. */ LongTermRetentionBackupsClient getLongTermRetentionBackups(); /** * Gets the LongTermRetentionManagedInstanceBackupsClient object to access its operations. - * + * * @return the LongTermRetentionManagedInstanceBackupsClient object. */ LongTermRetentionManagedInstanceBackupsClient getLongTermRetentionManagedInstanceBackups(); /** * Gets the LongTermRetentionPoliciesClient object to access its operations. - * + * * @return the LongTermRetentionPoliciesClient object. */ LongTermRetentionPoliciesClient getLongTermRetentionPolicies(); /** * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. - * + * * @return the MaintenanceWindowOptionsOperationsClient object. */ MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations(); /** * Gets the MaintenanceWindowsOperationsClient object to access its operations. - * + * * @return the MaintenanceWindowsOperationsClient object. */ MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations(); /** * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedBackupShortTermRetentionPoliciesClient object. */ ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies(); /** * Gets the ManagedDatabaseColumnsClient object to access its operations. - * + * * @return the ManagedDatabaseColumnsClient object. */ ManagedDatabaseColumnsClient getManagedDatabaseColumns(); /** * Gets the ManagedDatabaseQueriesClient object to access its operations. - * + * * @return the ManagedDatabaseQueriesClient object. */ ManagedDatabaseQueriesClient getManagedDatabaseQueries(); /** * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. - * + * * @return the ManagedDatabaseRestoreDetailsClient object. */ ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails(); /** * Gets the ManagedDatabasesClient object to access its operations. - * + * * @return the ManagedDatabasesClient object. */ ManagedDatabasesClient getManagedDatabases(); /** * Gets the ManagedDatabaseSchemasClient object to access its operations. - * + * * @return the ManagedDatabaseSchemasClient object. */ ManagedDatabaseSchemasClient getManagedDatabaseSchemas(); /** * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ManagedDatabaseSecurityAlertPoliciesClient object. */ ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies(); /** * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. - * + * * @return the ManagedDatabaseSecurityEventsClient object. */ ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents(); /** * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. - * + * * @return the ManagedDatabaseSensitivityLabelsClient object. */ ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels(); /** * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. - * + * * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. */ ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels(); /** * Gets the ManagedDatabaseTablesClient object to access its operations. - * + * * @return the ManagedDatabaseTablesClient object. */ ManagedDatabaseTablesClient getManagedDatabaseTables(); /** * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. - * + * * @return the ManagedDatabaseTransparentDataEncryptionsClient object. */ ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions(); /** * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient getManagedDatabaseVulnerabilityAssessmentRuleBaselines(); /** * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. */ ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments(); /** * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. */ ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans(); /** * Gets the ManagedInstanceAdministratorsClient object to access its operations. - * + * * @return the ManagedInstanceAdministratorsClient object. */ ManagedInstanceAdministratorsClient getManagedInstanceAdministrators(); /** * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. - * + * * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. */ ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications(); /** * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. - * + * * @return the ManagedInstanceEncryptionProtectorsClient object. */ ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors(); /** * Gets the ManagedInstanceKeysClient object to access its operations. - * + * * @return the ManagedInstanceKeysClient object. */ ManagedInstanceKeysClient getManagedInstanceKeys(); /** * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedInstanceLongTermRetentionPoliciesClient object. */ ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies(); /** * Gets the ManagedInstanceOperationsClient object to access its operations. - * + * * @return the ManagedInstanceOperationsClient object. */ ManagedInstanceOperationsClient getManagedInstanceOperations(); /** * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. - * + * * @return the ManagedInstancePrivateEndpointConnectionsClient object. */ ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections(); /** * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. - * + * * @return the ManagedInstancePrivateLinkResourcesClient object. */ ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources(); /** * Gets the ManagedInstancesClient object to access its operations. - * + * * @return the ManagedInstancesClient object. */ ManagedInstancesClient getManagedInstances(); /** * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. - * + * * @return the ManagedInstanceTdeCertificatesClient object. */ ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates(); /** * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ManagedInstanceVulnerabilityAssessmentsClient object. */ ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments(); /** * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. */ ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient @@ -593,301 +595,301 @@ public interface SqlManagementClient { /** * Gets the ManagedServerDnsAliasesClient object to access its operations. - * + * * @return the ManagedServerDnsAliasesClient object. */ ManagedServerDnsAliasesClient getManagedServerDnsAliases(); /** * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ManagedServerSecurityAlertPoliciesClient object. */ ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the OutboundFirewallRulesClient object to access its operations. - * + * * @return the OutboundFirewallRulesClient object. */ OutboundFirewallRulesClient getOutboundFirewallRules(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ PrivateLinkResourcesClient getPrivateLinkResources(); /** * Gets the RecoverableDatabasesClient object to access its operations. - * + * * @return the RecoverableDatabasesClient object. */ RecoverableDatabasesClient getRecoverableDatabases(); /** * Gets the RecoverableManagedDatabasesClient object to access its operations. - * + * * @return the RecoverableManagedDatabasesClient object. */ RecoverableManagedDatabasesClient getRecoverableManagedDatabases(); /** * Gets the ReplicationLinksClient object to access its operations. - * + * * @return the ReplicationLinksClient object. */ ReplicationLinksClient getReplicationLinks(); /** * Gets the RestorableDroppedDatabasesClient object to access its operations. - * + * * @return the RestorableDroppedDatabasesClient object. */ RestorableDroppedDatabasesClient getRestorableDroppedDatabases(); /** * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. - * + * * @return the RestorableDroppedManagedDatabasesClient object. */ RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases(); /** * Gets the RestorePointsClient object to access its operations. - * + * * @return the RestorePointsClient object. */ RestorePointsClient getRestorePoints(); /** * Gets the SensitivityLabelsClient object to access its operations. - * + * * @return the SensitivityLabelsClient object. */ SensitivityLabelsClient getSensitivityLabels(); /** * Gets the RecommendedSensitivityLabelsClient object to access its operations. - * + * * @return the RecommendedSensitivityLabelsClient object. */ RecommendedSensitivityLabelsClient getRecommendedSensitivityLabels(); /** * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. - * + * * @return the ServerAdvancedThreatProtectionSettingsClient object. */ ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings(); /** * Gets the ServerAdvisorsClient object to access its operations. - * + * * @return the ServerAdvisorsClient object. */ ServerAdvisorsClient getServerAdvisors(); /** * Gets the ServerAutomaticTuningsClient object to access its operations. - * + * * @return the ServerAutomaticTuningsClient object. */ ServerAutomaticTuningsClient getServerAutomaticTunings(); /** * Gets the ServerAzureADAdministratorsClient object to access its operations. - * + * * @return the ServerAzureADAdministratorsClient object. */ ServerAzureADAdministratorsClient getServerAzureADAdministrators(); /** * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. - * + * * @return the ServerAzureADOnlyAuthenticationsClient object. */ ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications(); /** * Gets the ServerConnectionPoliciesClient object to access its operations. - * + * * @return the ServerConnectionPoliciesClient object. */ ServerConnectionPoliciesClient getServerConnectionPolicies(); /** * Gets the ServerDevOpsAuditSettingsClient object to access its operations. - * + * * @return the ServerDevOpsAuditSettingsClient object. */ ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings(); /** * Gets the ServerDnsAliasesClient object to access its operations. - * + * * @return the ServerDnsAliasesClient object. */ ServerDnsAliasesClient getServerDnsAliases(); /** * Gets the ServerKeysClient object to access its operations. - * + * * @return the ServerKeysClient object. */ ServerKeysClient getServerKeys(); /** * Gets the ServerOperationsClient object to access its operations. - * + * * @return the ServerOperationsClient object. */ ServerOperationsClient getServerOperations(); /** * Gets the ServersClient object to access its operations. - * + * * @return the ServersClient object. */ ServersClient getServers(); /** * Gets the ServerSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ServerSecurityAlertPoliciesClient object. */ ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies(); /** * Gets the ServerTrustCertificatesClient object to access its operations. - * + * * @return the ServerTrustCertificatesClient object. */ ServerTrustCertificatesClient getServerTrustCertificates(); /** * Gets the ServerTrustGroupsClient object to access its operations. - * + * * @return the ServerTrustGroupsClient object. */ ServerTrustGroupsClient getServerTrustGroups(); /** * Gets the ServerUsagesClient object to access its operations. - * + * * @return the ServerUsagesClient object. */ ServerUsagesClient getServerUsages(); /** * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ServerVulnerabilityAssessmentsClient object. */ ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments(); /** * Gets the SqlAgentsClient object to access its operations. - * + * * @return the SqlAgentsClient object. */ SqlAgentsClient getSqlAgents(); /** * Gets the SubscriptionUsagesClient object to access its operations. - * + * * @return the SubscriptionUsagesClient object. */ SubscriptionUsagesClient getSubscriptionUsages(); /** * Gets the SyncAgentsClient object to access its operations. - * + * * @return the SyncAgentsClient object. */ SyncAgentsClient getSyncAgents(); /** * Gets the SyncGroupsClient object to access its operations. - * + * * @return the SyncGroupsClient object. */ SyncGroupsClient getSyncGroups(); /** * Gets the SyncMembersClient object to access its operations. - * + * * @return the SyncMembersClient object. */ SyncMembersClient getSyncMembers(); /** * Gets the TdeCertificatesClient object to access its operations. - * + * * @return the TdeCertificatesClient object. */ TdeCertificatesClient getTdeCertificates(); /** * Gets the TimeZonesClient object to access its operations. - * + * * @return the TimeZonesClient object. */ TimeZonesClient getTimeZones(); /** * Gets the TransparentDataEncryptionsClient object to access its operations. - * + * * @return the TransparentDataEncryptionsClient object. */ TransparentDataEncryptionsClient getTransparentDataEncryptions(); /** * Gets the UsagesClient object to access its operations. - * + * * @return the UsagesClient object. */ UsagesClient getUsages(); /** * Gets the VirtualClustersClient object to access its operations. - * + * * @return the VirtualClustersClient object. */ VirtualClustersClient getVirtualClusters(); /** * Gets the VirtualNetworkRulesClient object to access its operations. - * + * * @return the VirtualNetworkRulesClient object. */ VirtualNetworkRulesClient getVirtualNetworkRules(); /** * Gets the WorkloadClassifiersClient object to access its operations. - * + * * @return the WorkloadClassifiersClient object. */ WorkloadClassifiersClient getWorkloadClassifiers(); /** * Gets the WorkloadGroupsClient object to access its operations. - * + * * @return the WorkloadGroupsClient object. */ WorkloadGroupsClient getWorkloadGroups(); diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java index bbd1fce387502..68c682c08c534 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.sql.fluent.models.SubscriptionUsageInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SubscriptionUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in SubscriptionUsagesClient. + */ public interface SubscriptionUsagesClient { /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,7 +31,7 @@ public interface SubscriptionUsagesClient { /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,7 +43,7 @@ public interface SubscriptionUsagesClient { /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +56,7 @@ public interface SubscriptionUsagesClient { /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ public interface SubscriptionUsagesClient { /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +82,7 @@ public interface SubscriptionUsagesClient { /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @param context The context to associate with this operation. @@ -94,7 +96,7 @@ public interface SubscriptionUsagesClient { /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java index 72cb698d6949d..202451f5eea44 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java @@ -20,13 +20,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncAgentsClient. + */ public interface SyncAgentsClient { /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,9 +40,9 @@ public interface SyncAgentsClient { /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +54,9 @@ public interface SyncAgentsClient { /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,9 +69,9 @@ public interface SyncAgentsClient { /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,14 +80,14 @@ public interface SyncAgentsClient { * @return a sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName); /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,9 +100,9 @@ Mono> getWithResponseAsync( /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -110,14 +112,14 @@ Mono> getWithResponseAsync( * @return a sync agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String syncAgentName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String syncAgentName, + Context context); /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,9 +132,9 @@ Response getWithResponse( /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -142,14 +144,14 @@ Response getWithResponse( * @return an Azure SQL Database sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName, SyncAgentInner parameters); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -159,14 +161,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters); + PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -176,14 +178,14 @@ PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters); + SyncPoller, SyncAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -194,14 +196,14 @@ SyncPoller, SyncAgentInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context); + SyncPoller, SyncAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters, Context context); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -211,14 +213,14 @@ SyncPoller, SyncAgentInner> beginCreateOrUpdate( * @return an Azure SQL Database sync agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -228,14 +230,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncAgentInner createOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters); + SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters); /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -246,14 +248,14 @@ SyncAgentInner createOrUpdate( * @return an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncAgentInner createOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context); + SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters, Context context); /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,14 +264,14 @@ SyncAgentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName); /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,14 +280,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String syncAgentName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String syncAgentName); /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -298,9 +300,9 @@ PollerFlux, Void> beginDeleteAsync( /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -310,14 +312,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String syncAgentName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String syncAgentName, + Context context); /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,9 +332,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,9 +346,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -359,26 +361,26 @@ SyncPoller, Void> beginDelete( /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of an Azure SQL Database sync agent key along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> generateKeyWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName); + Mono> generateKeyWithResponseAsync(String resourceGroupName, + String serverName, String syncAgentName); /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -387,14 +389,14 @@ Mono> generateKeyWithResponseAsync( * @return properties of an Azure SQL Database sync agent key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono generateKeyAsync( - String resourceGroupName, String serverName, String syncAgentName); + Mono generateKeyAsync(String resourceGroupName, String serverName, + String syncAgentName); /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -404,14 +406,14 @@ Mono generateKeyAsync( * @return properties of an Azure SQL Database sync agent key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response generateKeyWithResponse( - String resourceGroupName, String serverName, String syncAgentName, Context context); + Response generateKeyWithResponse(String resourceGroupName, String serverName, + String syncAgentName, Context context); /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -424,9 +426,9 @@ Response generateKeyWithResponse( /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -435,14 +437,14 @@ Response generateKeyWithResponse( * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listLinkedDatabasesAsync( - String resourceGroupName, String serverName, String syncAgentName); + PagedFlux listLinkedDatabasesAsync(String resourceGroupName, String serverName, + String syncAgentName); /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,14 +453,14 @@ PagedFlux listLinkedDatabasesAsync( * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedDatabases( - String resourceGroupName, String serverName, String syncAgentName); + PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, + String syncAgentName); /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -468,6 +470,6 @@ PagedIterable listLinkedDatabases( * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedDatabases( - String resourceGroupName, String serverName, String syncAgentName, Context context); + PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, + String syncAgentName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java index 773ab3a3bc238..64fd5905de038 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java @@ -22,11 +22,13 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncGroupsClient. + */ public interface SyncGroupsClient { /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,7 +40,7 @@ public interface SyncGroupsClient { /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,7 +52,7 @@ public interface SyncGroupsClient { /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,9 +65,9 @@ public interface SyncGroupsClient { /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,9 +80,9 @@ public interface SyncGroupsClient { /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,9 +95,9 @@ public interface SyncGroupsClient { /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param context The context to associate with this operation. @@ -105,14 +107,14 @@ public interface SyncGroupsClient { * @return a list of sync groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -122,14 +124,14 @@ PagedIterable listByDatabase( * @return a sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -139,14 +141,14 @@ Mono> getWithResponseAsync( * @return a sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -157,14 +159,14 @@ Mono getAsync( * @return a sync group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -178,9 +180,9 @@ Response getWithResponse( /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -191,18 +193,14 @@ Response getWithResponse( * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -213,18 +211,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -235,18 +229,14 @@ PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -258,19 +248,14 @@ SyncPoller, SyncGroupInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context); + SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -281,18 +266,14 @@ SyncPoller, SyncGroupInner> beginCreateOrUpdate( * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -303,18 +284,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters); /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -326,19 +303,14 @@ SyncGroupInner createOrUpdate( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context); + SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context); /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -348,14 +320,14 @@ SyncGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -365,14 +337,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -382,14 +354,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -400,14 +372,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -421,9 +393,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -436,9 +408,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -448,14 +420,14 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + Context context); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -466,18 +438,14 @@ void delete( * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -488,18 +456,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncGroupInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -510,18 +474,14 @@ PollerFlux, SyncGroupInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -533,19 +493,14 @@ SyncPoller, SyncGroupInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context); + SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters, Context context); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -556,18 +511,14 @@ SyncPoller, SyncGroupInner> beginUpdate( * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -578,18 +529,14 @@ Mono updateAsync( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, + SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters); /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -601,19 +548,14 @@ SyncGroupInner update( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context); + SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters, Context context); /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -623,14 +565,14 @@ SyncGroupInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> cancelSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono> cancelSyncWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -644,9 +586,9 @@ Mono> cancelSyncWithResponseAsync( /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -657,14 +599,14 @@ Mono> cancelSyncWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelSyncWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + Response cancelSyncWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -677,9 +619,9 @@ Response cancelSyncWithResponse( /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -689,14 +631,14 @@ Response cancelSyncWithResponse( * @return a collection of hub database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listHubSchemasAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PagedFlux listHubSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -706,14 +648,14 @@ PagedFlux listHubSchemasAsync( * @return a collection of hub database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listHubSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PagedIterable listHubSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -724,14 +666,14 @@ PagedIterable listHubSchemas( * @return a collection of hub database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listHubSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + PagedIterable listHubSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context); /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -745,21 +687,15 @@ PagedIterable listHubSchemas( * @return a collection of sync group logs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listLogsAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, + PagedFlux listLogsAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type, String continuationToken); /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -772,20 +708,14 @@ PagedFlux listLogsAsync( * @return a collection of sync group logs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listLogsAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type); + PagedFlux listLogsAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type); /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -798,20 +728,14 @@ PagedFlux listLogsAsync( * @return a collection of sync group logs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLogs( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type); + PagedIterable listLogs(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type); /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -826,22 +750,15 @@ PagedIterable listLogs( * @return a collection of sync group logs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLogs( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, - String continuationToken, - Context context); + PagedIterable listLogs(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type, + String continuationToken, Context context); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -851,14 +768,14 @@ PagedIterable listLogs( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> refreshHubSchemaWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono>> refreshHubSchemaWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -868,14 +785,14 @@ Mono>> refreshHubSchemaWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRefreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PollerFlux, Void> beginRefreshHubSchemaAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -885,14 +802,14 @@ PollerFlux, Void> beginRefreshHubSchemaAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + SyncPoller, Void> beginRefreshHubSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -903,14 +820,14 @@ SyncPoller, Void> beginRefreshHubSchema( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + SyncPoller, Void> beginRefreshHubSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -920,14 +837,14 @@ SyncPoller, Void> beginRefreshHubSchema( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono refreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono refreshHubSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -940,9 +857,9 @@ Mono refreshHubSchemaAsync( /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -952,14 +869,14 @@ Mono refreshHubSchemaAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void refreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + void refreshHubSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + Context context); /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -969,14 +886,14 @@ void refreshHubSchema( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> triggerSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono> triggerSyncWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -990,9 +907,9 @@ Mono> triggerSyncWithResponseAsync( /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1003,14 +920,14 @@ Mono> triggerSyncWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response triggerSyncWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + Response triggerSyncWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java index afea1b2d37f68..b577f8b4300dc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java @@ -19,13 +19,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncMembersClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncMembersClient. + */ public interface SyncMembersClient { /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -35,14 +37,14 @@ public interface SyncMembersClient { * @return a list of Azure SQL Database sync members as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySyncGroupAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -52,14 +54,14 @@ PagedFlux listBySyncGroupAsync( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySyncGroup( - String resourceGroupName, String serverName, String databaseName, String syncGroupName); + PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -70,14 +72,14 @@ PagedIterable listBySyncGroup( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySyncGroup( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context); + PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -88,14 +90,14 @@ PagedIterable listBySyncGroup( * @return a sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -106,14 +108,14 @@ Mono> getWithResponseAsync( * @return a sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName); /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -125,19 +127,14 @@ Mono getAsync( * @return a sync member along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context); /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -148,14 +145,14 @@ Response getWithResponse( * @return a sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner get( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + SyncMemberInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -167,19 +164,14 @@ SyncMemberInner get( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -191,19 +183,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -215,19 +203,15 @@ PollerFlux, SyncMemberInner> beginCreateOrUpdateAsyn * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -240,20 +224,15 @@ SyncPoller, SyncMemberInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -265,19 +244,14 @@ SyncPoller, SyncMemberInner> beginCreateOrUpdate( * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -289,19 +263,14 @@ Mono createOrUpdateAsync( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -314,20 +283,14 @@ SyncMemberInner createOrUpdate( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context); + SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -338,14 +301,14 @@ SyncMemberInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -356,14 +319,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -374,14 +337,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -393,19 +356,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -416,14 +374,14 @@ SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -433,14 +391,14 @@ Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -451,19 +409,14 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, Context context); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -475,19 +428,14 @@ void delete( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -499,19 +447,15 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncMemberInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -523,19 +467,14 @@ PollerFlux, SyncMemberInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -548,20 +487,14 @@ SyncPoller, SyncMemberInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context); + SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -573,19 +506,14 @@ SyncPoller, SyncMemberInner> beginUpdate( * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -597,19 +525,14 @@ Mono updateAsync( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters); + SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, SyncMemberInner parameters); /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -622,20 +545,14 @@ SyncMemberInner update( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context); + SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, SyncMemberInner parameters, Context context); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -646,14 +563,14 @@ SyncMemberInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> refreshMemberSchemaWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono>> refreshMemberSchemaWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -664,14 +581,14 @@ Mono>> refreshMemberSchemaWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRefreshMemberSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + PollerFlux, Void> beginRefreshMemberSchemaAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -682,14 +599,14 @@ PollerFlux, Void> beginRefreshMemberSchemaAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshMemberSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + SyncPoller, Void> beginRefreshMemberSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -701,19 +618,14 @@ SyncPoller, Void> beginRefreshMemberSchema( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRefreshMemberSchema( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + SyncPoller, Void> beginRefreshMemberSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -724,14 +636,14 @@ SyncPoller, Void> beginRefreshMemberSchema( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono refreshMemberSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + Mono refreshMemberSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -741,14 +653,14 @@ Mono refreshMemberSchemaAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void refreshMemberSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + void refreshMemberSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -759,19 +671,14 @@ void refreshMemberSchema( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void refreshMemberSchema( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + void refreshMemberSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, Context context); /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -782,14 +689,14 @@ void refreshMemberSchema( * @return a sync member database schema as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listMemberSchemasAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + PagedFlux listMemberSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -800,14 +707,14 @@ PagedFlux listMemberSchemasAsync( * @return a sync member database schema as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMemberSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName); + PagedIterable listMemberSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -819,11 +726,6 @@ PagedIterable listMemberSchemas( * @return a sync member database schema as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMemberSchemas( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context); + PagedIterable listMemberSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java index c19fb88d41254..f3ac5f40ac5dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java @@ -16,13 +16,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TdeCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in TdeCertificatesClient. + */ public interface TdeCertificatesClient { /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,14 +33,14 @@ public interface TdeCertificatesClient { * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, TdeCertificate parameters); + Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,14 +49,14 @@ Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String serverName, TdeCertificate parameters); + PollerFlux, Void> beginCreateAsync(String resourceGroupName, String serverName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,14 +65,14 @@ PollerFlux, Void> beginCreateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreate( - String resourceGroupName, String serverName, TdeCertificate parameters); + SyncPoller, Void> beginCreate(String resourceGroupName, String serverName, + TdeCertificate parameters); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -80,14 +82,14 @@ SyncPoller, Void> beginCreate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCreate( - String resourceGroupName, String serverName, TdeCertificate parameters, Context context); + SyncPoller, Void> beginCreate(String resourceGroupName, String serverName, + TdeCertificate parameters, Context context); /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,9 +102,9 @@ SyncPoller, Void> beginCreate( /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,9 +116,9 @@ SyncPoller, Void> beginCreate( /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java index fe55fb7f66e5b..17e73c8740bcc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.sql.fluent.models.TimeZoneInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TimeZonesClient. */ +/** + * An instance of this class provides access to all the operations defined in TimeZonesClient. + */ public interface TimeZonesClient { /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,7 +31,7 @@ public interface TimeZonesClient { /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,7 +43,7 @@ public interface TimeZonesClient { /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +56,7 @@ public interface TimeZonesClient { /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ public interface TimeZonesClient { /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +82,7 @@ public interface TimeZonesClient { /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @param context The context to associate with this operation. @@ -94,7 +96,7 @@ public interface TimeZonesClient { /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java index 4cbefa53d3907..c22052a388b1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java @@ -19,65 +19,67 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient. */ +/** + * An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient. + */ public interface TransparentDataEncryptionsClient { /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedFlux}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName); + PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName); /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedIterable}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName); + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName); /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedIterable}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context); /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -85,17 +87,17 @@ PagedIterable listByDatabase( * @throws com.azure.core.management.exception.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 logical database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName); /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -105,14 +107,14 @@ Mono> getWithResponseAsy * @return a logical database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName); + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName); /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -123,18 +125,14 @@ Mono getAsync( * @return a logical database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, Context context); /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -144,14 +142,14 @@ Response getWithResponse( * @return a logical database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner get( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName); + LogicalDatabaseTransparentDataEncryptionInner get(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -160,21 +158,18 @@ LogicalDatabaseTransparentDataEncryptionInner 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 logical database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -186,18 +181,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -209,18 +200,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -233,19 +220,15 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, Context context); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -256,18 +239,15 @@ Mono>> createOrUpdateWithResponseAsync( * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -278,18 +258,15 @@ Mono createOrUpdateAsync( * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters); /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -301,11 +278,7 @@ LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context); + LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java index 493f0bf976326..49cf941cb14f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java @@ -11,13 +11,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.UsageInner; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public interface UsagesClient { /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,14 +28,14 @@ public interface UsagesClient { * @return all instance pool usage metrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, Boolean expandChildren); + PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + Boolean expandChildren); /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +47,9 @@ PagedFlux listByInstancePoolAsync( /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,9 +61,9 @@ PagedFlux listByInstancePoolAsync( /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -71,6 +73,6 @@ PagedFlux listByInstancePoolAsync( * @return all instance pool usage metrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool( - String resourceGroupName, String instancePoolName, Boolean expandChildren, Context context); + PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + Boolean expandChildren, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java index 936c345f5d3a4..5fe6eadda67c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java @@ -23,14 +23,14 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualClustersClient. */ -public interface VirtualClustersClient - extends InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete { +/** + * An instance of this class provides access to all the operations defined in VirtualClustersClient. + */ +public interface VirtualClustersClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { /** * Gets a list of all virtualClusters 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. * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. @@ -40,7 +40,7 @@ public interface VirtualClustersClient /** * Gets a list of all virtualClusters 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. * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. @@ -50,7 +50,7 @@ public interface VirtualClustersClient /** * Gets a list of all virtualClusters 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. @@ -62,9 +62,9 @@ public interface VirtualClustersClient /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -75,9 +75,9 @@ public interface VirtualClustersClient /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -88,9 +88,9 @@ public interface VirtualClustersClient /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -102,9 +102,9 @@ public interface VirtualClustersClient /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,14 +112,14 @@ public interface VirtualClustersClient * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String virtualClusterName); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName); /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -131,9 +131,9 @@ Mono> getByResourceGroupWithResponseAsync( /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,14 +142,14 @@ Mono> getByResourceGroupWithResponseAsync( * @return a virtual cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualClusterName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualClusterName, + Context context); /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -161,9 +161,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -175,9 +175,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -189,9 +189,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -203,9 +203,9 @@ Response getByResourceGroupWithResponse( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -214,14 +214,14 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualClusterName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualClusterName, + Context context); /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -233,9 +233,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -246,9 +246,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,9 +260,9 @@ SyncPoller, Void> beginDelete( /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,14 +271,14 @@ SyncPoller, Void> beginDelete( * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters); /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,14 +287,14 @@ Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualClusterInner> beginUpdateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); + PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters); /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,14 +303,14 @@ PollerFlux, VirtualClusterInner> beginUpdateAsyn * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginUpdate( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); + SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters); /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -320,14 +320,14 @@ SyncPoller, VirtualClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginUpdate( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context); + SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context); /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,14 +336,14 @@ SyncPoller, VirtualClusterInner> beginUpdate( * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); + Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters); /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -356,9 +356,9 @@ Mono updateAsync( /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -368,30 +368,30 @@ Mono updateAsync( * @return an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner update( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context); + VirtualClusterInner update(String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, + Context context); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateDnsServersWithResponseAsync( - String resourceGroupName, String virtualClusterName); + Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -399,14 +399,14 @@ Mono> updateDnsServersWi * @return a recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateDnsServersAsync( - String resourceGroupName, String virtualClusterName); + Mono updateDnsServersAsync(String resourceGroupName, + String virtualClusterName); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,14 +415,14 @@ Mono updateDnsServersAsync( * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateDnsServersWithResponse( - String resourceGroupName, String virtualClusterName, Context context); + Response updateDnsServersWithResponse(String resourceGroupName, + String virtualClusterName, Context context); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java index 4848dcc34401f..23e5fcb99be48 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. + */ public interface VirtualNetworkRulesClient { /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +38,9 @@ public interface VirtualNetworkRulesClient { /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,9 +52,9 @@ public interface VirtualNetworkRulesClient { /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,9 +67,9 @@ public interface VirtualNetworkRulesClient { /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,14 +78,14 @@ public interface VirtualNetworkRulesClient { * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName); /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,9 +98,9 @@ Mono> getWithResponseAsync( /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -108,14 +110,14 @@ Mono> getWithResponseAsync( * @return a virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context); /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,9 +130,9 @@ Response getWithResponse( /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -140,14 +142,14 @@ Response getWithResponse( * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -162,9 +164,9 @@ PollerFlux, VirtualNetworkRuleInner> beginCr /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -179,9 +181,9 @@ SyncPoller, VirtualNetworkRuleInner> beginCr /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -193,17 +195,14 @@ SyncPoller, VirtualNetworkRuleInner> beginCr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, + String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context); /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -213,14 +212,14 @@ SyncPoller, VirtualNetworkRuleInner> beginCr * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -230,14 +229,14 @@ Mono createOrUpdateAsync( * @return a virtual network rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkRuleInner createOrUpdate( - String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); + VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverName, String virtualNetworkRuleName, + VirtualNetworkRuleInner parameters); /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -248,18 +247,14 @@ VirtualNetworkRuleInner createOrUpdate( * @return a virtual network rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkRuleInner createOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, - Context context); + VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverName, String virtualNetworkRuleName, + VirtualNetworkRuleInner parameters, Context context); /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,14 +263,14 @@ VirtualNetworkRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName); /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,14 +279,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName); /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,14 +295,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String virtualNetworkRuleName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String virtualNetworkRuleName); /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -317,14 +312,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context); /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -337,9 +332,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,9 +346,9 @@ SyncPoller, Void> beginDelete( /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java index 104d3cb970348..315512f122510 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkloadClassifiersClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadClassifiersClient. + */ public interface WorkloadClassifiersClient { /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -34,14 +36,14 @@ public interface WorkloadClassifiersClient { * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkloadGroupAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -51,14 +53,14 @@ PagedFlux listByWorkloadGroupAsync( * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkloadGroup( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -69,14 +71,14 @@ PagedIterable listByWorkloadGroup( * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkloadGroup( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context); + PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context); /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -87,18 +89,14 @@ PagedIterable listByWorkloadGroup( * @return a workload classifier along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName); /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -109,18 +107,14 @@ Mono> getWithResponseAsync( * @return a workload classifier on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName); /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -132,19 +126,14 @@ Mono getAsync( * @return a workload classifier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, Context context); /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -155,18 +144,14 @@ Response getWithResponse( * @return a workload classifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadClassifierInner get( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + WorkloadClassifierInner get(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -176,22 +161,18 @@ WorkloadClassifierInner 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 workload classifier operations for a data warehouse along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -204,18 +185,14 @@ Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, WorkloadClassifierInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters); + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -228,18 +205,14 @@ PollerFlux, WorkloadClassifierInner> beginCr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadClassifierInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters); + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -253,19 +226,14 @@ SyncPoller, WorkloadClassifierInner> beginCr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadClassifierInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context); + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters, Context context); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -277,19 +245,14 @@ SyncPoller, WorkloadClassifierInner> beginCr * @return workload classifier operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -301,19 +264,14 @@ Mono createOrUpdateAsync( * @return workload classifier operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadClassifierInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters); + WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters); /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -326,20 +284,14 @@ WorkloadClassifierInner createOrUpdate( * @return workload classifier operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadClassifierInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context); + WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters, Context context); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -350,18 +302,14 @@ WorkloadClassifierInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -372,18 +320,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -394,18 +338,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -417,19 +357,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, Context context); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -440,18 +375,14 @@ SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, String workloadClassifierName); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -461,18 +392,14 @@ Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, + void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, String workloadClassifierName); /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -483,11 +410,6 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java index fb65e1eb296ed..a9280557be06f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java @@ -18,13 +18,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkloadGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadGroupsClient. + */ public interface WorkloadGroupsClient { /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,9 +39,9 @@ public interface WorkloadGroupsClient { /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,9 +54,9 @@ public interface WorkloadGroupsClient { /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -64,14 +66,14 @@ public interface WorkloadGroupsClient { * @return the list of workload groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context); + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -81,14 +83,14 @@ PagedIterable listByDatabase( * @return a workload group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -98,14 +100,14 @@ Mono> getWithResponseAsync( * @return a workload group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName); /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -116,14 +118,14 @@ Mono getAsync( * @return a workload group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, Context context); /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -137,9 +139,9 @@ Response getWithResponse( /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -148,21 +150,17 @@ 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 workload group operations for a data warehouse along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, WorkloadGroupInner parameters); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -173,18 +171,14 @@ Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, WorkloadGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters); + PollerFlux, WorkloadGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -195,18 +189,14 @@ PollerFlux, WorkloadGroupInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters); + SyncPoller, WorkloadGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -218,19 +208,15 @@ SyncPoller, WorkloadGroupInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, + SyncPoller, WorkloadGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters, Context context); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -241,18 +227,14 @@ SyncPoller, WorkloadGroupInner> beginCreateOrUpda * @return workload group operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, WorkloadGroupInner parameters); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -263,18 +245,14 @@ Mono createOrUpdateAsync( * @return workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters); + WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, WorkloadGroupInner parameters); /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -286,19 +264,14 @@ WorkloadGroupInner createOrUpdate( * @return workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, - Context context); + WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, WorkloadGroupInner parameters, Context context); /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -308,14 +281,14 @@ WorkloadGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -325,14 +298,14 @@ Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -342,14 +315,14 @@ PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName); /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -360,14 +333,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, Context context); /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -381,9 +354,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -396,9 +369,9 @@ SyncPoller, Void> beginDelete( /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -408,6 +381,6 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + Context context); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java index b237333778723..8427a8a294771 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java @@ -6,50 +6,54 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdministratorType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** Properties of a active directory administrator. */ +/** + * Properties of a active directory administrator. + */ @Fluent -public final class AdministratorProperties { +public final class AdministratorProperties implements JsonSerializable { /* * Type of the sever administrator. */ - @JsonProperty(value = "administratorType", required = true) private AdministratorType administratorType; /* * Login name of the server administrator. */ - @JsonProperty(value = "login", required = true) private String login; /* * SID (object ID) of the server administrator. */ - @JsonProperty(value = "sid", required = true) private UUID sid; /* * Tenant ID of the administrator. */ - @JsonProperty(value = "tenantId") private UUID tenantId; /* * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "azureADOnlyAuthentication", access = JsonProperty.Access.WRITE_ONLY) private Boolean azureADOnlyAuthentication; - /** Creates an instance of AdministratorProperties class. */ + /** + * Creates an instance of AdministratorProperties class. + */ public AdministratorProperties() { } /** * Get the administratorType property: Type of the sever administrator. - * + * * @return the administratorType value. */ public AdministratorType administratorType() { @@ -58,7 +62,7 @@ public AdministratorType administratorType() { /** * Set the administratorType property: Type of the sever administrator. - * + * * @param administratorType the administratorType value to set. * @return the AdministratorProperties object itself. */ @@ -69,7 +73,7 @@ public AdministratorProperties withAdministratorType(AdministratorType administr /** * Get the login property: Login name of the server administrator. - * + * * @return the login value. */ public String login() { @@ -78,7 +82,7 @@ public String login() { /** * Set the login property: Login name of the server administrator. - * + * * @param login the login value to set. * @return the AdministratorProperties object itself. */ @@ -89,7 +93,7 @@ public AdministratorProperties withLogin(String login) { /** * Get the sid property: SID (object ID) of the server administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -98,7 +102,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the server administrator. - * + * * @param sid the sid value to set. * @return the AdministratorProperties object itself. */ @@ -109,7 +113,7 @@ public AdministratorProperties withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -118,7 +122,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the administrator. - * + * * @param tenantId the tenantId value to set. * @return the AdministratorProperties object itself. */ @@ -129,7 +133,7 @@ public AdministratorProperties withTenantId(UUID tenantId) { /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -138,27 +142,77 @@ public Boolean azureADOnlyAuthentication() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (administratorType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorType in model AdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorType in model AdministratorProperties")); } if (login() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property login in model AdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property login in model AdministratorProperties")); } if (sid() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sid in model AdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sid in model AdministratorProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(AdministratorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("administratorType", + this.administratorType == null ? null : this.administratorType.toString()); + jsonWriter.writeStringField("login", this.login); + jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdministratorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdministratorProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdministratorProperties. + */ + public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdministratorProperties deserializedAdministratorProperties = new AdministratorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administratorType".equals(fieldName)) { + deserializedAdministratorProperties.administratorType + = AdministratorType.fromString(reader.getString()); + } else if ("login".equals(fieldName)) { + deserializedAdministratorProperties.login = reader.getString(); + } else if ("sid".equals(fieldName)) { + deserializedAdministratorProperties.sid + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedAdministratorProperties.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("azureADOnlyAuthentication".equals(fieldName)) { + deserializedAdministratorProperties.azureADOnlyAuthentication + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAdministratorProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java index 334472c9114d5..10a45ec312e5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java @@ -5,35 +5,42 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of an Advanced Threat Protection state. */ +/** + * Properties of an Advanced Threat Protection state. + */ @Fluent -public final class AdvancedThreatProtectionProperties { +public final class AdvancedThreatProtectionProperties implements JsonSerializable { /* * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been * applied yet on the specific database or server. */ - @JsonProperty(value = "state", required = true) private AdvancedThreatProtectionState state; /* * Specifies the UTC creation time of the policy. */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationTime; - /** Creates an instance of AdvancedThreatProtectionProperties class. */ + /** + * Creates an instance of AdvancedThreatProtectionProperties class. + */ public AdvancedThreatProtectionProperties() { } /** * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @return the state value. */ public AdvancedThreatProtectionState state() { @@ -43,7 +50,7 @@ public AdvancedThreatProtectionState state() { /** * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @param state the state value to set. * @return the AdvancedThreatProtectionProperties object itself. */ @@ -54,7 +61,7 @@ public AdvancedThreatProtectionProperties withState(AdvancedThreatProtectionStat /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -63,17 +70,58 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model AdvancedThreatProtectionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model AdvancedThreatProtectionProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedThreatProtectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedThreatProtectionProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionProperties. + */ + public static AdvancedThreatProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedThreatProtectionProperties deserializedAdvancedThreatProtectionProperties + = new AdvancedThreatProtectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedAdvancedThreatProtectionProperties.state + = AdvancedThreatProtectionState.fromString(reader.getString()); + } else if ("creationTime".equals(fieldName)) { + deserializedAdvancedThreatProtectionProperties.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedThreatProtectionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java index ab1851b1c8bf9..c4eab8e296f63 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java @@ -6,41 +6,60 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdvisorStatus; import com.azure.resourcemanager.sql.models.AutoExecuteStatus; import com.azure.resourcemanager.sql.models.AutoExecuteStatusInheritedFrom; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Database, Server or Elastic Pool Advisor. */ +/** + * Database, Server or Elastic Pool Advisor. + */ @Fluent public final class AdvisorInner extends ProxyResource { /* * Resource kind. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource properties. */ - @JsonProperty(value = "properties") private AdvisorProperties innerProperties; - /** Creates an instance of AdvisorInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AdvisorInner class. + */ public AdvisorInner() { } /** * Get the kind property: Resource kind. - * + * * @return the kind value. */ public String kind() { @@ -49,7 +68,7 @@ public String kind() { /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -58,17 +77,47 @@ public String location() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AdvisorProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the advisorStatus property: Gets the status of availability of this advisor to customers. Possible values are * 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'. - * + * * @return the advisorStatus value. */ public AdvisorStatus advisorStatus() { @@ -78,7 +127,7 @@ public AdvisorStatus advisorStatus() { /** * Get the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the * recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. - * + * * @return the autoExecuteStatus value. */ public AutoExecuteStatus autoExecuteStatus() { @@ -88,7 +137,7 @@ public AutoExecuteStatus autoExecuteStatus() { /** * Set the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the * recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. - * + * * @param autoExecuteStatus the autoExecuteStatus value to set. * @return the AdvisorInner object itself. */ @@ -105,7 +154,7 @@ public AdvisorInner withAutoExecuteStatus(AutoExecuteStatus autoExecuteStatus) { * status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource * hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is * not explicitly set on any level). - * + * * @return the autoExecuteStatusInheritedFrom value. */ public AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom() { @@ -116,7 +165,7 @@ public AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom() { * Get the recommendationsStatus property: Gets that status of recommendations for this advisor and reason for not * having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations * available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc. - * + * * @return the recommendationsStatus value. */ public String recommendationsStatus() { @@ -126,7 +175,7 @@ public String recommendationsStatus() { /** * Get the lastChecked property: Gets the time when the current resource was analyzed for recommendations by this * advisor. - * + * * @return the lastChecked value. */ public OffsetDateTime lastChecked() { @@ -135,7 +184,7 @@ public OffsetDateTime lastChecked() { /** * Get the recommendedActions property: Gets the recommended actions for this advisor. - * + * * @return the recommendedActions value. */ public List recommendedActions() { @@ -144,7 +193,7 @@ public List recommendedActions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -152,4 +201,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvisorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvisorInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdvisorInner. + */ + public static AdvisorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvisorInner deserializedAdvisorInner = new AdvisorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAdvisorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAdvisorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAdvisorInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedAdvisorInner.kind = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedAdvisorInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAdvisorInner.innerProperties = AdvisorProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvisorInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java index 6339d258d6014..a6646d54a6efa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java @@ -5,37 +5,41 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdvisorStatus; import com.azure.resourcemanager.sql.models.AutoExecuteStatus; import com.azure.resourcemanager.sql.models.AutoExecuteStatusInheritedFrom; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Properties for a Database, Server or Elastic Pool Advisor. */ +/** + * Properties for a Database, Server or Elastic Pool Advisor. + */ @Fluent -public final class AdvisorProperties { +public final class AdvisorProperties implements JsonSerializable { /* * Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', * 'LimitedPublicPreview' and 'PrivatePreview'. */ - @JsonProperty(value = "advisorStatus", access = JsonProperty.Access.WRITE_ONLY) private AdvisorStatus advisorStatus; /* * Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible * values are 'Enabled' and 'Disabled' */ - @JsonProperty(value = "autoExecuteStatus", required = true) private AutoExecuteStatus autoExecuteStatus; /* - * Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set - * on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', - * 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). + * Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on + * (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', + * 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). */ - @JsonProperty(value = "autoExecuteStatusInheritedFrom", access = JsonProperty.Access.WRITE_ONLY) private AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom; /* @@ -43,29 +47,28 @@ public final class AdvisorProperties { * values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to * analyze), 'DbSeemsTuned' (Database is doing well), etc. */ - @JsonProperty(value = "recommendationsStatus", access = JsonProperty.Access.WRITE_ONLY) private String recommendationsStatus; /* * Gets the time when the current resource was analyzed for recommendations by this advisor. */ - @JsonProperty(value = "lastChecked", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastChecked; /* * Gets the recommended actions for this advisor. */ - @JsonProperty(value = "recommendedActions", access = JsonProperty.Access.WRITE_ONLY) private List recommendedActions; - /** Creates an instance of AdvisorProperties class. */ + /** + * Creates an instance of AdvisorProperties class. + */ public AdvisorProperties() { } /** * Get the advisorStatus property: Gets the status of availability of this advisor to customers. Possible values are * 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'. - * + * * @return the advisorStatus value. */ public AdvisorStatus advisorStatus() { @@ -75,7 +78,7 @@ public AdvisorStatus advisorStatus() { /** * Get the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the * recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. - * + * * @return the autoExecuteStatus value. */ public AutoExecuteStatus autoExecuteStatus() { @@ -85,7 +88,7 @@ public AutoExecuteStatus autoExecuteStatus() { /** * Set the autoExecuteStatus property: Gets the auto-execute status (whether to let the system execute the * recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. - * + * * @param autoExecuteStatus the autoExecuteStatus value to set. * @return the AdvisorProperties object itself. */ @@ -99,7 +102,7 @@ public AdvisorProperties withAutoExecuteStatus(AutoExecuteStatus autoExecuteStat * status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource * hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is * not explicitly set on any level). - * + * * @return the autoExecuteStatusInheritedFrom value. */ public AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom() { @@ -110,7 +113,7 @@ public AutoExecuteStatusInheritedFrom autoExecuteStatusInheritedFrom() { * Get the recommendationsStatus property: Gets that status of recommendations for this advisor and reason for not * having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations * available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc. - * + * * @return the recommendationsStatus value. */ public String recommendationsStatus() { @@ -120,7 +123,7 @@ public String recommendationsStatus() { /** * Get the lastChecked property: Gets the time when the current resource was analyzed for recommendations by this * advisor. - * + * * @return the lastChecked value. */ public OffsetDateTime lastChecked() { @@ -129,7 +132,7 @@ public OffsetDateTime lastChecked() { /** * Get the recommendedActions property: Gets the recommended actions for this advisor. - * + * * @return the recommendedActions value. */ public List recommendedActions() { @@ -138,15 +141,14 @@ public List recommendedActions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (autoExecuteStatus() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property autoExecuteStatus in model AdvisorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property autoExecuteStatus in model AdvisorProperties")); } if (recommendedActions() != null) { recommendedActions().forEach(e -> e.validate()); @@ -154,4 +156,56 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(AdvisorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("autoExecuteStatus", + this.autoExecuteStatus == null ? null : this.autoExecuteStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvisorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvisorProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AdvisorProperties. + */ + public static AdvisorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvisorProperties deserializedAdvisorProperties = new AdvisorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("autoExecuteStatus".equals(fieldName)) { + deserializedAdvisorProperties.autoExecuteStatus = AutoExecuteStatus.fromString(reader.getString()); + } else if ("advisorStatus".equals(fieldName)) { + deserializedAdvisorProperties.advisorStatus = AdvisorStatus.fromString(reader.getString()); + } else if ("autoExecuteStatusInheritedFrom".equals(fieldName)) { + deserializedAdvisorProperties.autoExecuteStatusInheritedFrom + = AutoExecuteStatusInheritedFrom.fromString(reader.getString()); + } else if ("recommendationsStatus".equals(fieldName)) { + deserializedAdvisorProperties.recommendationsStatus = reader.getString(); + } else if ("lastChecked".equals(fieldName)) { + deserializedAdvisorProperties.lastChecked = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recommendedActions".equals(fieldName)) { + List recommendedActions + = reader.readArray(reader1 -> RecommendedActionInner.fromJson(reader1)); + deserializedAdvisorProperties.recommendedActions = recommendedActions; + } else { + reader.skipChildren(); + } + } + + return deserializedAdvisorProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java index c4cd14dce21db..de81e412472c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java @@ -5,41 +5,44 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AutomaticTuningServerMode; import com.azure.resourcemanager.sql.models.AutomaticTuningServerOptions; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** Server-level Automatic Tuning properties. */ +/** + * Server-level Automatic Tuning properties. + */ @Fluent -public final class AutomaticTuningServerProperties { +public final class AutomaticTuningServerProperties implements JsonSerializable { /* * Automatic tuning desired state. */ - @JsonProperty(value = "desiredState") private AutomaticTuningServerMode desiredState; /* * Automatic tuning actual state. */ - @JsonProperty(value = "actualState", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningServerMode actualState; /* * Automatic tuning options definition. */ - @JsonProperty(value = "options") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map options; - /** Creates an instance of AutomaticTuningServerProperties class. */ + /** + * Creates an instance of AutomaticTuningServerProperties class. + */ public AutomaticTuningServerProperties() { } /** * Get the desiredState property: Automatic tuning desired state. - * + * * @return the desiredState value. */ public AutomaticTuningServerMode desiredState() { @@ -48,7 +51,7 @@ public AutomaticTuningServerMode desiredState() { /** * Set the desiredState property: Automatic tuning desired state. - * + * * @param desiredState the desiredState value to set. * @return the AutomaticTuningServerProperties object itself. */ @@ -59,7 +62,7 @@ public AutomaticTuningServerProperties withDesiredState(AutomaticTuningServerMod /** * Get the actualState property: Automatic tuning actual state. - * + * * @return the actualState value. */ public AutomaticTuningServerMode actualState() { @@ -68,7 +71,7 @@ public AutomaticTuningServerMode actualState() { /** * Get the options property: Automatic tuning options definition. - * + * * @return the options value. */ public Map options() { @@ -77,7 +80,7 @@ public Map options() { /** * Set the options property: Automatic tuning options definition. - * + * * @param options the options value to set. * @return the AutomaticTuningServerProperties object itself. */ @@ -88,19 +91,62 @@ public AutomaticTuningServerProperties withOptions(Map { - if (e != null) { - e.validate(); - } - }); + options().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + jsonWriter.writeMapField("options", this.options, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutomaticTuningServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutomaticTuningServerProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AutomaticTuningServerProperties. + */ + public static AutomaticTuningServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutomaticTuningServerProperties deserializedAutomaticTuningServerProperties + = new AutomaticTuningServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedAutomaticTuningServerProperties.desiredState + = AutomaticTuningServerMode.fromString(reader.getString()); + } else if ("actualState".equals(fieldName)) { + deserializedAutomaticTuningServerProperties.actualState + = AutomaticTuningServerMode.fromString(reader.getString()); + } else if ("options".equals(fieldName)) { + Map options + = reader.readMap(reader1 -> AutomaticTuningServerOptions.fromJson(reader1)); + deserializedAutomaticTuningServerProperties.options = options; + } else { + reader.skipChildren(); + } + } + + return deserializedAutomaticTuningServerProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java index 29349d0535234..fa0c8cf14e71f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a active directory only authentication. */ +/** + * Properties of a active directory only authentication. + */ @Fluent -public final class AzureADOnlyAuthProperties { +public final class AzureADOnlyAuthProperties implements JsonSerializable { /* * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "azureADOnlyAuthentication", required = true) private boolean azureADOnlyAuthentication; - /** Creates an instance of AzureADOnlyAuthProperties class. */ + /** + * Creates an instance of AzureADOnlyAuthProperties class. + */ public AzureADOnlyAuthProperties() { } /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public boolean azureADOnlyAuthentication() { @@ -31,7 +38,7 @@ public boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the AzureADOnlyAuthProperties object itself. */ @@ -42,9 +49,46 @@ public AzureADOnlyAuthProperties withAzureADOnlyAuthentication(boolean azureADOn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("azureADOnlyAuthentication", this.azureADOnlyAuthentication); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureADOnlyAuthProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureADOnlyAuthProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureADOnlyAuthProperties. + */ + public static AzureADOnlyAuthProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureADOnlyAuthProperties deserializedAzureADOnlyAuthProperties = new AzureADOnlyAuthProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureADOnlyAuthentication".equals(fieldName)) { + deserializedAzureADOnlyAuthProperties.azureADOnlyAuthentication = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureADOnlyAuthProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java index 3c6896fd3d01c..19d6b673eaa6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A short term retention policy. */ +/** + * A short term retention policy. + */ @Fluent public final class BackupShortTermRetentionPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private BackupShortTermRetentionPolicyProperties innerProperties; - /** Creates an instance of BackupShortTermRetentionPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of BackupShortTermRetentionPolicyInner class. + */ public BackupShortTermRetentionPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private BackupShortTermRetentionPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -44,7 +95,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @param retentionDays the retentionDays value to set. * @return the BackupShortTermRetentionPolicyInner object itself. */ @@ -60,7 +111,7 @@ public BackupShortTermRetentionPolicyInner withRetentionDays(Integer retentionDa * Get the diffBackupIntervalInHours property: The differential backup interval in hours. This is how many interval * hours between each differential backup will be supported. This is only applicable to live databases but not * dropped databases. - * + * * @return the diffBackupIntervalInHours value. */ public DiffBackupIntervalInHours diffBackupIntervalInHours() { @@ -71,12 +122,12 @@ public DiffBackupIntervalInHours diffBackupIntervalInHours() { * Set the diffBackupIntervalInHours property: The differential backup interval in hours. This is how many interval * hours between each differential backup will be supported. This is only applicable to live databases but not * dropped databases. - * + * * @param diffBackupIntervalInHours the diffBackupIntervalInHours value to set. * @return the BackupShortTermRetentionPolicyInner object itself. */ - public BackupShortTermRetentionPolicyInner withDiffBackupIntervalInHours( - DiffBackupIntervalInHours diffBackupIntervalInHours) { + public BackupShortTermRetentionPolicyInner + withDiffBackupIntervalInHours(DiffBackupIntervalInHours diffBackupIntervalInHours) { if (this.innerProperties() == null) { this.innerProperties = new BackupShortTermRetentionPolicyProperties(); } @@ -86,7 +137,7 @@ public BackupShortTermRetentionPolicyInner withDiffBackupIntervalInHours( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -94,4 +145,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupShortTermRetentionPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupShortTermRetentionPolicyInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupShortTermRetentionPolicyInner. + */ + public static BackupShortTermRetentionPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupShortTermRetentionPolicyInner deserializedBackupShortTermRetentionPolicyInner + = new BackupShortTermRetentionPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyInner.innerProperties + = BackupShortTermRetentionPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupShortTermRetentionPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java index 6e7f2895077a7..8cb3a3557df7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java @@ -5,33 +5,40 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a short term retention policy. */ +/** + * Properties of a short term retention policy. + */ @Fluent -public final class BackupShortTermRetentionPolicyProperties { +public final class BackupShortTermRetentionPolicyProperties + implements JsonSerializable { /* * The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * The differential backup interval in hours. This is how many interval hours between each differential backup will * be supported. This is only applicable to live databases but not dropped databases. */ - @JsonProperty(value = "diffBackupIntervalInHours") private DiffBackupIntervalInHours diffBackupIntervalInHours; - /** Creates an instance of BackupShortTermRetentionPolicyProperties class. */ + /** + * Creates an instance of BackupShortTermRetentionPolicyProperties class. + */ public BackupShortTermRetentionPolicyProperties() { } /** * Get the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -41,7 +48,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @param retentionDays the retentionDays value to set. * @return the BackupShortTermRetentionPolicyProperties object itself. */ @@ -54,7 +61,7 @@ public BackupShortTermRetentionPolicyProperties withRetentionDays(Integer retent * Get the diffBackupIntervalInHours property: The differential backup interval in hours. This is how many interval * hours between each differential backup will be supported. This is only applicable to live databases but not * dropped databases. - * + * * @return the diffBackupIntervalInHours value. */ public DiffBackupIntervalInHours diffBackupIntervalInHours() { @@ -65,21 +72,64 @@ public DiffBackupIntervalInHours diffBackupIntervalInHours() { * Set the diffBackupIntervalInHours property: The differential backup interval in hours. This is how many interval * hours between each differential backup will be supported. This is only applicable to live databases but not * dropped databases. - * + * * @param diffBackupIntervalInHours the diffBackupIntervalInHours value to set. * @return the BackupShortTermRetentionPolicyProperties object itself. */ - public BackupShortTermRetentionPolicyProperties withDiffBackupIntervalInHours( - DiffBackupIntervalInHours diffBackupIntervalInHours) { + public BackupShortTermRetentionPolicyProperties + withDiffBackupIntervalInHours(DiffBackupIntervalInHours diffBackupIntervalInHours) { this.diffBackupIntervalInHours = diffBackupIntervalInHours; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeStringField("diffBackupIntervalInHours", + this.diffBackupIntervalInHours == null ? null : this.diffBackupIntervalInHours.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupShortTermRetentionPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupShortTermRetentionPolicyProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupShortTermRetentionPolicyProperties. + */ + public static BackupShortTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupShortTermRetentionPolicyProperties deserializedBackupShortTermRetentionPolicyProperties + = new BackupShortTermRetentionPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("retentionDays".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("diffBackupIntervalInHours".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyProperties.diffBackupIntervalInHours + = DiffBackupIntervalInHours.fromInt(reader.getInt()); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupShortTermRetentionPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java index 60442006320e4..df740dddeb28b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java @@ -5,42 +5,47 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a long term retention policy. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of a long term retention policy. + */ @Fluent -public final class BaseLongTermRetentionPolicyProperties { +public final class BaseLongTermRetentionPolicyProperties + implements JsonSerializable { /* * The weekly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "weeklyRetention") private String weeklyRetention; /* * The monthly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "monthlyRetention") private String monthlyRetention; /* * The yearly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "yearlyRetention") private String yearlyRetention; /* * The week of year to take the yearly backup in an ISO 8601 format. */ - @JsonProperty(value = "weekOfYear") private Integer weekOfYear; - /** Creates an instance of BaseLongTermRetentionPolicyProperties class. */ + /** + * Creates an instance of BaseLongTermRetentionPolicyProperties class. + */ public BaseLongTermRetentionPolicyProperties() { } /** * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the weeklyRetention value. */ public String weeklyRetention() { @@ -49,7 +54,7 @@ public String weeklyRetention() { /** * Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param weeklyRetention the weeklyRetention value to set. * @return the BaseLongTermRetentionPolicyProperties object itself. */ @@ -60,7 +65,7 @@ public BaseLongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRe /** * Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the monthlyRetention value. */ public String monthlyRetention() { @@ -69,7 +74,7 @@ public String monthlyRetention() { /** * Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param monthlyRetention the monthlyRetention value to set. * @return the BaseLongTermRetentionPolicyProperties object itself. */ @@ -80,7 +85,7 @@ public BaseLongTermRetentionPolicyProperties withMonthlyRetention(String monthly /** * Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the yearlyRetention value. */ public String yearlyRetention() { @@ -89,7 +94,7 @@ public String yearlyRetention() { /** * Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param yearlyRetention the yearlyRetention value to set. * @return the BaseLongTermRetentionPolicyProperties object itself. */ @@ -100,7 +105,7 @@ public BaseLongTermRetentionPolicyProperties withYearlyRetention(String yearlyRe /** * Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @return the weekOfYear value. */ public Integer weekOfYear() { @@ -109,7 +114,7 @@ public Integer weekOfYear() { /** * Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @param weekOfYear the weekOfYear value to set. * @return the BaseLongTermRetentionPolicyProperties object itself. */ @@ -120,9 +125,56 @@ public BaseLongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("weeklyRetention", this.weeklyRetention); + jsonWriter.writeStringField("monthlyRetention", this.monthlyRetention); + jsonWriter.writeStringField("yearlyRetention", this.yearlyRetention); + jsonWriter.writeNumberField("weekOfYear", this.weekOfYear); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BaseLongTermRetentionPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BaseLongTermRetentionPolicyProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BaseLongTermRetentionPolicyProperties. + */ + public static BaseLongTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BaseLongTermRetentionPolicyProperties deserializedBaseLongTermRetentionPolicyProperties + = new BaseLongTermRetentionPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("weeklyRetention".equals(fieldName)) { + deserializedBaseLongTermRetentionPolicyProperties.weeklyRetention = reader.getString(); + } else if ("monthlyRetention".equals(fieldName)) { + deserializedBaseLongTermRetentionPolicyProperties.monthlyRetention = reader.getString(); + } else if ("yearlyRetention".equals(fieldName)) { + deserializedBaseLongTermRetentionPolicyProperties.yearlyRetention = reader.getString(); + } else if ("weekOfYear".equals(fieldName)) { + deserializedBaseLongTermRetentionPolicyProperties.weekOfYear + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBaseLongTermRetentionPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java index 6f00cb21a410f..42929332cdf27 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java @@ -5,43 +5,47 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.CheckNameAvailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The result of a name availability check. */ +/** + * The result of a name availability check. + */ @Immutable -public final class CheckNameAvailabilityResponseInner { +public final class CheckNameAvailabilityResponseInner implements JsonSerializable { /* * The name whose availability was checked. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * True if the name is available, otherwise false. */ - @JsonProperty(value = "available", access = JsonProperty.Access.WRITE_ONLY) private Boolean available; /* * The reason code explaining why the name is unavailable. Will be undefined if the name is available. */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) private CheckNameAvailabilityReason reason; /* * A message explaining why the name is unavailable. Will be undefined if the name is available. */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of CheckNameAvailabilityResponseInner class. */ + /** + * Creates an instance of CheckNameAvailabilityResponseInner class. + */ public CheckNameAvailabilityResponseInner() { } /** * Get the name property: The name whose availability was checked. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Get the available property: True if the name is available, otherwise false. - * + * * @return the available value. */ public Boolean available() { @@ -60,7 +64,7 @@ public Boolean available() { /** * Get the reason property: The reason code explaining why the name is unavailable. Will be undefined if the name is * available. - * + * * @return the reason value. */ public CheckNameAvailabilityReason reason() { @@ -70,7 +74,7 @@ public CheckNameAvailabilityReason reason() { /** * Get the message property: A message explaining why the name is unavailable. Will be undefined if the name is * available. - * + * * @return the message value. */ public String message() { @@ -79,9 +83,53 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckNameAvailabilityResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckNameAvailabilityResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckNameAvailabilityResponseInner. + */ + public static CheckNameAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckNameAvailabilityResponseInner deserializedCheckNameAvailabilityResponseInner + = new CheckNameAvailabilityResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCheckNameAvailabilityResponseInner.name = reader.getString(); + } else if ("available".equals(fieldName)) { + deserializedCheckNameAvailabilityResponseInner.available + = reader.getNullable(JsonReader::getBoolean); + } else if ("reason".equals(fieldName)) { + deserializedCheckNameAvailabilityResponseInner.reason + = CheckNameAvailabilityReason.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedCheckNameAvailabilityResponseInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckNameAvailabilityResponseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java index 7e9a6f604ac89..5cde960829a81 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java @@ -5,55 +5,58 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Contains the properties to perform long term retention backup copy operation. */ +/** + * Contains the properties to perform long term retention backup copy operation. + */ @Fluent -public final class CopyLongTermRetentionBackupParametersProperties { +public final class CopyLongTermRetentionBackupParametersProperties + implements JsonSerializable { /* * The subscription that owns the target server */ - @JsonProperty(value = "targetSubscriptionId") private String targetSubscriptionId; /* * The resource group that owns the target server */ - @JsonProperty(value = "targetResourceGroup") private String targetResourceGroup; /* * The resource Id of the target server that owns the database */ - @JsonProperty(value = "targetServerResourceId") private String targetServerResourceId; /* * The fully qualified domain name of the target server */ - @JsonProperty(value = "targetServerFullyQualifiedDomainName") private String targetServerFullyQualifiedDomainName; /* * The name of the database owns the copied backup. */ - @JsonProperty(value = "targetDatabaseName") private String targetDatabaseName; /* * The storage redundancy type of the copied backup */ - @JsonProperty(value = "targetBackupStorageRedundancy") private BackupStorageRedundancy targetBackupStorageRedundancy; - /** Creates an instance of CopyLongTermRetentionBackupParametersProperties class. */ + /** + * Creates an instance of CopyLongTermRetentionBackupParametersProperties class. + */ public CopyLongTermRetentionBackupParametersProperties() { } /** * Get the targetSubscriptionId property: The subscription that owns the target server. - * + * * @return the targetSubscriptionId value. */ public String targetSubscriptionId() { @@ -62,7 +65,7 @@ public String targetSubscriptionId() { /** * Set the targetSubscriptionId property: The subscription that owns the target server. - * + * * @param targetSubscriptionId the targetSubscriptionId value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ @@ -73,7 +76,7 @@ public CopyLongTermRetentionBackupParametersProperties withTargetSubscriptionId( /** * Get the targetResourceGroup property: The resource group that owns the target server. - * + * * @return the targetResourceGroup value. */ public String targetResourceGroup() { @@ -82,7 +85,7 @@ public String targetResourceGroup() { /** * Set the targetResourceGroup property: The resource group that owns the target server. - * + * * @param targetResourceGroup the targetResourceGroup value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ @@ -93,7 +96,7 @@ public CopyLongTermRetentionBackupParametersProperties withTargetResourceGroup(S /** * Get the targetServerResourceId property: The resource Id of the target server that owns the database. - * + * * @return the targetServerResourceId value. */ public String targetServerResourceId() { @@ -102,7 +105,7 @@ public String targetServerResourceId() { /** * Set the targetServerResourceId property: The resource Id of the target server that owns the database. - * + * * @param targetServerResourceId the targetServerResourceId value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ @@ -113,7 +116,7 @@ public CopyLongTermRetentionBackupParametersProperties withTargetServerResourceI /** * Get the targetServerFullyQualifiedDomainName property: The fully qualified domain name of the target server. - * + * * @return the targetServerFullyQualifiedDomainName value. */ public String targetServerFullyQualifiedDomainName() { @@ -122,19 +125,19 @@ public String targetServerFullyQualifiedDomainName() { /** * Set the targetServerFullyQualifiedDomainName property: The fully qualified domain name of the target server. - * + * * @param targetServerFullyQualifiedDomainName the targetServerFullyQualifiedDomainName value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ - public CopyLongTermRetentionBackupParametersProperties withTargetServerFullyQualifiedDomainName( - String targetServerFullyQualifiedDomainName) { + public CopyLongTermRetentionBackupParametersProperties + withTargetServerFullyQualifiedDomainName(String targetServerFullyQualifiedDomainName) { this.targetServerFullyQualifiedDomainName = targetServerFullyQualifiedDomainName; return this; } /** * Get the targetDatabaseName property: The name of the database owns the copied backup. - * + * * @return the targetDatabaseName value. */ public String targetDatabaseName() { @@ -143,7 +146,7 @@ public String targetDatabaseName() { /** * Set the targetDatabaseName property: The name of the database owns the copied backup. - * + * * @param targetDatabaseName the targetDatabaseName value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ @@ -154,7 +157,7 @@ public CopyLongTermRetentionBackupParametersProperties withTargetDatabaseName(St /** * Get the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the targetBackupStorageRedundancy value. */ public BackupStorageRedundancy targetBackupStorageRedundancy() { @@ -163,21 +166,79 @@ public BackupStorageRedundancy targetBackupStorageRedundancy() { /** * Set the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @param targetBackupStorageRedundancy the targetBackupStorageRedundancy value to set. * @return the CopyLongTermRetentionBackupParametersProperties object itself. */ - public CopyLongTermRetentionBackupParametersProperties withTargetBackupStorageRedundancy( - BackupStorageRedundancy targetBackupStorageRedundancy) { + public CopyLongTermRetentionBackupParametersProperties + withTargetBackupStorageRedundancy(BackupStorageRedundancy targetBackupStorageRedundancy) { this.targetBackupStorageRedundancy = targetBackupStorageRedundancy; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetSubscriptionId", this.targetSubscriptionId); + jsonWriter.writeStringField("targetResourceGroup", this.targetResourceGroup); + jsonWriter.writeStringField("targetServerResourceId", this.targetServerResourceId); + jsonWriter.writeStringField("targetServerFullyQualifiedDomainName", this.targetServerFullyQualifiedDomainName); + jsonWriter.writeStringField("targetDatabaseName", this.targetDatabaseName); + jsonWriter.writeStringField("targetBackupStorageRedundancy", + this.targetBackupStorageRedundancy == null ? null : this.targetBackupStorageRedundancy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CopyLongTermRetentionBackupParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CopyLongTermRetentionBackupParametersProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CopyLongTermRetentionBackupParametersProperties. + */ + public static CopyLongTermRetentionBackupParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CopyLongTermRetentionBackupParametersProperties deserializedCopyLongTermRetentionBackupParametersProperties + = new CopyLongTermRetentionBackupParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetSubscriptionId".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetSubscriptionId + = reader.getString(); + } else if ("targetResourceGroup".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetResourceGroup + = reader.getString(); + } else if ("targetServerResourceId".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetServerResourceId + = reader.getString(); + } else if ("targetServerFullyQualifiedDomainName".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetServerFullyQualifiedDomainName + = reader.getString(); + } else if ("targetDatabaseName".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetDatabaseName = reader.getString(); + } else if ("targetBackupStorageRedundancy".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParametersProperties.targetBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCopyLongTermRetentionBackupParametersProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java index b52c492ad3788..7f72771b9b8ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java @@ -6,37 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DataMaskingState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A database data masking policy. */ +/** + * A database data masking policy. + */ @Fluent public final class DataMaskingPolicyInner extends ProxyResource { /* * The location of the data masking policy. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * The kind of Data Masking Policy. Metadata, used for Azure portal. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private DataMaskingPolicyProperties innerProperties; - /** Creates an instance of DataMaskingPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DataMaskingPolicyInner class. + */ public DataMaskingPolicyInner() { } /** * Get the location property: The location of the data masking policy. - * + * * @return the location value. */ public String location() { @@ -45,7 +64,7 @@ public String location() { /** * Get the kind property: The kind of Data Masking Policy. Metadata, used for Azure portal. - * + * * @return the kind value. */ public String kind() { @@ -54,16 +73,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DataMaskingPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the dataMaskingState property: The state of the data masking policy. - * + * * @return the dataMaskingState value. */ public DataMaskingState dataMaskingState() { @@ -72,7 +121,7 @@ public DataMaskingState dataMaskingState() { /** * Set the dataMaskingState property: The state of the data masking policy. - * + * * @param dataMaskingState the dataMaskingState value to set. * @return the DataMaskingPolicyInner object itself. */ @@ -88,7 +137,7 @@ public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingS * Get the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of * database users for which the data masking policy does not apply. The specified users receive data results without * masking for all of the database queries. - * + * * @return the exemptPrincipals value. */ public String exemptPrincipals() { @@ -99,7 +148,7 @@ public String exemptPrincipals() { * Set the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of * database users for which the data masking policy does not apply. The specified users receive data results without * masking for all of the database queries. - * + * * @param exemptPrincipals the exemptPrincipals value to set. * @return the DataMaskingPolicyInner object itself. */ @@ -114,7 +163,7 @@ public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { /** * Get the applicationPrincipals property: The list of the application principals. This is a legacy parameter and is * no longer used. - * + * * @return the applicationPrincipals value. */ public String applicationPrincipals() { @@ -123,7 +172,7 @@ public String applicationPrincipals() { /** * Get the maskingLevel property: The masking level. This is a legacy parameter and is no longer used. - * + * * @return the maskingLevel value. */ public String maskingLevel() { @@ -132,7 +181,7 @@ public String maskingLevel() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -140,4 +189,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataMaskingPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataMaskingPolicyInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataMaskingPolicyInner. + */ + public static DataMaskingPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataMaskingPolicyInner deserializedDataMaskingPolicyInner = new DataMaskingPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataMaskingPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataMaskingPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDataMaskingPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDataMaskingPolicyInner.location = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedDataMaskingPolicyInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDataMaskingPolicyInner.innerProperties = DataMaskingPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataMaskingPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java index 52a388ba585aa..e07bd4d9372b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java @@ -6,16 +6,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DataMaskingState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The properties of a database data masking policy. */ +/** + * The properties of a database data masking policy. + */ @Fluent -public final class DataMaskingPolicyProperties { +public final class DataMaskingPolicyProperties implements JsonSerializable { /* * The state of the data masking policy. */ - @JsonProperty(value = "dataMaskingState", required = true) private DataMaskingState dataMaskingState; /* @@ -23,28 +28,27 @@ public final class DataMaskingPolicyProperties { * masking policy does not apply. The specified users receive data results without masking for all of the database * queries. */ - @JsonProperty(value = "exemptPrincipals") private String exemptPrincipals; /* * The list of the application principals. This is a legacy parameter and is no longer used. */ - @JsonProperty(value = "applicationPrincipals", access = JsonProperty.Access.WRITE_ONLY) private String applicationPrincipals; /* * The masking level. This is a legacy parameter and is no longer used. */ - @JsonProperty(value = "maskingLevel", access = JsonProperty.Access.WRITE_ONLY) private String maskingLevel; - /** Creates an instance of DataMaskingPolicyProperties class. */ + /** + * Creates an instance of DataMaskingPolicyProperties class. + */ public DataMaskingPolicyProperties() { } /** * Get the dataMaskingState property: The state of the data masking policy. - * + * * @return the dataMaskingState value. */ public DataMaskingState dataMaskingState() { @@ -53,7 +57,7 @@ public DataMaskingState dataMaskingState() { /** * Set the dataMaskingState property: The state of the data masking policy. - * + * * @param dataMaskingState the dataMaskingState value to set. * @return the DataMaskingPolicyProperties object itself. */ @@ -66,7 +70,7 @@ public DataMaskingPolicyProperties withDataMaskingState(DataMaskingState dataMas * Get the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of * database users for which the data masking policy does not apply. The specified users receive data results without * masking for all of the database queries. - * + * * @return the exemptPrincipals value. */ public String exemptPrincipals() { @@ -77,7 +81,7 @@ public String exemptPrincipals() { * Set the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of * database users for which the data masking policy does not apply. The specified users receive data results without * masking for all of the database queries. - * + * * @param exemptPrincipals the exemptPrincipals value to set. * @return the DataMaskingPolicyProperties object itself. */ @@ -89,7 +93,7 @@ public DataMaskingPolicyProperties withExemptPrincipals(String exemptPrincipals) /** * Get the applicationPrincipals property: The list of the application principals. This is a legacy parameter and is * no longer used. - * + * * @return the applicationPrincipals value. */ public String applicationPrincipals() { @@ -98,7 +102,7 @@ public String applicationPrincipals() { /** * Get the maskingLevel property: The masking level. This is a legacy parameter and is no longer used. - * + * * @return the maskingLevel value. */ public String maskingLevel() { @@ -107,17 +111,62 @@ public String maskingLevel() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (dataMaskingState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataMaskingState in model DataMaskingPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dataMaskingState in model DataMaskingPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(DataMaskingPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dataMaskingState", + this.dataMaskingState == null ? null : this.dataMaskingState.toString()); + jsonWriter.writeStringField("exemptPrincipals", this.exemptPrincipals); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataMaskingPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataMaskingPolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataMaskingPolicyProperties. + */ + public static DataMaskingPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataMaskingPolicyProperties deserializedDataMaskingPolicyProperties = new DataMaskingPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dataMaskingState".equals(fieldName)) { + deserializedDataMaskingPolicyProperties.dataMaskingState + = DataMaskingState.fromString(reader.getString()); + } else if ("exemptPrincipals".equals(fieldName)) { + deserializedDataMaskingPolicyProperties.exemptPrincipals = reader.getString(); + } else if ("applicationPrincipals".equals(fieldName)) { + deserializedDataMaskingPolicyProperties.applicationPrincipals = reader.getString(); + } else if ("maskingLevel".equals(fieldName)) { + deserializedDataMaskingPolicyProperties.maskingLevel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataMaskingPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java index 15b0df72313be..cc1a02e612c47 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java @@ -6,38 +6,57 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DataMaskingFunction; import com.azure.resourcemanager.sql.models.DataMaskingRuleState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A database data masking rule. */ +/** + * A database data masking rule. + */ @Fluent public final class DataMaskingRuleInner extends ProxyResource { /* * The location of the data masking rule. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * The kind of Data Masking Rule. Metadata, used for Azure portal. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private DataMaskingRuleProperties innerProperties; - /** Creates an instance of DataMaskingRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DataMaskingRuleInner class. + */ public DataMaskingRuleInner() { } /** * Get the location property: The location of the data masking rule. - * + * * @return the location value. */ public String location() { @@ -46,7 +65,7 @@ public String location() { /** * Get the kind property: The kind of Data Masking Rule. Metadata, used for Azure portal. - * + * * @return the kind value. */ public String kind() { @@ -55,16 +74,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DataMaskingRuleProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the id property: The rule Id. - * + * * @return the id value. */ public String idPropertiesId() { @@ -76,7 +125,7 @@ public String idPropertiesId() { * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value * of ruleState. - * + * * @return the ruleState value. */ public DataMaskingRuleState ruleState() { @@ -88,7 +137,7 @@ public DataMaskingRuleState ruleState() { * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value * of ruleState. - * + * * @param ruleState the ruleState value to set. * @return the DataMaskingRuleInner object itself. */ @@ -102,7 +151,7 @@ public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { /** * Get the schemaName property: The schema name on which the data masking rule is applied. - * + * * @return the schemaName value. */ public String schemaName() { @@ -111,7 +160,7 @@ public String schemaName() { /** * Set the schemaName property: The schema name on which the data masking rule is applied. - * + * * @param schemaName the schemaName value to set. * @return the DataMaskingRuleInner object itself. */ @@ -125,7 +174,7 @@ public DataMaskingRuleInner withSchemaName(String schemaName) { /** * Get the tableName property: The table name on which the data masking rule is applied. - * + * * @return the tableName value. */ public String tableName() { @@ -134,7 +183,7 @@ public String tableName() { /** * Set the tableName property: The table name on which the data masking rule is applied. - * + * * @param tableName the tableName value to set. * @return the DataMaskingRuleInner object itself. */ @@ -148,7 +197,7 @@ public DataMaskingRuleInner withTableName(String tableName) { /** * Get the columnName property: The column name on which the data masking rule is applied. - * + * * @return the columnName value. */ public String columnName() { @@ -157,7 +206,7 @@ public String columnName() { /** * Set the columnName property: The column name on which the data masking rule is applied. - * + * * @param columnName the columnName value to set. * @return the DataMaskingRuleInner object itself. */ @@ -171,7 +220,7 @@ public DataMaskingRuleInner withColumnName(String columnName) { /** * Get the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * + * * @return the aliasName value. */ public String aliasName() { @@ -180,7 +229,7 @@ public String aliasName() { /** * Set the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * + * * @param aliasName the aliasName value to set. * @return the DataMaskingRuleInner object itself. */ @@ -194,7 +243,7 @@ public DataMaskingRuleInner withAliasName(String aliasName) { /** * Get the maskingFunction property: The masking function that is used for the data masking rule. - * + * * @return the maskingFunction value. */ public DataMaskingFunction maskingFunction() { @@ -203,7 +252,7 @@ public DataMaskingFunction maskingFunction() { /** * Set the maskingFunction property: The masking function that is used for the data masking rule. - * + * * @param maskingFunction the maskingFunction value to set. * @return the DataMaskingRuleInner object itself. */ @@ -218,7 +267,7 @@ public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunct /** * Get the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @return the numberFrom value. */ public String numberFrom() { @@ -228,7 +277,7 @@ public String numberFrom() { /** * Set the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @param numberFrom the numberFrom value to set. * @return the DataMaskingRuleInner object itself. */ @@ -243,7 +292,7 @@ public DataMaskingRuleInner withNumberFrom(String numberFrom) { /** * Get the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @return the numberTo value. */ public String numberTo() { @@ -253,7 +302,7 @@ public String numberTo() { /** * Set the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @param numberTo the numberTo value to set. * @return the DataMaskingRuleInner object itself. */ @@ -268,7 +317,7 @@ public DataMaskingRuleInner withNumberTo(String numberTo) { /** * Get the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the * beginning of the string. Otherwise, this parameter will be ignored. - * + * * @return the prefixSize value. */ public String prefixSize() { @@ -278,7 +327,7 @@ public String prefixSize() { /** * Set the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the * beginning of the string. Otherwise, this parameter will be ignored. - * + * * @param prefixSize the prefixSize value to set. * @return the DataMaskingRuleInner object itself. */ @@ -293,7 +342,7 @@ public DataMaskingRuleInner withPrefixSize(String prefixSize) { /** * Get the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the * end of the string. Otherwise, this parameter will be ignored. - * + * * @return the suffixSize value. */ public String suffixSize() { @@ -303,7 +352,7 @@ public String suffixSize() { /** * Set the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the * end of the string. Otherwise, this parameter will be ignored. - * + * * @param suffixSize the suffixSize value to set. * @return the DataMaskingRuleInner object itself. */ @@ -318,7 +367,7 @@ public DataMaskingRuleInner withSuffixSize(String suffixSize) { /** * Get the replacementString property: If maskingFunction is set to Text, the character to use for masking the * unexposed part of the string. Otherwise, this parameter will be ignored. - * + * * @return the replacementString value. */ public String replacementString() { @@ -328,7 +377,7 @@ public String replacementString() { /** * Set the replacementString property: If maskingFunction is set to Text, the character to use for masking the * unexposed part of the string. Otherwise, this parameter will be ignored. - * + * * @param replacementString the replacementString value to set. * @return the DataMaskingRuleInner object itself. */ @@ -342,7 +391,7 @@ public DataMaskingRuleInner withReplacementString(String replacementString) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -350,4 +399,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataMaskingRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataMaskingRuleInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataMaskingRuleInner. + */ + public static DataMaskingRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataMaskingRuleInner deserializedDataMaskingRuleInner = new DataMaskingRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataMaskingRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataMaskingRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDataMaskingRuleInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDataMaskingRuleInner.location = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedDataMaskingRuleInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDataMaskingRuleInner.innerProperties = DataMaskingRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataMaskingRuleInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java index 5a990680c9b3d..c2cf38a3f21c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java @@ -6,99 +6,95 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DataMaskingFunction; import com.azure.resourcemanager.sql.models.DataMaskingRuleState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The properties of a database data masking rule. */ +/** + * The properties of a database data masking rule. + */ @Fluent -public final class DataMaskingRuleProperties { +public final class DataMaskingRuleProperties implements JsonSerializable { /* * The rule Id. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* - * The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, - * columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the - * rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. + * The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, + * maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be + * created with ruleState set to enabled, regardless of the provided value of ruleState. */ - @JsonProperty(value = "ruleState") private DataMaskingRuleState ruleState; /* * The schema name on which the data masking rule is applied. */ - @JsonProperty(value = "schemaName", required = true) private String schemaName; /* * The table name on which the data masking rule is applied. */ - @JsonProperty(value = "tableName", required = true) private String tableName; /* * The column name on which the data masking rule is applied. */ - @JsonProperty(value = "columnName", required = true) private String columnName; /* * The alias name. This is a legacy parameter and is no longer used. */ - @JsonProperty(value = "aliasName") private String aliasName; /* * The masking function that is used for the data masking rule. */ - @JsonProperty(value = "maskingFunction", required = true) private DataMaskingFunction maskingFunction; /* * The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this * parameter will be ignored. */ - @JsonProperty(value = "numberFrom") private String numberFrom; /* * The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this * parameter will be ignored. */ - @JsonProperty(value = "numberTo") private String numberTo; /* * If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. * Otherwise, this parameter will be ignored. */ - @JsonProperty(value = "prefixSize") private String prefixSize; /* - * If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. - * Otherwise, this parameter will be ignored. + * If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, + * this parameter will be ignored. */ - @JsonProperty(value = "suffixSize") private String suffixSize; /* * If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, * this parameter will be ignored. */ - @JsonProperty(value = "replacementString") private String replacementString; - /** Creates an instance of DataMaskingRuleProperties class. */ + /** + * Creates an instance of DataMaskingRuleProperties class. + */ public DataMaskingRuleProperties() { } /** * Get the id property: The rule Id. - * + * * @return the id value. */ public String id() { @@ -110,7 +106,7 @@ public String id() { * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value * of ruleState. - * + * * @return the ruleState value. */ public DataMaskingRuleState ruleState() { @@ -122,7 +118,7 @@ public DataMaskingRuleState ruleState() { * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value * of ruleState. - * + * * @param ruleState the ruleState value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -133,7 +129,7 @@ public DataMaskingRuleProperties withRuleState(DataMaskingRuleState ruleState) { /** * Get the schemaName property: The schema name on which the data masking rule is applied. - * + * * @return the schemaName value. */ public String schemaName() { @@ -142,7 +138,7 @@ public String schemaName() { /** * Set the schemaName property: The schema name on which the data masking rule is applied. - * + * * @param schemaName the schemaName value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -153,7 +149,7 @@ public DataMaskingRuleProperties withSchemaName(String schemaName) { /** * Get the tableName property: The table name on which the data masking rule is applied. - * + * * @return the tableName value. */ public String tableName() { @@ -162,7 +158,7 @@ public String tableName() { /** * Set the tableName property: The table name on which the data masking rule is applied. - * + * * @param tableName the tableName value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -173,7 +169,7 @@ public DataMaskingRuleProperties withTableName(String tableName) { /** * Get the columnName property: The column name on which the data masking rule is applied. - * + * * @return the columnName value. */ public String columnName() { @@ -182,7 +178,7 @@ public String columnName() { /** * Set the columnName property: The column name on which the data masking rule is applied. - * + * * @param columnName the columnName value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -193,7 +189,7 @@ public DataMaskingRuleProperties withColumnName(String columnName) { /** * Get the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * + * * @return the aliasName value. */ public String aliasName() { @@ -202,7 +198,7 @@ public String aliasName() { /** * Set the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * + * * @param aliasName the aliasName value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -213,7 +209,7 @@ public DataMaskingRuleProperties withAliasName(String aliasName) { /** * Get the maskingFunction property: The masking function that is used for the data masking rule. - * + * * @return the maskingFunction value. */ public DataMaskingFunction maskingFunction() { @@ -222,7 +218,7 @@ public DataMaskingFunction maskingFunction() { /** * Set the maskingFunction property: The masking function that is used for the data masking rule. - * + * * @param maskingFunction the maskingFunction value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -234,7 +230,7 @@ public DataMaskingRuleProperties withMaskingFunction(DataMaskingFunction masking /** * Get the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @return the numberFrom value. */ public String numberFrom() { @@ -244,7 +240,7 @@ public String numberFrom() { /** * Set the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @param numberFrom the numberFrom value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -256,7 +252,7 @@ public DataMaskingRuleProperties withNumberFrom(String numberFrom) { /** * Get the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @return the numberTo value. */ public String numberTo() { @@ -266,7 +262,7 @@ public String numberTo() { /** * Set the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to * Number, otherwise this parameter will be ignored. - * + * * @param numberTo the numberTo value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -278,7 +274,7 @@ public DataMaskingRuleProperties withNumberTo(String numberTo) { /** * Get the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the * beginning of the string. Otherwise, this parameter will be ignored. - * + * * @return the prefixSize value. */ public String prefixSize() { @@ -288,7 +284,7 @@ public String prefixSize() { /** * Set the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the * beginning of the string. Otherwise, this parameter will be ignored. - * + * * @param prefixSize the prefixSize value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -300,7 +296,7 @@ public DataMaskingRuleProperties withPrefixSize(String prefixSize) { /** * Get the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the * end of the string. Otherwise, this parameter will be ignored. - * + * * @return the suffixSize value. */ public String suffixSize() { @@ -310,7 +306,7 @@ public String suffixSize() { /** * Set the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the * end of the string. Otherwise, this parameter will be ignored. - * + * * @param suffixSize the suffixSize value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -322,7 +318,7 @@ public DataMaskingRuleProperties withSuffixSize(String suffixSize) { /** * Get the replacementString property: If maskingFunction is set to Text, the character to use for masking the * unexposed part of the string. Otherwise, this parameter will be ignored. - * + * * @return the replacementString value. */ public String replacementString() { @@ -332,7 +328,7 @@ public String replacementString() { /** * Set the replacementString property: If maskingFunction is set to Text, the character to use for masking the * unexposed part of the string. Otherwise, this parameter will be ignored. - * + * * @param replacementString the replacementString value to set. * @return the DataMaskingRuleProperties object itself. */ @@ -343,35 +339,103 @@ public DataMaskingRuleProperties withReplacementString(String replacementString) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (schemaName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schemaName in model DataMaskingRuleProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property schemaName in model DataMaskingRuleProperties")); } if (tableName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tableName in model DataMaskingRuleProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tableName in model DataMaskingRuleProperties")); } if (columnName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property columnName in model DataMaskingRuleProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property columnName in model DataMaskingRuleProperties")); } if (maskingFunction() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property maskingFunction in model DataMaskingRuleProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property maskingFunction in model DataMaskingRuleProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(DataMaskingRuleProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("schemaName", this.schemaName); + jsonWriter.writeStringField("tableName", this.tableName); + jsonWriter.writeStringField("columnName", this.columnName); + jsonWriter.writeStringField("maskingFunction", + this.maskingFunction == null ? null : this.maskingFunction.toString()); + jsonWriter.writeStringField("ruleState", this.ruleState == null ? null : this.ruleState.toString()); + jsonWriter.writeStringField("aliasName", this.aliasName); + jsonWriter.writeStringField("numberFrom", this.numberFrom); + jsonWriter.writeStringField("numberTo", this.numberTo); + jsonWriter.writeStringField("prefixSize", this.prefixSize); + jsonWriter.writeStringField("suffixSize", this.suffixSize); + jsonWriter.writeStringField("replacementString", this.replacementString); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataMaskingRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataMaskingRuleProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataMaskingRuleProperties. + */ + public static DataMaskingRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataMaskingRuleProperties deserializedDataMaskingRuleProperties = new DataMaskingRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schemaName".equals(fieldName)) { + deserializedDataMaskingRuleProperties.schemaName = reader.getString(); + } else if ("tableName".equals(fieldName)) { + deserializedDataMaskingRuleProperties.tableName = reader.getString(); + } else if ("columnName".equals(fieldName)) { + deserializedDataMaskingRuleProperties.columnName = reader.getString(); + } else if ("maskingFunction".equals(fieldName)) { + deserializedDataMaskingRuleProperties.maskingFunction + = DataMaskingFunction.fromString(reader.getString()); + } else if ("id".equals(fieldName)) { + deserializedDataMaskingRuleProperties.id = reader.getString(); + } else if ("ruleState".equals(fieldName)) { + deserializedDataMaskingRuleProperties.ruleState + = DataMaskingRuleState.fromString(reader.getString()); + } else if ("aliasName".equals(fieldName)) { + deserializedDataMaskingRuleProperties.aliasName = reader.getString(); + } else if ("numberFrom".equals(fieldName)) { + deserializedDataMaskingRuleProperties.numberFrom = reader.getString(); + } else if ("numberTo".equals(fieldName)) { + deserializedDataMaskingRuleProperties.numberTo = reader.getString(); + } else if ("prefixSize".equals(fieldName)) { + deserializedDataMaskingRuleProperties.prefixSize = reader.getString(); + } else if ("suffixSize".equals(fieldName)) { + deserializedDataMaskingRuleProperties.suffixSize = reader.getString(); + } else if ("replacementString".equals(fieldName)) { + deserializedDataMaskingRuleProperties.replacementString = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataMaskingRuleProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java index d81c50997f6e1..99953f927986c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** User activities of a data warehouse. */ +/** + * User activities of a data warehouse. + */ @Immutable public final class DataWarehouseUserActivitiesInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DataWarehouseUserActivitiesProperties innerProperties; - /** Creates an instance of DataWarehouseUserActivitiesInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DataWarehouseUserActivitiesInner class. + */ public DataWarehouseUserActivitiesInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DataWarehouseUserActivitiesProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the activeQueriesCount property: Count of running and suspended queries. - * + * * @return the activeQueriesCount value. */ public Integer activeQueriesCount() { @@ -41,7 +92,7 @@ public Integer activeQueriesCount() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -49,4 +100,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataWarehouseUserActivitiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataWarehouseUserActivitiesInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DataWarehouseUserActivitiesInner. + */ + public static DataWarehouseUserActivitiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataWarehouseUserActivitiesInner deserializedDataWarehouseUserActivitiesInner + = new DataWarehouseUserActivitiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesInner.innerProperties + = DataWarehouseUserActivitiesProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataWarehouseUserActivitiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java index 9e58d39811849..b2ea327117d3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java @@ -5,27 +5,33 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * User activities of a data warehouse. This currently includes the count of running or suspended queries. For more * information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV). */ @Immutable -public final class DataWarehouseUserActivitiesProperties { +public final class DataWarehouseUserActivitiesProperties + implements JsonSerializable { /* * Count of running and suspended queries. */ - @JsonProperty(value = "activeQueriesCount", access = JsonProperty.Access.WRITE_ONLY) private Integer activeQueriesCount; - /** Creates an instance of DataWarehouseUserActivitiesProperties class. */ + /** + * Creates an instance of DataWarehouseUserActivitiesProperties class. + */ public DataWarehouseUserActivitiesProperties() { } /** * Get the activeQueriesCount property: Count of running and suspended queries. - * + * * @return the activeQueriesCount value. */ public Integer activeQueriesCount() { @@ -34,9 +40,46 @@ public Integer activeQueriesCount() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataWarehouseUserActivitiesProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataWarehouseUserActivitiesProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataWarehouseUserActivitiesProperties. + */ + public static DataWarehouseUserActivitiesProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataWarehouseUserActivitiesProperties deserializedDataWarehouseUserActivitiesProperties + = new DataWarehouseUserActivitiesProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activeQueriesCount".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesProperties.activeQueriesCount + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedDataWarehouseUserActivitiesProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java index 1a7fc0287b762..681a4c7f356d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java @@ -7,32 +7,52 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A database Advanced Threat Protection. */ +/** + * A database Advanced Threat Protection. + */ @Fluent public final class DatabaseAdvancedThreatProtectionInner extends ProxyResource { /* * SystemData of AdvancedThreatProtectionResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") private AdvancedThreatProtectionProperties innerProperties; - /** Creates an instance of DatabaseAdvancedThreatProtectionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseAdvancedThreatProtectionInner class. + */ public DatabaseAdvancedThreatProtectionInner() { } /** * Get the systemData property: SystemData of AdvancedThreatProtectionResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -41,17 +61,47 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AdvancedThreatProtectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @return the state value. */ public AdvancedThreatProtectionState state() { @@ -61,7 +111,7 @@ public AdvancedThreatProtectionState state() { /** * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @param state the state value to set. * @return the DatabaseAdvancedThreatProtectionInner object itself. */ @@ -75,7 +125,7 @@ public DatabaseAdvancedThreatProtectionInner withState(AdvancedThreatProtectionS /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -84,7 +134,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -92,4 +142,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseAdvancedThreatProtectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseAdvancedThreatProtectionInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseAdvancedThreatProtectionInner. + */ + public static DatabaseAdvancedThreatProtectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseAdvancedThreatProtectionInner deserializedDatabaseAdvancedThreatProtectionInner + = new DatabaseAdvancedThreatProtectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.innerProperties + = AdvancedThreatProtectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseAdvancedThreatProtectionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java index 1247985e49562..00985c2bc8d88 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AutomaticTuningMode; import com.azure.resourcemanager.sql.models.AutomaticTuningOptions; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** Database-level Automatic Tuning. */ +/** + * Database-level Automatic Tuning. + */ @Fluent public final class DatabaseAutomaticTuningInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseAutomaticTuningProperties innerProperties; - /** Creates an instance of DatabaseAutomaticTuningInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseAutomaticTuningInner class. + */ public DatabaseAutomaticTuningInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseAutomaticTuningProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the desiredState property: Automatic tuning desired state. - * + * * @return the desiredState value. */ public AutomaticTuningMode desiredState() { @@ -44,7 +95,7 @@ public AutomaticTuningMode desiredState() { /** * Set the desiredState property: Automatic tuning desired state. - * + * * @param desiredState the desiredState value to set. * @return the DatabaseAutomaticTuningInner object itself. */ @@ -58,7 +109,7 @@ public DatabaseAutomaticTuningInner withDesiredState(AutomaticTuningMode desired /** * Get the actualState property: Automatic tuning actual state. - * + * * @return the actualState value. */ public AutomaticTuningMode actualState() { @@ -67,7 +118,7 @@ public AutomaticTuningMode actualState() { /** * Get the options property: Automatic tuning options definition. - * + * * @return the options value. */ public Map options() { @@ -76,7 +127,7 @@ public Map options() { /** * Set the options property: Automatic tuning options definition. - * + * * @param options the options value to set. * @return the DatabaseAutomaticTuningInner object itself. */ @@ -90,7 +141,7 @@ public DatabaseAutomaticTuningInner withOptions(Map { + DatabaseAutomaticTuningInner deserializedDatabaseAutomaticTuningInner = new DatabaseAutomaticTuningInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseAutomaticTuningInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseAutomaticTuningInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseAutomaticTuningInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseAutomaticTuningInner.innerProperties + = DatabaseAutomaticTuningProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseAutomaticTuningInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java index 2a121b42b3720..8e448b9e3c8a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java @@ -5,41 +5,44 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AutomaticTuningMode; import com.azure.resourcemanager.sql.models.AutomaticTuningOptions; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** Database-level Automatic Tuning properties. */ +/** + * Database-level Automatic Tuning properties. + */ @Fluent -public final class DatabaseAutomaticTuningProperties { +public final class DatabaseAutomaticTuningProperties implements JsonSerializable { /* * Automatic tuning desired state. */ - @JsonProperty(value = "desiredState") private AutomaticTuningMode desiredState; /* * Automatic tuning actual state. */ - @JsonProperty(value = "actualState", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningMode actualState; /* * Automatic tuning options definition. */ - @JsonProperty(value = "options") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map options; - /** Creates an instance of DatabaseAutomaticTuningProperties class. */ + /** + * Creates an instance of DatabaseAutomaticTuningProperties class. + */ public DatabaseAutomaticTuningProperties() { } /** * Get the desiredState property: Automatic tuning desired state. - * + * * @return the desiredState value. */ public AutomaticTuningMode desiredState() { @@ -48,7 +51,7 @@ public AutomaticTuningMode desiredState() { /** * Set the desiredState property: Automatic tuning desired state. - * + * * @param desiredState the desiredState value to set. * @return the DatabaseAutomaticTuningProperties object itself. */ @@ -59,7 +62,7 @@ public DatabaseAutomaticTuningProperties withDesiredState(AutomaticTuningMode de /** * Get the actualState property: Automatic tuning actual state. - * + * * @return the actualState value. */ public AutomaticTuningMode actualState() { @@ -68,7 +71,7 @@ public AutomaticTuningMode actualState() { /** * Get the options property: Automatic tuning options definition. - * + * * @return the options value. */ public Map options() { @@ -77,7 +80,7 @@ public Map options() { /** * Set the options property: Automatic tuning options definition. - * + * * @param options the options value to set. * @return the DatabaseAutomaticTuningProperties object itself. */ @@ -88,19 +91,62 @@ public DatabaseAutomaticTuningProperties withOptions(Map { - if (e != null) { - e.validate(); - } - }); + options().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + jsonWriter.writeMapField("options", this.options, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseAutomaticTuningProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseAutomaticTuningProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseAutomaticTuningProperties. + */ + public static DatabaseAutomaticTuningProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseAutomaticTuningProperties deserializedDatabaseAutomaticTuningProperties + = new DatabaseAutomaticTuningProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedDatabaseAutomaticTuningProperties.desiredState + = AutomaticTuningMode.fromString(reader.getString()); + } else if ("actualState".equals(fieldName)) { + deserializedDatabaseAutomaticTuningProperties.actualState + = AutomaticTuningMode.fromString(reader.getString()); + } else if ("options".equals(fieldName)) { + Map options + = reader.readMap(reader1 -> AutomaticTuningOptions.fromJson(reader1)); + deserializedDatabaseAutomaticTuningProperties.options = options; + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseAutomaticTuningProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java index 4cbd4f12270cf..59e7dd6eca641 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java @@ -6,33 +6,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** A database blob auditing policy. */ +/** + * A database blob auditing policy. + */ @Fluent public final class DatabaseBlobAuditingPolicyInner extends ProxyResource { /* * Resource kind. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseBlobAuditingPolicyProperties innerProperties; - /** Creates an instance of DatabaseBlobAuditingPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseBlobAuditingPolicyInner class. + */ public DatabaseBlobAuditingPolicyInner() { } /** * Get the kind property: Resource kind. - * + * * @return the kind value. */ public String kind() { @@ -41,16 +61,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseBlobAuditingPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -59,7 +109,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -73,48 +123,76 @@ public DatabaseBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -123,48 +201,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -179,7 +285,7 @@ public DatabaseBlobAuditingPolicyInner withAuditActionsAndGroups(List au /** * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { @@ -189,7 +295,7 @@ public Boolean isStorageSecondaryKeyInUse() { /** * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -202,19 +308,21 @@ public DatabaseBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean is } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -222,19 +330,21 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -248,8 +358,9 @@ public DatabaseBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean i /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -258,8 +369,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -273,7 +385,7 @@ public DatabaseBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -282,7 +394,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -297,7 +409,7 @@ public DatabaseBlobAuditingPolicyInner withIsManagedIdentityInUse(Boolean isMana /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -307,7 +419,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -323,7 +435,7 @@ public DatabaseBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -334,7 +446,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -347,14 +459,16 @@ public DatabaseBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoin } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -362,14 +476,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -383,7 +499,7 @@ public DatabaseBlobAuditingPolicyInner withStorageAccountAccessKey(String storag /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -392,7 +508,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the DatabaseBlobAuditingPolicyInner object itself. */ @@ -406,7 +522,7 @@ public DatabaseBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID sto /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -414,4 +530,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseBlobAuditingPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseBlobAuditingPolicyInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseBlobAuditingPolicyInner. + */ + public static DatabaseBlobAuditingPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseBlobAuditingPolicyInner deserializedDatabaseBlobAuditingPolicyInner + = new DatabaseBlobAuditingPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.innerProperties + = DatabaseBlobAuditingPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseBlobAuditingPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java index 40127aca79317..ab0df6ca324f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java @@ -6,36 +6,43 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.UUID; -/** Properties of a database blob auditing policy. */ +/** + * Properties of a database blob auditing policy. + */ @Fluent -public final class DatabaseBlobAuditingPolicyProperties { +public final class DatabaseBlobAuditingPolicyProperties + implements JsonSerializable { /* * Specifies the number of days to keep in the audit logs in the storage account. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the Actions-Groups and Actions to audit. - * + * * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * + * * BATCH_COMPLETED_GROUP, * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, * FAILED_DATABASE_AUTHENTICATION_GROUP. - * + * * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP * BACKUP_RESTORE_GROUP * DATABASE_LOGOUT_GROUP @@ -60,13 +67,14 @@ public final class DatabaseBlobAuditingPolicyProperties { * DATABASE_OWNERSHIP_CHANGE_GROUP * DATABASE_CHANGE_GROUP * LEDGER_OPERATION_GROUP - * + * * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * + * * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-action-groups). + * * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for * Server auditing policy). The supported actions to audit are: * SELECT @@ -76,76 +84,71 @@ public final class DatabaseBlobAuditingPolicyProperties { * EXECUTE * RECEIVE * REFERENCES - * + * * The general form for defining an action to be audited is: * {action} ON {object} BY {principal} - * + * * Note that in the above format can refer to an object like a table, view, or stored procedure, or an * entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. - * + * * For example: * SELECT on dbo.myTable by public * SELECT on DATABASE::myDatabase by public * SELECT on SCHEMA::mySchema by public - * + * * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-actions) */ - @JsonProperty(value = "auditActionsAndGroups") private List auditActionsAndGroups; /* * Specifies whether storageAccountAccessKey value is the storage's secondary key. */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") private Boolean isStorageSecondaryKeyInUse; /* * Specifies whether audit events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * + * * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs * category on the database should be also created. * Note that for server level audit you should use the 'master' database as {databaseName}. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}? + * api-version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") private Boolean isAzureMonitorTargetEnabled; /* * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ - @JsonProperty(value = "queueDelayMs") private Integer queueDelayMs; /* * Specifies whether Managed Identity is used to access blob storage */ - @JsonProperty(value = "isManagedIdentityInUse") private Boolean isManagedIdentityInUse; /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. */ - @JsonProperty(value = "state", required = true) private BlobAuditingPolicyState state; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint or isAzureMonitorTargetEnabled is required. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* @@ -154,27 +157,27 @@ public final class DatabaseBlobAuditingPolicyProperties { * server system-assigned managed identity to access the storage. * Prerequisites for using managed identity authentication: * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role - * to the server identity. + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the blob storage subscription Id. */ - @JsonProperty(value = "storageAccountSubscriptionId") private UUID storageAccountSubscriptionId; - /** Creates an instance of DatabaseBlobAuditingPolicyProperties class. */ + /** + * Creates an instance of DatabaseBlobAuditingPolicyProperties class. + */ public DatabaseBlobAuditingPolicyProperties() { } /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -183,7 +186,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -194,48 +197,76 @@ public DatabaseBlobAuditingPolicyProperties withRetentionDays(Integer retentionD /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -244,48 +275,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -297,7 +356,7 @@ public DatabaseBlobAuditingPolicyProperties withAuditActionsAndGroups(ListWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -337,19 +398,21 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -360,8 +423,9 @@ public DatabaseBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Bool /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -370,8 +434,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -382,7 +447,7 @@ public DatabaseBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayM /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -391,7 +456,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -403,7 +468,7 @@ public DatabaseBlobAuditingPolicyProperties withIsManagedIdentityInUse(Boolean i /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -413,7 +478,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -426,7 +491,7 @@ public DatabaseBlobAuditingPolicyProperties withState(BlobAuditingPolicyState st * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -437,7 +502,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -447,14 +512,16 @@ public DatabaseBlobAuditingPolicyProperties withStorageEndpoint(String storageEn } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -462,14 +529,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -480,7 +549,7 @@ public DatabaseBlobAuditingPolicyProperties withStorageAccountAccessKey(String s /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -489,7 +558,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the DatabaseBlobAuditingPolicyProperties object itself. */ @@ -500,17 +569,91 @@ public DatabaseBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model DatabaseBlobAuditingPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model DatabaseBlobAuditingPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(DatabaseBlobAuditingPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeArrayField("auditActionsAndGroups", this.auditActionsAndGroups, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isStorageSecondaryKeyInUse", this.isStorageSecondaryKeyInUse); + jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); + jsonWriter.writeNumberField("queueDelayMs", this.queueDelayMs); + jsonWriter.writeBooleanField("isManagedIdentityInUse", this.isManagedIdentityInUse); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeStringField("storageAccountSubscriptionId", + Objects.toString(this.storageAccountSubscriptionId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseBlobAuditingPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseBlobAuditingPolicyProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseBlobAuditingPolicyProperties. + */ + public static DatabaseBlobAuditingPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseBlobAuditingPolicyProperties deserializedDatabaseBlobAuditingPolicyProperties + = new DatabaseBlobAuditingPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.state + = BlobAuditingPolicyState.fromString(reader.getString()); + } else if ("retentionDays".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("auditActionsAndGroups".equals(fieldName)) { + List auditActionsAndGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedDatabaseBlobAuditingPolicyProperties.auditActionsAndGroups = auditActionsAndGroups; + } else if ("isStorageSecondaryKeyInUse".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.isStorageSecondaryKeyInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.isAzureMonitorTargetEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("queueDelayMs".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.queueDelayMs + = reader.getNullable(JsonReader::getInt); + } else if ("isManagedIdentityInUse".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.isManagedIdentityInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.storageAccountAccessKey = reader.getString(); + } else if ("storageAccountSubscriptionId".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyProperties.storageAccountSubscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseBlobAuditingPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java index 246852cc89c1b..95be1814a6874 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ColumnDataType; import com.azure.resourcemanager.sql.models.TableTemporalType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A database column resource. */ +/** + * A database column resource. + */ @Fluent public final class DatabaseColumnInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseColumnProperties innerProperties; - /** Creates an instance of DatabaseColumnInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseColumnInner class. + */ public DatabaseColumnInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseColumnProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the columnType property: The column data type. - * + * * @return the columnType value. */ public ColumnDataType columnType() { @@ -43,7 +94,7 @@ public ColumnDataType columnType() { /** * Set the columnType property: The column data type. - * + * * @param columnType the columnType value to set. * @return the DatabaseColumnInner object itself. */ @@ -57,7 +108,7 @@ public DatabaseColumnInner withColumnType(ColumnDataType columnType) { /** * Get the temporalType property: The table temporal type. - * + * * @return the temporalType value. */ public TableTemporalType temporalType() { @@ -66,7 +117,7 @@ public TableTemporalType temporalType() { /** * Set the temporalType property: The table temporal type. - * + * * @param temporalType the temporalType value to set. * @return the DatabaseColumnInner object itself. */ @@ -80,7 +131,7 @@ public DatabaseColumnInner withTemporalType(TableTemporalType temporalType) { /** * Get the memoryOptimized property: Whether or not the column belongs to a memory optimized table. - * + * * @return the memoryOptimized value. */ public Boolean memoryOptimized() { @@ -89,7 +140,7 @@ public Boolean memoryOptimized() { /** * Set the memoryOptimized property: Whether or not the column belongs to a memory optimized table. - * + * * @param memoryOptimized the memoryOptimized value to set. * @return the DatabaseColumnInner object itself. */ @@ -103,7 +154,7 @@ public DatabaseColumnInner withMemoryOptimized(Boolean memoryOptimized) { /** * Get the isComputed property: Whether or not the column is computed. - * + * * @return the isComputed value. */ public Boolean isComputed() { @@ -112,7 +163,7 @@ public Boolean isComputed() { /** * Set the isComputed property: Whether or not the column is computed. - * + * * @param isComputed the isComputed value to set. * @return the DatabaseColumnInner object itself. */ @@ -126,7 +177,7 @@ public DatabaseColumnInner withIsComputed(Boolean isComputed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -134,4 +185,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseColumnInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseColumnInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseColumnInner. + */ + public static DatabaseColumnInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseColumnInner deserializedDatabaseColumnInner = new DatabaseColumnInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseColumnInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseColumnInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseColumnInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseColumnInner.innerProperties = DatabaseColumnProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseColumnInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java index a6619f463b9e4..79a8c11895e77 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java @@ -5,44 +5,48 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ColumnDataType; import com.azure.resourcemanager.sql.models.TableTemporalType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Database column properties. */ +/** + * Database column properties. + */ @Fluent -public final class DatabaseColumnProperties { +public final class DatabaseColumnProperties implements JsonSerializable { /* * The column data type. */ - @JsonProperty(value = "columnType") private ColumnDataType columnType; /* * The table temporal type. */ - @JsonProperty(value = "temporalType") private TableTemporalType temporalType; /* * Whether or not the column belongs to a memory optimized table. */ - @JsonProperty(value = "memoryOptimized") private Boolean memoryOptimized; /* * Whether or not the column is computed. */ - @JsonProperty(value = "isComputed") private Boolean isComputed; - /** Creates an instance of DatabaseColumnProperties class. */ + /** + * Creates an instance of DatabaseColumnProperties class. + */ public DatabaseColumnProperties() { } /** * Get the columnType property: The column data type. - * + * * @return the columnType value. */ public ColumnDataType columnType() { @@ -51,7 +55,7 @@ public ColumnDataType columnType() { /** * Set the columnType property: The column data type. - * + * * @param columnType the columnType value to set. * @return the DatabaseColumnProperties object itself. */ @@ -62,7 +66,7 @@ public DatabaseColumnProperties withColumnType(ColumnDataType columnType) { /** * Get the temporalType property: The table temporal type. - * + * * @return the temporalType value. */ public TableTemporalType temporalType() { @@ -71,7 +75,7 @@ public TableTemporalType temporalType() { /** * Set the temporalType property: The table temporal type. - * + * * @param temporalType the temporalType value to set. * @return the DatabaseColumnProperties object itself. */ @@ -82,7 +86,7 @@ public DatabaseColumnProperties withTemporalType(TableTemporalType temporalType) /** * Get the memoryOptimized property: Whether or not the column belongs to a memory optimized table. - * + * * @return the memoryOptimized value. */ public Boolean memoryOptimized() { @@ -91,7 +95,7 @@ public Boolean memoryOptimized() { /** * Set the memoryOptimized property: Whether or not the column belongs to a memory optimized table. - * + * * @param memoryOptimized the memoryOptimized value to set. * @return the DatabaseColumnProperties object itself. */ @@ -102,7 +106,7 @@ public DatabaseColumnProperties withMemoryOptimized(Boolean memoryOptimized) { /** * Get the isComputed property: Whether or not the column is computed. - * + * * @return the isComputed value. */ public Boolean isComputed() { @@ -111,7 +115,7 @@ public Boolean isComputed() { /** * Set the isComputed property: Whether or not the column is computed. - * + * * @param isComputed the isComputed value to set. * @return the DatabaseColumnProperties object itself. */ @@ -122,9 +126,55 @@ public DatabaseColumnProperties withIsComputed(Boolean isComputed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("columnType", this.columnType == null ? null : this.columnType.toString()); + jsonWriter.writeStringField("temporalType", this.temporalType == null ? null : this.temporalType.toString()); + jsonWriter.writeBooleanField("memoryOptimized", this.memoryOptimized); + jsonWriter.writeBooleanField("isComputed", this.isComputed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseColumnProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseColumnProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseColumnProperties. + */ + public static DatabaseColumnProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseColumnProperties deserializedDatabaseColumnProperties = new DatabaseColumnProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("columnType".equals(fieldName)) { + deserializedDatabaseColumnProperties.columnType = ColumnDataType.fromString(reader.getString()); + } else if ("temporalType".equals(fieldName)) { + deserializedDatabaseColumnProperties.temporalType + = TableTemporalType.fromString(reader.getString()); + } else if ("memoryOptimized".equals(fieldName)) { + deserializedDatabaseColumnProperties.memoryOptimized = reader.getNullable(JsonReader::getBoolean); + } else if ("isComputed".equals(fieldName)) { + deserializedDatabaseColumnProperties.isComputed = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseColumnProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseExtensionsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseExtensionsProperties.java index 5eef995366908..d23ce4535ab9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseExtensionsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseExtensionsProperties.java @@ -6,87 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; import com.azure.resourcemanager.sql.models.OperationMode; import com.azure.resourcemanager.sql.models.StorageKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Contains the database information after a successful Import, Export, or PolybaseImport. */ +/** + * Contains the database information after a successful Import, Export, or PolybaseImport. + */ @Fluent -public final class DatabaseExtensionsProperties { +public final class DatabaseExtensionsProperties implements JsonSerializable { /* * Operation mode of the operation: Import, Export, or PolybaseImport. */ - @JsonProperty(value = "operationMode", required = true) private OperationMode operationMode; /* * Storage key type: StorageAccessKey or SharedAccessKey. */ - @JsonProperty(value = "storageKeyType", required = true) private StorageKeyType storageKeyType; /* * Storage key for the storage account. */ - @JsonProperty(value = "storageKey", required = true) private String storageKey; /* * Storage Uri for the storage account. */ - @JsonProperty(value = "storageUri", required = true) private String storageUri; /* * Administrator login name. */ - @JsonProperty(value = "administratorLogin") private String administratorLogin; /* * Administrator login password. */ - @JsonProperty(value = "administratorLoginPassword") private String administratorLoginPassword; /* * Authentication type: SQL authentication or AD password. */ - @JsonProperty(value = "authenticationType") private String authenticationType; /* * Database edition for the newly created database in the case of an import operation. */ - @JsonProperty(value = "databaseEdition") private String databaseEdition; /* * Database service level objective for the newly created database in the case of an import operation. */ - @JsonProperty(value = "serviceObjectiveName") private String serviceObjectiveName; /* * Database max size in bytes for the newly created database in the case of an import operation. */ - @JsonProperty(value = "maxSizeBytes") private String maxSizeBytes; /* * Optional resource information to enable network isolation for request. */ - @JsonProperty(value = "networkIsolation") private NetworkIsolationSettings networkIsolation; - /** Creates an instance of DatabaseExtensionsProperties class. */ + /** + * Creates an instance of DatabaseExtensionsProperties class. + */ public DatabaseExtensionsProperties() { } /** * Get the operationMode property: Operation mode of the operation: Import, Export, or PolybaseImport. - * + * * @return the operationMode value. */ public OperationMode operationMode() { @@ -95,7 +92,7 @@ public OperationMode operationMode() { /** * Set the operationMode property: Operation mode of the operation: Import, Export, or PolybaseImport. - * + * * @param operationMode the operationMode value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -106,7 +103,7 @@ public DatabaseExtensionsProperties withOperationMode(OperationMode operationMod /** * Get the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. - * + * * @return the storageKeyType value. */ public StorageKeyType storageKeyType() { @@ -115,7 +112,7 @@ public StorageKeyType storageKeyType() { /** * Set the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. - * + * * @param storageKeyType the storageKeyType value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -126,7 +123,7 @@ public DatabaseExtensionsProperties withStorageKeyType(StorageKeyType storageKey /** * Get the storageKey property: Storage key for the storage account. - * + * * @return the storageKey value. */ public String storageKey() { @@ -135,7 +132,7 @@ public String storageKey() { /** * Set the storageKey property: Storage key for the storage account. - * + * * @param storageKey the storageKey value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -146,7 +143,7 @@ public DatabaseExtensionsProperties withStorageKey(String storageKey) { /** * Get the storageUri property: Storage Uri for the storage account. - * + * * @return the storageUri value. */ public String storageUri() { @@ -155,7 +152,7 @@ public String storageUri() { /** * Set the storageUri property: Storage Uri for the storage account. - * + * * @param storageUri the storageUri value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -166,7 +163,7 @@ public DatabaseExtensionsProperties withStorageUri(String storageUri) { /** * Get the administratorLogin property: Administrator login name. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -175,7 +172,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator login name. - * + * * @param administratorLogin the administratorLogin value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -186,7 +183,7 @@ public DatabaseExtensionsProperties withAdministratorLogin(String administratorL /** * Get the administratorLoginPassword property: Administrator login password. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -195,7 +192,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: Administrator login password. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -206,7 +203,7 @@ public DatabaseExtensionsProperties withAdministratorLoginPassword(String admini /** * Get the authenticationType property: Authentication type: SQL authentication or AD password. - * + * * @return the authenticationType value. */ public String authenticationType() { @@ -215,7 +212,7 @@ public String authenticationType() { /** * Set the authenticationType property: Authentication type: SQL authentication or AD password. - * + * * @param authenticationType the authenticationType value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -227,7 +224,7 @@ public DatabaseExtensionsProperties withAuthenticationType(String authentication /** * Get the databaseEdition property: Database edition for the newly created database in the case of an import * operation. - * + * * @return the databaseEdition value. */ public String databaseEdition() { @@ -237,7 +234,7 @@ public String databaseEdition() { /** * Set the databaseEdition property: Database edition for the newly created database in the case of an import * operation. - * + * * @param databaseEdition the databaseEdition value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -249,7 +246,7 @@ public DatabaseExtensionsProperties withDatabaseEdition(String databaseEdition) /** * Get the serviceObjectiveName property: Database service level objective for the newly created database in the * case of an import operation. - * + * * @return the serviceObjectiveName value. */ public String serviceObjectiveName() { @@ -259,7 +256,7 @@ public String serviceObjectiveName() { /** * Set the serviceObjectiveName property: Database service level objective for the newly created database in the * case of an import operation. - * + * * @param serviceObjectiveName the serviceObjectiveName value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -271,7 +268,7 @@ public DatabaseExtensionsProperties withServiceObjectiveName(String serviceObjec /** * Get the maxSizeBytes property: Database max size in bytes for the newly created database in the case of an import * operation. - * + * * @return the maxSizeBytes value. */ public String maxSizeBytes() { @@ -281,7 +278,7 @@ public String maxSizeBytes() { /** * Set the maxSizeBytes property: Database max size in bytes for the newly created database in the case of an import * operation. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -292,7 +289,7 @@ public DatabaseExtensionsProperties withMaxSizeBytes(String maxSizeBytes) { /** * Get the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @return the networkIsolation value. */ public NetworkIsolationSettings networkIsolation() { @@ -301,7 +298,7 @@ public NetworkIsolationSettings networkIsolation() { /** * Set the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @param networkIsolation the networkIsolation value to set. * @return the DatabaseExtensionsProperties object itself. */ @@ -312,33 +309,29 @@ public DatabaseExtensionsProperties withNetworkIsolation(NetworkIsolationSetting /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (operationMode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property operationMode in model DatabaseExtensionsProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operationMode in model DatabaseExtensionsProperties")); } if (storageKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKeyType in model DatabaseExtensionsProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKeyType in model DatabaseExtensionsProperties")); } if (storageKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKey in model DatabaseExtensionsProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKey in model DatabaseExtensionsProperties")); } if (storageUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageUri in model DatabaseExtensionsProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageUri in model DatabaseExtensionsProperties")); } if (networkIsolation() != null) { networkIsolation().validate(); @@ -346,4 +339,75 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DatabaseExtensionsProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationMode", this.operationMode == null ? null : this.operationMode.toString()); + jsonWriter.writeStringField("storageKeyType", + this.storageKeyType == null ? null : this.storageKeyType.toString()); + jsonWriter.writeStringField("storageKey", this.storageKey); + jsonWriter.writeStringField("storageUri", this.storageUri); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("authenticationType", this.authenticationType); + jsonWriter.writeStringField("databaseEdition", this.databaseEdition); + jsonWriter.writeStringField("serviceObjectiveName", this.serviceObjectiveName); + jsonWriter.writeStringField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeJsonField("networkIsolation", this.networkIsolation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseExtensionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseExtensionsProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseExtensionsProperties. + */ + public static DatabaseExtensionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseExtensionsProperties deserializedDatabaseExtensionsProperties = new DatabaseExtensionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationMode".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.operationMode + = OperationMode.fromString(reader.getString()); + } else if ("storageKeyType".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.storageKeyType + = StorageKeyType.fromString(reader.getString()); + } else if ("storageKey".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.storageKey = reader.getString(); + } else if ("storageUri".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.storageUri = reader.getString(); + } else if ("administratorLogin".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.administratorLoginPassword = reader.getString(); + } else if ("authenticationType".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.authenticationType = reader.getString(); + } else if ("databaseEdition".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.databaseEdition = reader.getString(); + } else if ("serviceObjectiveName".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.serviceObjectiveName = reader.getString(); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.maxSizeBytes = reader.getString(); + } else if ("networkIsolation".equals(fieldName)) { + deserializedDatabaseExtensionsProperties.networkIsolation + = NetworkIsolationSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseExtensionsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseInner.java index 27231461c903a..5ce948d557ea8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseInner.java @@ -6,6 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.CreateMode; @@ -16,72 +19,89 @@ import com.azure.resourcemanager.sql.models.SampleName; import com.azure.resourcemanager.sql.models.SecondaryType; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; -/** A database resource. */ +/** + * A database resource. + */ @Fluent public final class DatabaseInner extends Resource { /* * The database SKU. - * + * * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or one of the following commands: - * + * * ```azurecli * az sql db list-editions -l -o table * ```` - * + * * ```powershell * Get-AzSqlServerServiceObjective -Location * ```` - * */ - @JsonProperty(value = "sku") private Sku sku; /* * Kind of database. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource that manages the database. */ - @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; /* * The Azure Active Directory identity of the database. */ - @JsonProperty(value = "identity") private DatabaseIdentity identity; /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseProperties innerProperties; - /** Creates an instance of DatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseInner class. + */ public DatabaseInner() { } /** * Get the sku property: The database SKU. - * - *

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or one of the following commands: - * - *

```azurecli az sql db list-editions -l <location> -o table ```` - * - *

```powershell Get-AzSqlServerServiceObjective -Location <location> ````. - * + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ````. + * * @return the sku value. */ public Sku sku() { @@ -90,15 +110,19 @@ public Sku sku() { /** * Set the sku property: The database SKU. - * - *

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or one of the following commands: - * - *

```azurecli az sql db list-editions -l <location> -o table ```` - * - *

```powershell Get-AzSqlServerServiceObjective -Location <location> ````. - * + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ````. + * * @param sku the sku value to set. * @return the DatabaseInner object itself. */ @@ -109,7 +133,7 @@ public DatabaseInner withSku(Sku sku) { /** * Get the kind property: Kind of database. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -118,7 +142,7 @@ public String kind() { /** * Get the managedBy property: Resource that manages the database. - * + * * @return the managedBy value. */ public String managedBy() { @@ -127,7 +151,7 @@ public String managedBy() { /** * Get the identity property: The Azure Active Directory identity of the database. - * + * * @return the identity value. */ public DatabaseIdentity identity() { @@ -136,7 +160,7 @@ public DatabaseIdentity identity() { /** * Set the identity property: The Azure Active Directory identity of the database. - * + * * @param identity the identity value to set. * @return the DatabaseInner object itself. */ @@ -147,21 +171,55 @@ public DatabaseInner withIdentity(DatabaseIdentity identity) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public DatabaseInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DatabaseInner withTags(Map tags) { super.withTags(tags); @@ -170,32 +228,32 @@ public DatabaseInner withTags(Map tags) { /** * Get the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @return the createMode value. */ public CreateMode createMode() { @@ -204,32 +262,32 @@ public CreateMode createMode() { /** * Set the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @param createMode the createMode value to set. * @return the DatabaseInner object itself. */ @@ -243,7 +301,7 @@ public DatabaseInner withCreateMode(CreateMode createMode) { /** * Get the collation property: The collation of the database. - * + * * @return the collation value. */ public String collation() { @@ -252,7 +310,7 @@ public String collation() { /** * Set the collation property: The collation of the database. - * + * * @param collation the collation value to set. * @return the DatabaseInner object itself. */ @@ -266,7 +324,7 @@ public DatabaseInner withCollation(String collation) { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -275,7 +333,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseInner object itself. */ @@ -289,7 +347,7 @@ public DatabaseInner withMaxSizeBytes(Long maxSizeBytes) { /** * Get the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @return the sampleName value. */ public SampleName sampleName() { @@ -298,7 +356,7 @@ public SampleName sampleName() { /** * Set the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @param sampleName the sampleName value to set. * @return the DatabaseInner object itself. */ @@ -312,7 +370,7 @@ public DatabaseInner withSampleName(SampleName sampleName) { /** * Get the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @return the elasticPoolId value. */ public String elasticPoolId() { @@ -321,7 +379,7 @@ public String elasticPoolId() { /** * Set the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @param elasticPoolId the elasticPoolId value to set. * @return the DatabaseInner object itself. */ @@ -336,7 +394,7 @@ public DatabaseInner withElasticPoolId(String elasticPoolId) { /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -346,7 +404,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the DatabaseInner object itself. */ @@ -360,7 +418,7 @@ public DatabaseInner withSourceDatabaseId(String sourceDatabaseId) { /** * Get the status property: The status of the database. - * + * * @return the status value. */ public DatabaseStatus status() { @@ -369,7 +427,7 @@ public DatabaseStatus status() { /** * Get the databaseId property: The ID of the database. - * + * * @return the databaseId value. */ public UUID databaseId() { @@ -378,7 +436,7 @@ public UUID databaseId() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -387,7 +445,7 @@ public OffsetDateTime creationDate() { /** * Get the currentServiceObjectiveName property: The current service level objective name of the database. - * + * * @return the currentServiceObjectiveName value. */ public String currentServiceObjectiveName() { @@ -396,7 +454,7 @@ public String currentServiceObjectiveName() { /** * Get the requestedServiceObjectiveName property: The requested service level objective name of the database. - * + * * @return the requestedServiceObjectiveName value. */ public String requestedServiceObjectiveName() { @@ -405,7 +463,7 @@ public String requestedServiceObjectiveName() { /** * Get the defaultSecondaryLocation property: The default secondary region for this database. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -414,7 +472,7 @@ public String defaultSecondaryLocation() { /** * Get the failoverGroupId property: Failover Group resource identifier that this database belongs to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -424,7 +482,7 @@ public String failoverGroupId() { /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -434,7 +492,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the DatabaseInner object itself. */ @@ -448,7 +506,7 @@ public DatabaseInner withRestorePointInTime(OffsetDateTime restorePointInTime) { /** * Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { @@ -457,7 +515,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { /** * Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. * @return the DatabaseInner object itself. */ @@ -472,7 +530,7 @@ public DatabaseInner withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabas /** * Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @return the recoveryServicesRecoveryPointId value. */ public String recoveryServicesRecoveryPointId() { @@ -482,7 +540,7 @@ public String recoveryServicesRecoveryPointId() { /** * Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @param recoveryServicesRecoveryPointId the recoveryServicesRecoveryPointId value to set. * @return the DatabaseInner object itself. */ @@ -497,7 +555,7 @@ public DatabaseInner withRecoveryServicesRecoveryPointId(String recoveryServices /** * Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -507,7 +565,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the DatabaseInner object itself. */ @@ -522,7 +580,7 @@ public DatabaseInner withLongTermRetentionBackupResourceId(String longTermRetent /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -532,7 +590,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the DatabaseInner object itself. */ @@ -547,7 +605,7 @@ public DatabaseInner withRecoverableDatabaseId(String recoverableDatabaseId) { /** * Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -557,7 +615,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the DatabaseInner object itself. */ @@ -571,7 +629,7 @@ public DatabaseInner withRestorableDroppedDatabaseId(String restorableDroppedDat /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -580,7 +638,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the DatabaseInner object itself. */ @@ -595,7 +653,7 @@ public DatabaseInner withCatalogCollation(CatalogCollationType catalogCollation) /** * Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -605,7 +663,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the DatabaseInner object itself. */ @@ -620,7 +678,7 @@ public DatabaseInner withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @return the licenseType value. */ public DatabaseLicenseType licenseType() { @@ -630,7 +688,7 @@ public DatabaseLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @param licenseType the licenseType value to set. * @return the DatabaseInner object itself. */ @@ -644,7 +702,7 @@ public DatabaseInner withLicenseType(DatabaseLicenseType licenseType) { /** * Get the maxLogSizeBytes property: The max log size for this database. - * + * * @return the maxLogSizeBytes value. */ public Long maxLogSizeBytes() { @@ -654,7 +712,7 @@ public Long maxLogSizeBytes() { /** * Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for * this database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -665,7 +723,7 @@ public OffsetDateTime earliestRestoreDate() { * Get the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @return the readScale value. */ public DatabaseReadScale readScale() { @@ -676,7 +734,7 @@ public DatabaseReadScale readScale() { * Set the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @param readScale the readScale value to set. * @return the DatabaseInner object itself. */ @@ -691,7 +749,7 @@ public DatabaseInner withReadScale(DatabaseReadScale readScale) { /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -701,7 +759,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseInner object itself. */ @@ -716,7 +774,7 @@ public DatabaseInner withHighAvailabilityReplicaCount(Integer highAvailabilityRe /** * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @return the secondaryType value. */ public SecondaryType secondaryType() { @@ -726,7 +784,7 @@ public SecondaryType secondaryType() { /** * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @param secondaryType the secondaryType value to set. * @return the DatabaseInner object itself. */ @@ -740,7 +798,7 @@ public DatabaseInner withSecondaryType(SecondaryType secondaryType) { /** * Get the currentSku property: The name and tier of the SKU. - * + * * @return the currentSku value. */ public Sku currentSku() { @@ -750,7 +808,7 @@ public Sku currentSku() { /** * Get the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @return the autoPauseDelay value. */ public Integer autoPauseDelay() { @@ -760,7 +818,7 @@ public Integer autoPauseDelay() { /** * Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @param autoPauseDelay the autoPauseDelay value to set. * @return the DatabaseInner object itself. */ @@ -775,7 +833,7 @@ public DatabaseInner withAutoPauseDelay(Integer autoPauseDelay) { /** * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * database. - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -785,7 +843,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -795,12 +853,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the DatabaseInner object itself. */ - public DatabaseInner withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public DatabaseInner + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new DatabaseProperties(); } @@ -810,7 +868,7 @@ public DatabaseInner withRequestedBackupStorageRedundancy( /** * Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -819,7 +877,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the DatabaseInner object itself. */ @@ -834,7 +892,7 @@ public DatabaseInner withMinCapacity(Double minCapacity) { /** * Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format). * Null if the database is ready. - * + * * @return the pausedDate value. */ public OffsetDateTime pausedDate() { @@ -844,7 +902,7 @@ public OffsetDateTime pausedDate() { /** * Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 * format). Null if the database is paused. - * + * * @return the resumedDate value. */ public OffsetDateTime resumedDate() { @@ -854,7 +912,7 @@ public OffsetDateTime resumedDate() { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -864,7 +922,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the DatabaseInner object itself. */ @@ -880,7 +938,7 @@ public DatabaseInner withMaintenanceConfigurationId(String maintenanceConfigurat * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @return the isLedgerOn value. */ public Boolean isLedgerOn() { @@ -891,7 +949,7 @@ public Boolean isLedgerOn() { * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @param isLedgerOn the isLedgerOn value to set. * @return the DatabaseInner object itself. */ @@ -905,7 +963,7 @@ public DatabaseInner withIsLedgerOn(Boolean isLedgerOn) { /** * Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database. - * + * * @return the isInfraEncryptionEnabled value. */ public Boolean isInfraEncryptionEnabled() { @@ -914,7 +972,7 @@ public Boolean isInfraEncryptionEnabled() { /** * Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -923,7 +981,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the DatabaseInner object itself. */ @@ -938,26 +996,26 @@ public DatabaseInner withFederatedClientId(UUID federatedClientId) { /** * Get the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. - * - *

This property is only supported for DataWarehouse edition and allows to restore across subscriptions. - * - *

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and + * + * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. + * + * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and * sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. - * - *

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or + * + * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or * existing sql pool, and restorePointInTime must be specified. - * - *

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or - * restorable dropped sql pool. - * - *

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable - * sql pool. - * - *

When source subscription belongs to a different tenant than target subscription, - * “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details - * about “x-ms-authorization-auxiliary” header see + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable + * dropped sql pool. + * + * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql + * pool. + * + * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” + * header must contain authentication token for the source tenant. For more details about + * “x-ms-authorization-auxiliary” header see * https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant. - * + * * @return the sourceResourceId value. */ public String sourceResourceId() { @@ -967,26 +1025,26 @@ public String sourceResourceId() { /** * Set the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. - * - *

This property is only supported for DataWarehouse edition and allows to restore across subscriptions. - * - *

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and + * + * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. + * + * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and * sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. - * - *

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or + * + * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or * existing sql pool, and restorePointInTime must be specified. - * - *

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or - * restorable dropped sql pool. - * - *

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable - * sql pool. - * - *

When source subscription belongs to a different tenant than target subscription, - * “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details - * about “x-ms-authorization-auxiliary” header see + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable + * dropped sql pool. + * + * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql + * pool. + * + * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” + * header must contain authentication token for the source tenant. For more details about + * “x-ms-authorization-auxiliary” header see * https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant. - * + * * @param sourceResourceId the sourceResourceId value to set. * @return the DatabaseInner object itself. */ @@ -1000,7 +1058,7 @@ public DatabaseInner withSourceResourceId(String sourceResourceId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -1014,4 +1072,64 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseInner. + */ + public static DatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseInner deserializedDatabaseInner = new DatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedDatabaseInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDatabaseInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedDatabaseInner.sku = Sku.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedDatabaseInner.kind = reader.getString(); + } else if ("managedBy".equals(fieldName)) { + deserializedDatabaseInner.managedBy = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedDatabaseInner.identity = DatabaseIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseInner.innerProperties = DatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java index 1b2ae1e8d9916..b3204374687a3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A database operation. */ +/** + * A database operation. + */ @Immutable public final class DatabaseOperationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseOperationProperties innerProperties; - /** Creates an instance of DatabaseOperationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseOperationInner class. + */ public DatabaseOperationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseOperationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the databaseName property: The name of the database the operation is being performed on. - * + * * @return the databaseName value. */ public String databaseName() { @@ -43,7 +94,7 @@ public String databaseName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -52,7 +103,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -61,7 +112,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -70,7 +121,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -79,7 +130,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -88,7 +139,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -97,7 +148,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -106,7 +157,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -115,7 +166,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -124,7 +175,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -133,7 +184,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -142,7 +193,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -151,7 +202,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -160,7 +211,7 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -168,4 +219,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseOperationInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseOperationInner. + */ + public static DatabaseOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseOperationInner deserializedDatabaseOperationInner = new DatabaseOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseOperationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseOperationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseOperationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseOperationInner.innerProperties = DatabaseOperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java index fc38d34c1692c..dd1b21d383313 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java @@ -5,104 +5,99 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a database operation. */ +/** + * The properties of a database operation. + */ @Immutable -public final class DatabaseOperationProperties { +public final class DatabaseOperationProperties implements JsonSerializable { /* * The name of the database the operation is being performed on. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * The name of operation. */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The friendly name of operation. */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) private String operationFriendlyName; /* * The percentage of the operation completed. */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) private Integer percentComplete; /* * The name of the server. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * The operation start time. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The operation state. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private ManagementOperationState state; /* * The operation error code. */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private Integer errorCode; /* * The operation error description. */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) private String errorDescription; /* * The operation error severity. */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) private Integer errorSeverity; /* * Whether or not the error is a user error. */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) private Boolean isUserError; /* * The estimated completion time of the operation. */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime estimatedCompletionTime; /* * The operation description. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Whether the operation can be cancelled. */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) private Boolean isCancellable; - /** Creates an instance of DatabaseOperationProperties class. */ + /** + * Creates an instance of DatabaseOperationProperties class. + */ public DatabaseOperationProperties() { } /** * Get the databaseName property: The name of the database the operation is being performed on. - * + * * @return the databaseName value. */ public String databaseName() { @@ -111,7 +106,7 @@ public String databaseName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -120,7 +115,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -129,7 +124,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -138,7 +133,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -147,7 +142,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -156,7 +151,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -165,7 +160,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -174,7 +169,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -183,7 +178,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -192,7 +187,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -201,7 +196,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -210,7 +205,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -219,7 +214,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -228,9 +223,73 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseOperationProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseOperationProperties. + */ + public static DatabaseOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseOperationProperties deserializedDatabaseOperationProperties = new DatabaseOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseName".equals(fieldName)) { + deserializedDatabaseOperationProperties.databaseName = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedDatabaseOperationProperties.operation = reader.getString(); + } else if ("operationFriendlyName".equals(fieldName)) { + deserializedDatabaseOperationProperties.operationFriendlyName = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedDatabaseOperationProperties.percentComplete = reader.getNullable(JsonReader::getInt); + } else if ("serverName".equals(fieldName)) { + deserializedDatabaseOperationProperties.serverName = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedDatabaseOperationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedDatabaseOperationProperties.state + = ManagementOperationState.fromString(reader.getString()); + } else if ("errorCode".equals(fieldName)) { + deserializedDatabaseOperationProperties.errorCode = reader.getNullable(JsonReader::getInt); + } else if ("errorDescription".equals(fieldName)) { + deserializedDatabaseOperationProperties.errorDescription = reader.getString(); + } else if ("errorSeverity".equals(fieldName)) { + deserializedDatabaseOperationProperties.errorSeverity = reader.getNullable(JsonReader::getInt); + } else if ("isUserError".equals(fieldName)) { + deserializedDatabaseOperationProperties.isUserError = reader.getNullable(JsonReader::getBoolean); + } else if ("estimatedCompletionTime".equals(fieldName)) { + deserializedDatabaseOperationProperties.estimatedCompletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("description".equals(fieldName)) { + deserializedDatabaseOperationProperties.description = reader.getString(); + } else if ("isCancellable".equals(fieldName)) { + deserializedDatabaseOperationProperties.isCancellable = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseProperties.java index 4b85ebe7714d2..b4a3ef65ed6b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseProperties.java @@ -5,6 +5,11 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.CreateMode; @@ -14,183 +19,163 @@ import com.azure.resourcemanager.sql.models.SampleName; import com.azure.resourcemanager.sql.models.SecondaryType; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Objects; import java.util.UUID; -/** The database's properties. */ +/** + * The database's properties. + */ @Fluent -public final class DatabaseProperties { +public final class DatabaseProperties implements JsonSerializable { /* * Specifies the mode of database creation. - * + * * Default: regular database creation. - * - * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified * as the resource ID of the existing primary database. - * + * * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * + * * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * + * * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * + * * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * + * * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. */ - @JsonProperty(value = "createMode") private CreateMode createMode; /* * The collation of the database. */ - @JsonProperty(value = "collation") private String collation; /* * The max size of the database expressed in bytes. */ - @JsonProperty(value = "maxSizeBytes") private Long maxSizeBytes; /* * The name of the sample schema to apply when creating this database. */ - @JsonProperty(value = "sampleName") private SampleName sampleName; /* * The resource identifier of the elastic pool containing this database. */ - @JsonProperty(value = "elasticPoolId") private String elasticPoolId; /* * The resource identifier of the source database associated with create operation of this database. */ - @JsonProperty(value = "sourceDatabaseId") private String sourceDatabaseId; /* * The status of the database. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatabaseStatus status; /* * The ID of the database. */ - @JsonProperty(value = "databaseId", access = JsonProperty.Access.WRITE_ONLY) private UUID databaseId; /* * The creation date of the database (ISO8601 format). */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * The current service level objective name of the database. */ - @JsonProperty(value = "currentServiceObjectiveName", access = JsonProperty.Access.WRITE_ONLY) private String currentServiceObjectiveName; /* * The requested service level objective name of the database. */ - @JsonProperty(value = "requestedServiceObjectiveName", access = JsonProperty.Access.WRITE_ONLY) private String requestedServiceObjectiveName; /* * The default secondary region for this database. */ - @JsonProperty(value = "defaultSecondaryLocation", access = JsonProperty.Access.WRITE_ONLY) private String defaultSecondaryLocation; /* * Failover Group resource identifier that this database belongs to. */ - @JsonProperty(value = "failoverGroupId", access = JsonProperty.Access.WRITE_ONLY) private String failoverGroupId; /* * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. */ - @JsonProperty(value = "restorePointInTime") private OffsetDateTime restorePointInTime; /* * Specifies the time that the database was deleted. */ - @JsonProperty(value = "sourceDatabaseDeletionDate") private OffsetDateTime sourceDatabaseDeletionDate; /* * The resource identifier of the recovery point associated with create operation of this database. */ - @JsonProperty(value = "recoveryServicesRecoveryPointId") private String recoveryServicesRecoveryPointId; /* * The resource identifier of the long term retention backup associated with create operation of this database. */ - @JsonProperty(value = "longTermRetentionBackupResourceId") private String longTermRetentionBackupResourceId; /* * The resource identifier of the recoverable database associated with create operation of this database. */ - @JsonProperty(value = "recoverableDatabaseId") private String recoverableDatabaseId; /* * The resource identifier of the restorable dropped database associated with create operation of this database. */ - @JsonProperty(value = "restorableDroppedDatabaseId") private String restorableDroppedDatabaseId; /* * Collation of the metadata catalog. */ - @JsonProperty(value = "catalogCollation") private CatalogCollationType catalogCollation; /* * Whether or not this database is zone redundant, which means the replicas of this database will be spread across * multiple availability zones. */ - @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; /* * The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have * a license and are eligible for the Azure Hybrid Benefit. */ - @JsonProperty(value = "licenseType") private DatabaseLicenseType licenseType; /* * The max log size for this database. */ - @JsonProperty(value = "maxLogSizeBytes", access = JsonProperty.Access.WRITE_ONLY) private Long maxLogSizeBytes; /* * This records the earliest start date and time that restore is available for this database (ISO8601 format). */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestoreDate; /* @@ -198,150 +183,136 @@ public final class DatabaseProperties { * connection string may be routed to a readonly secondary replica in the same region. Not applicable to a * Hyperscale database within an elastic pool. */ - @JsonProperty(value = "readScale") private DatabaseReadScale readScale; /* * The number of secondary replicas associated with the database that are used to provide high availability. Not * applicable to a Hyperscale database within an elastic pool. */ - @JsonProperty(value = "highAvailabilityReplicaCount") private Integer highAvailabilityReplicaCount; /* - * The secondary type of the database if it is a secondary. Valid values are Geo and Named. + * The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ - @JsonProperty(value = "secondaryType") private SecondaryType secondaryType; /* * The name and tier of the SKU. */ - @JsonProperty(value = "currentSku", access = JsonProperty.Access.WRITE_ONLY) private Sku currentSku; /* * Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is * disabled */ - @JsonProperty(value = "autoPauseDelay") private Integer autoPauseDelay; /* * The storage account type used to store backups for this database. */ - @JsonProperty(value = "currentBackupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy currentBackupStorageRedundancy; /* * The storage account type to be used to store backups for this database. */ - @JsonProperty(value = "requestedBackupStorageRedundancy") private BackupStorageRedundancy requestedBackupStorageRedundancy; /* * Minimal capacity that database will always have allocated, if not paused */ - @JsonProperty(value = "minCapacity") private Double minCapacity; /* - * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is - * ready. + * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. */ - @JsonProperty(value = "pausedDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime pausedDate; /* * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is * paused. */ - @JsonProperty(value = "resumedDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime resumedDate; /* - * Maintenance configuration id assigned to the database. This configuration defines the period when the - * maintenance updates will occur. + * Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance + * updates will occur. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; /* * Whether or not this database is a ledger database, which means all tables in the database are ledger tables. * Note: the value of this property cannot be changed after the database has been created. */ - @JsonProperty(value = "isLedgerOn") private Boolean isLedgerOn; /* * Infra encryption is enabled for this database. */ - @JsonProperty(value = "isInfraEncryptionEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isInfraEncryptionEnabled; /* * The Client id used for cross tenant per database CMK scenario */ - @JsonProperty(value = "federatedClientId") private UUID federatedClientId; /* * The resource identifier of the source associated with the create operation of this database. - * + * * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. - * + * * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and * sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. - * + * * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or * existing sql pool, and restorePointInTime must be specified. - * - * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or - * restorable dropped sql pool. - * + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable + * dropped sql pool. + * * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql * pool. - * + * * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” * header must contain authentication token for the source tenant. For more details about * “x-ms-authorization-auxiliary” header see * https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant */ - @JsonProperty(value = "sourceResourceId") private String sourceResourceId; - /** Creates an instance of DatabaseProperties class. */ + /** + * Creates an instance of DatabaseProperties class. + */ public DatabaseProperties() { } /** * Get the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @return the createMode value. */ public CreateMode createMode() { @@ -350,32 +321,32 @@ public CreateMode createMode() { /** * Set the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @param createMode the createMode value to set. * @return the DatabaseProperties object itself. */ @@ -386,7 +357,7 @@ public DatabaseProperties withCreateMode(CreateMode createMode) { /** * Get the collation property: The collation of the database. - * + * * @return the collation value. */ public String collation() { @@ -395,7 +366,7 @@ public String collation() { /** * Set the collation property: The collation of the database. - * + * * @param collation the collation value to set. * @return the DatabaseProperties object itself. */ @@ -406,7 +377,7 @@ public DatabaseProperties withCollation(String collation) { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -415,7 +386,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseProperties object itself. */ @@ -426,7 +397,7 @@ public DatabaseProperties withMaxSizeBytes(Long maxSizeBytes) { /** * Get the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @return the sampleName value. */ public SampleName sampleName() { @@ -435,7 +406,7 @@ public SampleName sampleName() { /** * Set the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @param sampleName the sampleName value to set. * @return the DatabaseProperties object itself. */ @@ -446,7 +417,7 @@ public DatabaseProperties withSampleName(SampleName sampleName) { /** * Get the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @return the elasticPoolId value. */ public String elasticPoolId() { @@ -455,7 +426,7 @@ public String elasticPoolId() { /** * Set the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @param elasticPoolId the elasticPoolId value to set. * @return the DatabaseProperties object itself. */ @@ -467,7 +438,7 @@ public DatabaseProperties withElasticPoolId(String elasticPoolId) { /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -477,7 +448,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the DatabaseProperties object itself. */ @@ -488,7 +459,7 @@ public DatabaseProperties withSourceDatabaseId(String sourceDatabaseId) { /** * Get the status property: The status of the database. - * + * * @return the status value. */ public DatabaseStatus status() { @@ -497,7 +468,7 @@ public DatabaseStatus status() { /** * Get the databaseId property: The ID of the database. - * + * * @return the databaseId value. */ public UUID databaseId() { @@ -506,7 +477,7 @@ public UUID databaseId() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -515,7 +486,7 @@ public OffsetDateTime creationDate() { /** * Get the currentServiceObjectiveName property: The current service level objective name of the database. - * + * * @return the currentServiceObjectiveName value. */ public String currentServiceObjectiveName() { @@ -524,7 +495,7 @@ public String currentServiceObjectiveName() { /** * Get the requestedServiceObjectiveName property: The requested service level objective name of the database. - * + * * @return the requestedServiceObjectiveName value. */ public String requestedServiceObjectiveName() { @@ -533,7 +504,7 @@ public String requestedServiceObjectiveName() { /** * Get the defaultSecondaryLocation property: The default secondary region for this database. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -542,7 +513,7 @@ public String defaultSecondaryLocation() { /** * Get the failoverGroupId property: Failover Group resource identifier that this database belongs to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -552,7 +523,7 @@ public String failoverGroupId() { /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -562,7 +533,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the DatabaseProperties object itself. */ @@ -573,7 +544,7 @@ public DatabaseProperties withRestorePointInTime(OffsetDateTime restorePointInTi /** * Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { @@ -582,7 +553,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { /** * Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. * @return the DatabaseProperties object itself. */ @@ -594,7 +565,7 @@ public DatabaseProperties withSourceDatabaseDeletionDate(OffsetDateTime sourceDa /** * Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @return the recoveryServicesRecoveryPointId value. */ public String recoveryServicesRecoveryPointId() { @@ -604,7 +575,7 @@ public String recoveryServicesRecoveryPointId() { /** * Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @param recoveryServicesRecoveryPointId the recoveryServicesRecoveryPointId value to set. * @return the DatabaseProperties object itself. */ @@ -616,7 +587,7 @@ public DatabaseProperties withRecoveryServicesRecoveryPointId(String recoverySer /** * Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -626,7 +597,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the DatabaseProperties object itself. */ @@ -638,7 +609,7 @@ public DatabaseProperties withLongTermRetentionBackupResourceId(String longTermR /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -648,7 +619,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the DatabaseProperties object itself. */ @@ -660,7 +631,7 @@ public DatabaseProperties withRecoverableDatabaseId(String recoverableDatabaseId /** * Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -670,7 +641,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the DatabaseProperties object itself. */ @@ -681,7 +652,7 @@ public DatabaseProperties withRestorableDroppedDatabaseId(String restorableDropp /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -690,7 +661,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the DatabaseProperties object itself. */ @@ -702,7 +673,7 @@ public DatabaseProperties withCatalogCollation(CatalogCollationType catalogColla /** * Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -712,7 +683,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the DatabaseProperties object itself. */ @@ -724,7 +695,7 @@ public DatabaseProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @return the licenseType value. */ public DatabaseLicenseType licenseType() { @@ -734,7 +705,7 @@ public DatabaseLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @param licenseType the licenseType value to set. * @return the DatabaseProperties object itself. */ @@ -745,7 +716,7 @@ public DatabaseProperties withLicenseType(DatabaseLicenseType licenseType) { /** * Get the maxLogSizeBytes property: The max log size for this database. - * + * * @return the maxLogSizeBytes value. */ public Long maxLogSizeBytes() { @@ -755,7 +726,7 @@ public Long maxLogSizeBytes() { /** * Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for * this database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -766,7 +737,7 @@ public OffsetDateTime earliestRestoreDate() { * Get the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @return the readScale value. */ public DatabaseReadScale readScale() { @@ -777,7 +748,7 @@ public DatabaseReadScale readScale() { * Set the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @param readScale the readScale value to set. * @return the DatabaseProperties object itself. */ @@ -789,7 +760,7 @@ public DatabaseProperties withReadScale(DatabaseReadScale readScale) { /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -799,7 +770,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseProperties object itself. */ @@ -811,7 +782,7 @@ public DatabaseProperties withHighAvailabilityReplicaCount(Integer highAvailabil /** * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @return the secondaryType value. */ public SecondaryType secondaryType() { @@ -821,7 +792,7 @@ public SecondaryType secondaryType() { /** * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @param secondaryType the secondaryType value to set. * @return the DatabaseProperties object itself. */ @@ -832,7 +803,7 @@ public DatabaseProperties withSecondaryType(SecondaryType secondaryType) { /** * Get the currentSku property: The name and tier of the SKU. - * + * * @return the currentSku value. */ public Sku currentSku() { @@ -842,7 +813,7 @@ public Sku currentSku() { /** * Get the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @return the autoPauseDelay value. */ public Integer autoPauseDelay() { @@ -852,7 +823,7 @@ public Integer autoPauseDelay() { /** * Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @param autoPauseDelay the autoPauseDelay value to set. * @return the DatabaseProperties object itself. */ @@ -864,7 +835,7 @@ public DatabaseProperties withAutoPauseDelay(Integer autoPauseDelay) { /** * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * database. - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -874,7 +845,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -884,19 +855,19 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the DatabaseProperties object itself. */ - public DatabaseProperties withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public DatabaseProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; return this; } /** * Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -905,7 +876,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the DatabaseProperties object itself. */ @@ -917,7 +888,7 @@ public DatabaseProperties withMinCapacity(Double minCapacity) { /** * Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format). * Null if the database is ready. - * + * * @return the pausedDate value. */ public OffsetDateTime pausedDate() { @@ -927,7 +898,7 @@ public OffsetDateTime pausedDate() { /** * Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 * format). Null if the database is paused. - * + * * @return the resumedDate value. */ public OffsetDateTime resumedDate() { @@ -937,7 +908,7 @@ public OffsetDateTime resumedDate() { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -947,7 +918,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the DatabaseProperties object itself. */ @@ -960,7 +931,7 @@ public DatabaseProperties withMaintenanceConfigurationId(String maintenanceConfi * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @return the isLedgerOn value. */ public Boolean isLedgerOn() { @@ -971,7 +942,7 @@ public Boolean isLedgerOn() { * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @param isLedgerOn the isLedgerOn value to set. * @return the DatabaseProperties object itself. */ @@ -982,7 +953,7 @@ public DatabaseProperties withIsLedgerOn(Boolean isLedgerOn) { /** * Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database. - * + * * @return the isInfraEncryptionEnabled value. */ public Boolean isInfraEncryptionEnabled() { @@ -991,7 +962,7 @@ public Boolean isInfraEncryptionEnabled() { /** * Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -1000,7 +971,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the DatabaseProperties object itself. */ @@ -1012,26 +983,26 @@ public DatabaseProperties withFederatedClientId(UUID federatedClientId) { /** * Get the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. - * - *

This property is only supported for DataWarehouse edition and allows to restore across subscriptions. - * - *

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and + * + * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. + * + * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and * sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. - * - *

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or + * + * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or * existing sql pool, and restorePointInTime must be specified. - * - *

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or - * restorable dropped sql pool. - * - *

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable - * sql pool. - * - *

When source subscription belongs to a different tenant than target subscription, - * “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details - * about “x-ms-authorization-auxiliary” header see + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable + * dropped sql pool. + * + * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql + * pool. + * + * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” + * header must contain authentication token for the source tenant. For more details about + * “x-ms-authorization-auxiliary” header see * https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant. - * + * * @return the sourceResourceId value. */ public String sourceResourceId() { @@ -1041,26 +1012,26 @@ public String sourceResourceId() { /** * Set the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. - * - *

This property is only supported for DataWarehouse edition and allows to restore across subscriptions. - * - *

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and + * + * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. + * + * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and * sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. - * - *

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or + * + * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or * existing sql pool, and restorePointInTime must be specified. - * - *

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or - * restorable dropped sql pool. - * - *

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable - * sql pool. - * - *

When source subscription belongs to a different tenant than target subscription, - * “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details - * about “x-ms-authorization-auxiliary” header see + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable + * dropped sql pool. + * + * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql + * pool. + * + * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” + * header must contain authentication token for the source tenant. For more details about + * “x-ms-authorization-auxiliary” header see * https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant. - * + * * @param sourceResourceId the sourceResourceId value to set. * @return the DatabaseProperties object itself. */ @@ -1071,7 +1042,7 @@ public DatabaseProperties withSourceResourceId(String sourceResourceId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -1079,4 +1050,161 @@ public void validate() { currentSku().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString()); + jsonWriter.writeStringField("collation", this.collation); + jsonWriter.writeNumberField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeStringField("sampleName", this.sampleName == null ? null : this.sampleName.toString()); + jsonWriter.writeStringField("elasticPoolId", this.elasticPoolId); + jsonWriter.writeStringField("sourceDatabaseId", this.sourceDatabaseId); + jsonWriter.writeStringField("restorePointInTime", + this.restorePointInTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.restorePointInTime)); + jsonWriter.writeStringField("sourceDatabaseDeletionDate", + this.sourceDatabaseDeletionDate == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sourceDatabaseDeletionDate)); + jsonWriter.writeStringField("recoveryServicesRecoveryPointId", this.recoveryServicesRecoveryPointId); + jsonWriter.writeStringField("longTermRetentionBackupResourceId", this.longTermRetentionBackupResourceId); + jsonWriter.writeStringField("recoverableDatabaseId", this.recoverableDatabaseId); + jsonWriter.writeStringField("restorableDroppedDatabaseId", this.restorableDroppedDatabaseId); + jsonWriter.writeStringField("catalogCollation", + this.catalogCollation == null ? null : this.catalogCollation.toString()); + jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeStringField("readScale", this.readScale == null ? null : this.readScale.toString()); + jsonWriter.writeNumberField("highAvailabilityReplicaCount", this.highAvailabilityReplicaCount); + jsonWriter.writeStringField("secondaryType", this.secondaryType == null ? null : this.secondaryType.toString()); + jsonWriter.writeNumberField("autoPauseDelay", this.autoPauseDelay); + jsonWriter.writeStringField("requestedBackupStorageRedundancy", + this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); + jsonWriter.writeNumberField("minCapacity", this.minCapacity); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + jsonWriter.writeBooleanField("isLedgerOn", this.isLedgerOn); + jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); + jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseProperties. + */ + public static DatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseProperties deserializedDatabaseProperties = new DatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createMode".equals(fieldName)) { + deserializedDatabaseProperties.createMode = CreateMode.fromString(reader.getString()); + } else if ("collation".equals(fieldName)) { + deserializedDatabaseProperties.collation = reader.getString(); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedDatabaseProperties.maxSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("sampleName".equals(fieldName)) { + deserializedDatabaseProperties.sampleName = SampleName.fromString(reader.getString()); + } else if ("elasticPoolId".equals(fieldName)) { + deserializedDatabaseProperties.elasticPoolId = reader.getString(); + } else if ("sourceDatabaseId".equals(fieldName)) { + deserializedDatabaseProperties.sourceDatabaseId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedDatabaseProperties.status = DatabaseStatus.fromString(reader.getString()); + } else if ("databaseId".equals(fieldName)) { + deserializedDatabaseProperties.databaseId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("creationDate".equals(fieldName)) { + deserializedDatabaseProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentServiceObjectiveName".equals(fieldName)) { + deserializedDatabaseProperties.currentServiceObjectiveName = reader.getString(); + } else if ("requestedServiceObjectiveName".equals(fieldName)) { + deserializedDatabaseProperties.requestedServiceObjectiveName = reader.getString(); + } else if ("defaultSecondaryLocation".equals(fieldName)) { + deserializedDatabaseProperties.defaultSecondaryLocation = reader.getString(); + } else if ("failoverGroupId".equals(fieldName)) { + deserializedDatabaseProperties.failoverGroupId = reader.getString(); + } else if ("restorePointInTime".equals(fieldName)) { + deserializedDatabaseProperties.restorePointInTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("sourceDatabaseDeletionDate".equals(fieldName)) { + deserializedDatabaseProperties.sourceDatabaseDeletionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recoveryServicesRecoveryPointId".equals(fieldName)) { + deserializedDatabaseProperties.recoveryServicesRecoveryPointId = reader.getString(); + } else if ("longTermRetentionBackupResourceId".equals(fieldName)) { + deserializedDatabaseProperties.longTermRetentionBackupResourceId = reader.getString(); + } else if ("recoverableDatabaseId".equals(fieldName)) { + deserializedDatabaseProperties.recoverableDatabaseId = reader.getString(); + } else if ("restorableDroppedDatabaseId".equals(fieldName)) { + deserializedDatabaseProperties.restorableDroppedDatabaseId = reader.getString(); + } else if ("catalogCollation".equals(fieldName)) { + deserializedDatabaseProperties.catalogCollation + = CatalogCollationType.fromString(reader.getString()); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedDatabaseProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("licenseType".equals(fieldName)) { + deserializedDatabaseProperties.licenseType = DatabaseLicenseType.fromString(reader.getString()); + } else if ("maxLogSizeBytes".equals(fieldName)) { + deserializedDatabaseProperties.maxLogSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedDatabaseProperties.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("readScale".equals(fieldName)) { + deserializedDatabaseProperties.readScale = DatabaseReadScale.fromString(reader.getString()); + } else if ("highAvailabilityReplicaCount".equals(fieldName)) { + deserializedDatabaseProperties.highAvailabilityReplicaCount + = reader.getNullable(JsonReader::getInt); + } else if ("secondaryType".equals(fieldName)) { + deserializedDatabaseProperties.secondaryType = SecondaryType.fromString(reader.getString()); + } else if ("currentSku".equals(fieldName)) { + deserializedDatabaseProperties.currentSku = Sku.fromJson(reader); + } else if ("autoPauseDelay".equals(fieldName)) { + deserializedDatabaseProperties.autoPauseDelay = reader.getNullable(JsonReader::getInt); + } else if ("currentBackupStorageRedundancy".equals(fieldName)) { + deserializedDatabaseProperties.currentBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("requestedBackupStorageRedundancy".equals(fieldName)) { + deserializedDatabaseProperties.requestedBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("minCapacity".equals(fieldName)) { + deserializedDatabaseProperties.minCapacity = reader.getNullable(JsonReader::getDouble); + } else if ("pausedDate".equals(fieldName)) { + deserializedDatabaseProperties.pausedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("resumedDate".equals(fieldName)) { + deserializedDatabaseProperties.resumedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedDatabaseProperties.maintenanceConfigurationId = reader.getString(); + } else if ("isLedgerOn".equals(fieldName)) { + deserializedDatabaseProperties.isLedgerOn = reader.getNullable(JsonReader::getBoolean); + } else if ("isInfraEncryptionEnabled".equals(fieldName)) { + deserializedDatabaseProperties.isInfraEncryptionEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("federatedClientId".equals(fieldName)) { + deserializedDatabaseProperties.federatedClientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("sourceResourceId".equals(fieldName)) { + deserializedDatabaseProperties.sourceResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java index 4fc1445691986..60e70c4cfd444 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java @@ -6,19 +6,112 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A database schema resource. */ +/** + * A database schema resource. + */ @Immutable public final class DatabaseSchemaInner extends ProxyResource { - /** Creates an instance of DatabaseSchemaInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseSchemaInner class. + */ public DatabaseSchemaInner() { } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseSchemaInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseSchemaInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseSchemaInner. + */ + public static DatabaseSchemaInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseSchemaInner deserializedDatabaseSchemaInner = new DatabaseSchemaInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseSchemaInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseSchemaInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseSchemaInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseSchemaInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java index e55c2bdeed43a..b333d57ba0b26 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java @@ -7,33 +7,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A database security alert policy. */ +/** + * A database security alert policy. + */ @Fluent public final class DatabaseSecurityAlertPolicyInner extends ProxyResource { /* * SystemData of SecurityAlertPolicyResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") private SecurityAlertsPolicyProperties innerProperties; - /** Creates an instance of DatabaseSecurityAlertPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseSecurityAlertPolicyInner class. + */ public DatabaseSecurityAlertPolicyInner() { } /** * Get the systemData property: SystemData of SecurityAlertPolicyResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -42,17 +62,47 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SecurityAlertsPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -62,7 +112,7 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -77,7 +127,7 @@ public DatabaseSecurityAlertPolicyInner withState(SecurityAlertPolicyState state /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -87,7 +137,7 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -101,7 +151,7 @@ public DatabaseSecurityAlertPolicyInner withDisabledAlerts(List disabled /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -110,7 +160,7 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -124,7 +174,7 @@ public DatabaseSecurityAlertPolicyInner withEmailAddresses(List emailAdd /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -133,7 +183,7 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -148,7 +198,7 @@ public DatabaseSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAcco /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -158,7 +208,7 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -173,7 +223,7 @@ public DatabaseSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoi /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -183,7 +233,7 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -197,7 +247,7 @@ public DatabaseSecurityAlertPolicyInner withStorageAccountAccessKey(String stora /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -206,7 +256,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the DatabaseSecurityAlertPolicyInner object itself. */ @@ -220,7 +270,7 @@ public DatabaseSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -229,7 +279,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -237,4 +287,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseSecurityAlertPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseSecurityAlertPolicyInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseSecurityAlertPolicyInner. + */ + public static DatabaseSecurityAlertPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseSecurityAlertPolicyInner deserializedDatabaseSecurityAlertPolicyInner + = new DatabaseSecurityAlertPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.innerProperties + = SecurityAlertsPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseSecurityAlertPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java index 122efc720f84b..436aa5ecdb614 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TableTemporalType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A database table resource. */ +/** + * A database table resource. + */ @Fluent public final class DatabaseTableInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseTableProperties innerProperties; - /** Creates an instance of DatabaseTableInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseTableInner class. + */ public DatabaseTableInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseTableProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the temporalType property: The table temporal type. - * + * * @return the temporalType value. */ public TableTemporalType temporalType() { @@ -42,7 +93,7 @@ public TableTemporalType temporalType() { /** * Set the temporalType property: The table temporal type. - * + * * @param temporalType the temporalType value to set. * @return the DatabaseTableInner object itself. */ @@ -56,7 +107,7 @@ public DatabaseTableInner withTemporalType(TableTemporalType temporalType) { /** * Get the memoryOptimized property: Whether or not the table is memory optimized. - * + * * @return the memoryOptimized value. */ public Boolean memoryOptimized() { @@ -65,7 +116,7 @@ public Boolean memoryOptimized() { /** * Set the memoryOptimized property: Whether or not the table is memory optimized. - * + * * @param memoryOptimized the memoryOptimized value to set. * @return the DatabaseTableInner object itself. */ @@ -79,7 +130,7 @@ public DatabaseTableInner withMemoryOptimized(Boolean memoryOptimized) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -87,4 +138,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseTableInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseTableInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseTableInner. + */ + public static DatabaseTableInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseTableInner deserializedDatabaseTableInner = new DatabaseTableInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseTableInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseTableInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseTableInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseTableInner.innerProperties = DatabaseTableProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseTableInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java index 18244e9a0e251..2a315ed31c923 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TableTemporalType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Database table properties. */ +/** + * Database table properties. + */ @Fluent -public final class DatabaseTableProperties { +public final class DatabaseTableProperties implements JsonSerializable { /* * The table temporal type. */ - @JsonProperty(value = "temporalType") private TableTemporalType temporalType; /* * Whether or not the table is memory optimized. */ - @JsonProperty(value = "memoryOptimized") private Boolean memoryOptimized; - /** Creates an instance of DatabaseTableProperties class. */ + /** + * Creates an instance of DatabaseTableProperties class. + */ public DatabaseTableProperties() { } /** * Get the temporalType property: The table temporal type. - * + * * @return the temporalType value. */ public TableTemporalType temporalType() { @@ -38,7 +44,7 @@ public TableTemporalType temporalType() { /** * Set the temporalType property: The table temporal type. - * + * * @param temporalType the temporalType value to set. * @return the DatabaseTableProperties object itself. */ @@ -49,7 +55,7 @@ public DatabaseTableProperties withTemporalType(TableTemporalType temporalType) /** * Get the memoryOptimized property: Whether or not the table is memory optimized. - * + * * @return the memoryOptimized value. */ public Boolean memoryOptimized() { @@ -58,7 +64,7 @@ public Boolean memoryOptimized() { /** * Set the memoryOptimized property: Whether or not the table is memory optimized. - * + * * @param memoryOptimized the memoryOptimized value to set. * @return the DatabaseTableProperties object itself. */ @@ -69,9 +75,48 @@ public DatabaseTableProperties withMemoryOptimized(Boolean memoryOptimized) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("temporalType", this.temporalType == null ? null : this.temporalType.toString()); + jsonWriter.writeBooleanField("memoryOptimized", this.memoryOptimized); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseTableProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseTableProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseTableProperties. + */ + public static DatabaseTableProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseTableProperties deserializedDatabaseTableProperties = new DatabaseTableProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("temporalType".equals(fieldName)) { + deserializedDatabaseTableProperties.temporalType = TableTemporalType.fromString(reader.getString()); + } else if ("memoryOptimized".equals(fieldName)) { + deserializedDatabaseTableProperties.memoryOptimized = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseTableProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUpdateProperties.java index df33261cd7b4e..5eee116f04c95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUpdateProperties.java @@ -5,6 +5,11 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.CreateMode; @@ -14,183 +19,163 @@ import com.azure.resourcemanager.sql.models.SampleName; import com.azure.resourcemanager.sql.models.SecondaryType; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Objects; import java.util.UUID; -/** A database update properties. */ +/** + * A database update properties. + */ @Fluent -public final class DatabaseUpdateProperties { +public final class DatabaseUpdateProperties implements JsonSerializable { /* * Specifies the mode of database creation. - * + * * Default: regular database creation. - * - * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified * as the resource ID of the existing primary database. - * + * * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * + * * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * + * * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * + * * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * + * * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. */ - @JsonProperty(value = "createMode") private CreateMode createMode; /* * The collation of the database. */ - @JsonProperty(value = "collation") private String collation; /* * The max size of the database expressed in bytes. */ - @JsonProperty(value = "maxSizeBytes") private Long maxSizeBytes; /* * The name of the sample schema to apply when creating this database. */ - @JsonProperty(value = "sampleName") private SampleName sampleName; /* * The resource identifier of the elastic pool containing this database. */ - @JsonProperty(value = "elasticPoolId") private String elasticPoolId; /* * The resource identifier of the source database associated with create operation of this database. */ - @JsonProperty(value = "sourceDatabaseId") private String sourceDatabaseId; /* * The status of the database. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatabaseStatus status; /* * The ID of the database. */ - @JsonProperty(value = "databaseId", access = JsonProperty.Access.WRITE_ONLY) private UUID databaseId; /* * The creation date of the database (ISO8601 format). */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * The current service level objective name of the database. */ - @JsonProperty(value = "currentServiceObjectiveName", access = JsonProperty.Access.WRITE_ONLY) private String currentServiceObjectiveName; /* * The requested service level objective name of the database. */ - @JsonProperty(value = "requestedServiceObjectiveName", access = JsonProperty.Access.WRITE_ONLY) private String requestedServiceObjectiveName; /* * The default secondary region for this database. */ - @JsonProperty(value = "defaultSecondaryLocation", access = JsonProperty.Access.WRITE_ONLY) private String defaultSecondaryLocation; /* * Failover Group resource identifier that this database belongs to. */ - @JsonProperty(value = "failoverGroupId", access = JsonProperty.Access.WRITE_ONLY) private String failoverGroupId; /* * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. */ - @JsonProperty(value = "restorePointInTime") private OffsetDateTime restorePointInTime; /* * Specifies the time that the database was deleted. */ - @JsonProperty(value = "sourceDatabaseDeletionDate") private OffsetDateTime sourceDatabaseDeletionDate; /* * The resource identifier of the recovery point associated with create operation of this database. */ - @JsonProperty(value = "recoveryServicesRecoveryPointId") private String recoveryServicesRecoveryPointId; /* * The resource identifier of the long term retention backup associated with create operation of this database. */ - @JsonProperty(value = "longTermRetentionBackupResourceId") private String longTermRetentionBackupResourceId; /* * The resource identifier of the recoverable database associated with create operation of this database. */ - @JsonProperty(value = "recoverableDatabaseId") private String recoverableDatabaseId; /* * The resource identifier of the restorable dropped database associated with create operation of this database. */ - @JsonProperty(value = "restorableDroppedDatabaseId") private String restorableDroppedDatabaseId; /* * Collation of the metadata catalog. */ - @JsonProperty(value = "catalogCollation") private CatalogCollationType catalogCollation; /* * Whether or not this database is zone redundant, which means the replicas of this database will be spread across * multiple availability zones. */ - @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; /* * The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have * a license and are eligible for the Azure Hybrid Benefit. */ - @JsonProperty(value = "licenseType") private DatabaseLicenseType licenseType; /* * The max log size for this database. */ - @JsonProperty(value = "maxLogSizeBytes", access = JsonProperty.Access.WRITE_ONLY) private Long maxLogSizeBytes; /* * This records the earliest start date and time that restore is available for this database (ISO8601 format). */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestoreDate; /* @@ -198,125 +183,112 @@ public final class DatabaseUpdateProperties { * connection string may be routed to a readonly secondary replica in the same region. Not applicable to a * Hyperscale database within an elastic pool. */ - @JsonProperty(value = "readScale") private DatabaseReadScale readScale; /* * The number of secondary replicas associated with the database that are used to provide high availability. Not * applicable to a Hyperscale database within an elastic pool. */ - @JsonProperty(value = "highAvailabilityReplicaCount") private Integer highAvailabilityReplicaCount; /* - * The secondary type of the database if it is a secondary. Valid values are Geo and Named. + * The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ - @JsonProperty(value = "secondaryType") private SecondaryType secondaryType; /* * The name and tier of the SKU. */ - @JsonProperty(value = "currentSku", access = JsonProperty.Access.WRITE_ONLY) private Sku currentSku; /* * Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is * disabled */ - @JsonProperty(value = "autoPauseDelay") private Integer autoPauseDelay; /* * The storage account type used to store backups for this database. */ - @JsonProperty(value = "currentBackupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy currentBackupStorageRedundancy; /* * The storage account type to be used to store backups for this database. */ - @JsonProperty(value = "requestedBackupStorageRedundancy") private BackupStorageRedundancy requestedBackupStorageRedundancy; /* * Minimal capacity that database will always have allocated, if not paused */ - @JsonProperty(value = "minCapacity") private Double minCapacity; /* - * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is - * ready. + * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. */ - @JsonProperty(value = "pausedDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime pausedDate; /* * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is * paused. */ - @JsonProperty(value = "resumedDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime resumedDate; /* - * Maintenance configuration id assigned to the database. This configuration defines the period when the - * maintenance updates will occur. + * Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance + * updates will occur. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; /* * Whether or not this database is a ledger database, which means all tables in the database are ledger tables. * Note: the value of this property cannot be changed after the database has been created. */ - @JsonProperty(value = "isLedgerOn") private Boolean isLedgerOn; /* * Infra encryption is enabled for this database. */ - @JsonProperty(value = "isInfraEncryptionEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isInfraEncryptionEnabled; /* * The Client id used for cross tenant per database CMK scenario */ - @JsonProperty(value = "federatedClientId") private UUID federatedClientId; - /** Creates an instance of DatabaseUpdateProperties class. */ + /** + * Creates an instance of DatabaseUpdateProperties class. + */ public DatabaseUpdateProperties() { } /** * Get the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @return the createMode value. */ public CreateMode createMode() { @@ -325,32 +297,32 @@ public CreateMode createMode() { /** * Set the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @param createMode the createMode value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -361,7 +333,7 @@ public DatabaseUpdateProperties withCreateMode(CreateMode createMode) { /** * Get the collation property: The collation of the database. - * + * * @return the collation value. */ public String collation() { @@ -370,7 +342,7 @@ public String collation() { /** * Set the collation property: The collation of the database. - * + * * @param collation the collation value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -381,7 +353,7 @@ public DatabaseUpdateProperties withCollation(String collation) { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -390,7 +362,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -401,7 +373,7 @@ public DatabaseUpdateProperties withMaxSizeBytes(Long maxSizeBytes) { /** * Get the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @return the sampleName value. */ public SampleName sampleName() { @@ -410,7 +382,7 @@ public SampleName sampleName() { /** * Set the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @param sampleName the sampleName value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -421,7 +393,7 @@ public DatabaseUpdateProperties withSampleName(SampleName sampleName) { /** * Get the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @return the elasticPoolId value. */ public String elasticPoolId() { @@ -430,7 +402,7 @@ public String elasticPoolId() { /** * Set the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @param elasticPoolId the elasticPoolId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -442,7 +414,7 @@ public DatabaseUpdateProperties withElasticPoolId(String elasticPoolId) { /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -452,7 +424,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -463,7 +435,7 @@ public DatabaseUpdateProperties withSourceDatabaseId(String sourceDatabaseId) { /** * Get the status property: The status of the database. - * + * * @return the status value. */ public DatabaseStatus status() { @@ -472,7 +444,7 @@ public DatabaseStatus status() { /** * Get the databaseId property: The ID of the database. - * + * * @return the databaseId value. */ public UUID databaseId() { @@ -481,7 +453,7 @@ public UUID databaseId() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -490,7 +462,7 @@ public OffsetDateTime creationDate() { /** * Get the currentServiceObjectiveName property: The current service level objective name of the database. - * + * * @return the currentServiceObjectiveName value. */ public String currentServiceObjectiveName() { @@ -499,7 +471,7 @@ public String currentServiceObjectiveName() { /** * Get the requestedServiceObjectiveName property: The requested service level objective name of the database. - * + * * @return the requestedServiceObjectiveName value. */ public String requestedServiceObjectiveName() { @@ -508,7 +480,7 @@ public String requestedServiceObjectiveName() { /** * Get the defaultSecondaryLocation property: The default secondary region for this database. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -517,7 +489,7 @@ public String defaultSecondaryLocation() { /** * Get the failoverGroupId property: Failover Group resource identifier that this database belongs to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -527,7 +499,7 @@ public String failoverGroupId() { /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -537,7 +509,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -548,7 +520,7 @@ public DatabaseUpdateProperties withRestorePointInTime(OffsetDateTime restorePoi /** * Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { @@ -557,7 +529,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { /** * Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -569,7 +541,7 @@ public DatabaseUpdateProperties withSourceDatabaseDeletionDate(OffsetDateTime so /** * Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @return the recoveryServicesRecoveryPointId value. */ public String recoveryServicesRecoveryPointId() { @@ -579,7 +551,7 @@ public String recoveryServicesRecoveryPointId() { /** * Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @param recoveryServicesRecoveryPointId the recoveryServicesRecoveryPointId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -591,7 +563,7 @@ public DatabaseUpdateProperties withRecoveryServicesRecoveryPointId(String recov /** * Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -601,7 +573,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -613,7 +585,7 @@ public DatabaseUpdateProperties withLongTermRetentionBackupResourceId(String lon /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -623,7 +595,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -635,7 +607,7 @@ public DatabaseUpdateProperties withRecoverableDatabaseId(String recoverableData /** * Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -645,7 +617,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -656,7 +628,7 @@ public DatabaseUpdateProperties withRestorableDroppedDatabaseId(String restorabl /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -665,7 +637,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -677,7 +649,7 @@ public DatabaseUpdateProperties withCatalogCollation(CatalogCollationType catalo /** * Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -687,7 +659,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -699,7 +671,7 @@ public DatabaseUpdateProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @return the licenseType value. */ public DatabaseLicenseType licenseType() { @@ -709,7 +681,7 @@ public DatabaseLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @param licenseType the licenseType value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -720,7 +692,7 @@ public DatabaseUpdateProperties withLicenseType(DatabaseLicenseType licenseType) /** * Get the maxLogSizeBytes property: The max log size for this database. - * + * * @return the maxLogSizeBytes value. */ public Long maxLogSizeBytes() { @@ -730,7 +702,7 @@ public Long maxLogSizeBytes() { /** * Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for * this database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -741,7 +713,7 @@ public OffsetDateTime earliestRestoreDate() { * Get the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @return the readScale value. */ public DatabaseReadScale readScale() { @@ -752,7 +724,7 @@ public DatabaseReadScale readScale() { * Set the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @param readScale the readScale value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -764,7 +736,7 @@ public DatabaseUpdateProperties withReadScale(DatabaseReadScale readScale) { /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -774,7 +746,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -786,7 +758,7 @@ public DatabaseUpdateProperties withHighAvailabilityReplicaCount(Integer highAva /** * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @return the secondaryType value. */ public SecondaryType secondaryType() { @@ -796,7 +768,7 @@ public SecondaryType secondaryType() { /** * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @param secondaryType the secondaryType value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -807,7 +779,7 @@ public DatabaseUpdateProperties withSecondaryType(SecondaryType secondaryType) { /** * Get the currentSku property: The name and tier of the SKU. - * + * * @return the currentSku value. */ public Sku currentSku() { @@ -817,7 +789,7 @@ public Sku currentSku() { /** * Get the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @return the autoPauseDelay value. */ public Integer autoPauseDelay() { @@ -827,7 +799,7 @@ public Integer autoPauseDelay() { /** * Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @param autoPauseDelay the autoPauseDelay value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -839,7 +811,7 @@ public DatabaseUpdateProperties withAutoPauseDelay(Integer autoPauseDelay) { /** * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * database. - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -849,7 +821,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -859,19 +831,19 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the DatabaseUpdateProperties object itself. */ - public DatabaseUpdateProperties withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public DatabaseUpdateProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; return this; } /** * Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -880,7 +852,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -892,7 +864,7 @@ public DatabaseUpdateProperties withMinCapacity(Double minCapacity) { /** * Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format). * Null if the database is ready. - * + * * @return the pausedDate value. */ public OffsetDateTime pausedDate() { @@ -902,7 +874,7 @@ public OffsetDateTime pausedDate() { /** * Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 * format). Null if the database is paused. - * + * * @return the resumedDate value. */ public OffsetDateTime resumedDate() { @@ -912,7 +884,7 @@ public OffsetDateTime resumedDate() { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -922,7 +894,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -935,7 +907,7 @@ public DatabaseUpdateProperties withMaintenanceConfigurationId(String maintenanc * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @return the isLedgerOn value. */ public Boolean isLedgerOn() { @@ -946,7 +918,7 @@ public Boolean isLedgerOn() { * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @param isLedgerOn the isLedgerOn value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -957,7 +929,7 @@ public DatabaseUpdateProperties withIsLedgerOn(Boolean isLedgerOn) { /** * Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database. - * + * * @return the isInfraEncryptionEnabled value. */ public Boolean isInfraEncryptionEnabled() { @@ -966,7 +938,7 @@ public Boolean isInfraEncryptionEnabled() { /** * Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -975,7 +947,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the DatabaseUpdateProperties object itself. */ @@ -986,7 +958,7 @@ public DatabaseUpdateProperties withFederatedClientId(UUID federatedClientId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -994,4 +966,159 @@ public void validate() { currentSku().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString()); + jsonWriter.writeStringField("collation", this.collation); + jsonWriter.writeNumberField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeStringField("sampleName", this.sampleName == null ? null : this.sampleName.toString()); + jsonWriter.writeStringField("elasticPoolId", this.elasticPoolId); + jsonWriter.writeStringField("sourceDatabaseId", this.sourceDatabaseId); + jsonWriter.writeStringField("restorePointInTime", + this.restorePointInTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.restorePointInTime)); + jsonWriter.writeStringField("sourceDatabaseDeletionDate", + this.sourceDatabaseDeletionDate == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.sourceDatabaseDeletionDate)); + jsonWriter.writeStringField("recoveryServicesRecoveryPointId", this.recoveryServicesRecoveryPointId); + jsonWriter.writeStringField("longTermRetentionBackupResourceId", this.longTermRetentionBackupResourceId); + jsonWriter.writeStringField("recoverableDatabaseId", this.recoverableDatabaseId); + jsonWriter.writeStringField("restorableDroppedDatabaseId", this.restorableDroppedDatabaseId); + jsonWriter.writeStringField("catalogCollation", + this.catalogCollation == null ? null : this.catalogCollation.toString()); + jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeStringField("readScale", this.readScale == null ? null : this.readScale.toString()); + jsonWriter.writeNumberField("highAvailabilityReplicaCount", this.highAvailabilityReplicaCount); + jsonWriter.writeStringField("secondaryType", this.secondaryType == null ? null : this.secondaryType.toString()); + jsonWriter.writeNumberField("autoPauseDelay", this.autoPauseDelay); + jsonWriter.writeStringField("requestedBackupStorageRedundancy", + this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); + jsonWriter.writeNumberField("minCapacity", this.minCapacity); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + jsonWriter.writeBooleanField("isLedgerOn", this.isLedgerOn); + jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUpdateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseUpdateProperties. + */ + public static DatabaseUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUpdateProperties deserializedDatabaseUpdateProperties = new DatabaseUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createMode".equals(fieldName)) { + deserializedDatabaseUpdateProperties.createMode = CreateMode.fromString(reader.getString()); + } else if ("collation".equals(fieldName)) { + deserializedDatabaseUpdateProperties.collation = reader.getString(); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedDatabaseUpdateProperties.maxSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("sampleName".equals(fieldName)) { + deserializedDatabaseUpdateProperties.sampleName = SampleName.fromString(reader.getString()); + } else if ("elasticPoolId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.elasticPoolId = reader.getString(); + } else if ("sourceDatabaseId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.sourceDatabaseId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedDatabaseUpdateProperties.status = DatabaseStatus.fromString(reader.getString()); + } else if ("databaseId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.databaseId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("creationDate".equals(fieldName)) { + deserializedDatabaseUpdateProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentServiceObjectiveName".equals(fieldName)) { + deserializedDatabaseUpdateProperties.currentServiceObjectiveName = reader.getString(); + } else if ("requestedServiceObjectiveName".equals(fieldName)) { + deserializedDatabaseUpdateProperties.requestedServiceObjectiveName = reader.getString(); + } else if ("defaultSecondaryLocation".equals(fieldName)) { + deserializedDatabaseUpdateProperties.defaultSecondaryLocation = reader.getString(); + } else if ("failoverGroupId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.failoverGroupId = reader.getString(); + } else if ("restorePointInTime".equals(fieldName)) { + deserializedDatabaseUpdateProperties.restorePointInTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("sourceDatabaseDeletionDate".equals(fieldName)) { + deserializedDatabaseUpdateProperties.sourceDatabaseDeletionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recoveryServicesRecoveryPointId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.recoveryServicesRecoveryPointId = reader.getString(); + } else if ("longTermRetentionBackupResourceId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.longTermRetentionBackupResourceId = reader.getString(); + } else if ("recoverableDatabaseId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.recoverableDatabaseId = reader.getString(); + } else if ("restorableDroppedDatabaseId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.restorableDroppedDatabaseId = reader.getString(); + } else if ("catalogCollation".equals(fieldName)) { + deserializedDatabaseUpdateProperties.catalogCollation + = CatalogCollationType.fromString(reader.getString()); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedDatabaseUpdateProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("licenseType".equals(fieldName)) { + deserializedDatabaseUpdateProperties.licenseType + = DatabaseLicenseType.fromString(reader.getString()); + } else if ("maxLogSizeBytes".equals(fieldName)) { + deserializedDatabaseUpdateProperties.maxLogSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedDatabaseUpdateProperties.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("readScale".equals(fieldName)) { + deserializedDatabaseUpdateProperties.readScale = DatabaseReadScale.fromString(reader.getString()); + } else if ("highAvailabilityReplicaCount".equals(fieldName)) { + deserializedDatabaseUpdateProperties.highAvailabilityReplicaCount + = reader.getNullable(JsonReader::getInt); + } else if ("secondaryType".equals(fieldName)) { + deserializedDatabaseUpdateProperties.secondaryType = SecondaryType.fromString(reader.getString()); + } else if ("currentSku".equals(fieldName)) { + deserializedDatabaseUpdateProperties.currentSku = Sku.fromJson(reader); + } else if ("autoPauseDelay".equals(fieldName)) { + deserializedDatabaseUpdateProperties.autoPauseDelay = reader.getNullable(JsonReader::getInt); + } else if ("currentBackupStorageRedundancy".equals(fieldName)) { + deserializedDatabaseUpdateProperties.currentBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("requestedBackupStorageRedundancy".equals(fieldName)) { + deserializedDatabaseUpdateProperties.requestedBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("minCapacity".equals(fieldName)) { + deserializedDatabaseUpdateProperties.minCapacity = reader.getNullable(JsonReader::getDouble); + } else if ("pausedDate".equals(fieldName)) { + deserializedDatabaseUpdateProperties.pausedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("resumedDate".equals(fieldName)) { + deserializedDatabaseUpdateProperties.resumedDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.maintenanceConfigurationId = reader.getString(); + } else if ("isLedgerOn".equals(fieldName)) { + deserializedDatabaseUpdateProperties.isLedgerOn = reader.getNullable(JsonReader::getBoolean); + } else if ("isInfraEncryptionEnabled".equals(fieldName)) { + deserializedDatabaseUpdateProperties.isInfraEncryptionEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("federatedClientId".equals(fieldName)) { + deserializedDatabaseUpdateProperties.federatedClientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java index 3199c786f40b8..da1f94c05ceaf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Usage metric of a database. */ +/** + * Usage metric of a database. + */ @Immutable public final class DatabaseUsageInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseUsageProperties innerProperties; - /** Creates an instance of DatabaseUsageInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseUsageInner class. + */ public DatabaseUsageInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseUsageProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -41,7 +92,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -50,7 +101,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -59,7 +110,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -68,7 +119,7 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -76,4 +127,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUsageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUsageInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseUsageInner. + */ + public static DatabaseUsageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUsageInner deserializedDatabaseUsageInner = new DatabaseUsageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseUsageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseUsageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseUsageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseUsageInner.innerProperties = DatabaseUsageProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUsageInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java index 713da272809f6..9d998a5e1e46b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a database usage. */ +/** + * Properties of a database usage. + */ @Immutable -public final class DatabaseUsageProperties { +public final class DatabaseUsageProperties implements JsonSerializable { /* * User-readable name of the metric. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * Current value of the metric. */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) private Double currentValue; /* * Boundary value of the metric. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Double limit; /* * Unit of the metric. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; - /** Creates an instance of DatabaseUsageProperties class. */ + /** + * Creates an instance of DatabaseUsageProperties class. + */ public DatabaseUsageProperties() { } /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -49,7 +53,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -58,7 +62,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -67,7 +71,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -76,9 +80,50 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUsageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUsageProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseUsageProperties. + */ + public static DatabaseUsageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUsageProperties deserializedDatabaseUsageProperties = new DatabaseUsageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedDatabaseUsageProperties.displayName = reader.getString(); + } else if ("currentValue".equals(fieldName)) { + deserializedDatabaseUsageProperties.currentValue = reader.getNullable(JsonReader::getDouble); + } else if ("limit".equals(fieldName)) { + deserializedDatabaseUsageProperties.limit = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedDatabaseUsageProperties.unit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUsageProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentAutoGeneratedInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentAutoGeneratedInner.java new file mode 100644 index 0000000000000..5e40d1aa0f245 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentAutoGeneratedInner.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; +import java.io.IOException; + +/** + * A database vulnerability assessment. + */ +@Fluent +public final class DatabaseVulnerabilityAssessmentAutoGeneratedInner extends ProxyResource { + /* + * Resource properties. + */ + private DatabaseVulnerabilityAssessmentPropertiesAutoGenerated innerProperties; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentAutoGeneratedInner class. + */ + public DatabaseVulnerabilityAssessmentAutoGeneratedInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private DatabaseVulnerabilityAssessmentPropertiesAutoGenerated innerProperties() { + return this.innerProperties; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @return the storageContainerPath value. + */ + public String storageContainerPath() { + return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + } + + /** + * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @param storageContainerPath the storageContainerPath value to set. + * @return the DatabaseVulnerabilityAssessmentAutoGeneratedInner object itself. + */ + public DatabaseVulnerabilityAssessmentAutoGeneratedInner withStorageContainerPath(String storageContainerPath) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + } + this.innerProperties().withStorageContainerPath(storageContainerPath); + return this; + } + + /** + * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageContainerSasKey value. + */ + public String storageContainerSasKey() { + return this.innerProperties() == null ? null : this.innerProperties().storageContainerSasKey(); + } + + /** + * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageContainerSasKey the storageContainerSasKey value to set. + * @return the DatabaseVulnerabilityAssessmentAutoGeneratedInner object itself. + */ + public DatabaseVulnerabilityAssessmentAutoGeneratedInner withStorageContainerSasKey(String storageContainerSasKey) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + } + this.innerProperties().withStorageContainerSasKey(storageContainerSasKey); + return this; + } + + /** + * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageAccountAccessKey value. + */ + public String storageAccountAccessKey() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + } + + /** + * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set. + * @return the DatabaseVulnerabilityAssessmentAutoGeneratedInner object itself. + */ + public DatabaseVulnerabilityAssessmentAutoGeneratedInner + withStorageAccountAccessKey(String storageAccountAccessKey) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + } + this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + return this; + } + + /** + * Get the recurringScans property: The recurring scans settings. + * + * @return the recurringScans value. + */ + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { + return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); + } + + /** + * Set the recurringScans property: The recurring scans settings. + * + * @param recurringScans the recurringScans value to set. + * @return the DatabaseVulnerabilityAssessmentAutoGeneratedInner object itself. + */ + public DatabaseVulnerabilityAssessmentAutoGeneratedInner + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + } + this.innerProperties().withRecurringScans(recurringScans); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentAutoGeneratedInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentAutoGeneratedInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentAutoGeneratedInner. + */ + public static DatabaseVulnerabilityAssessmentAutoGeneratedInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentAutoGeneratedInner deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner + = new DatabaseVulnerabilityAssessmentAutoGeneratedInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.innerProperties + = DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java index 3c7a3bf6ad0df..dccce8c79ff55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A database vulnerability assessment. */ +/** + * A database vulnerability assessment. + */ @Fluent public final class DatabaseVulnerabilityAssessmentInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseVulnerabilityAssessmentProperties innerProperties; - /** Creates an instance of DatabaseVulnerabilityAssessmentInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentInner class. + */ public DatabaseVulnerabilityAssessmentInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseVulnerabilityAssessmentProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy * doesn't set. - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -46,7 +97,7 @@ public String storageContainerPath() { * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy * doesn't set. - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the DatabaseVulnerabilityAssessmentInner object itself. */ @@ -62,7 +113,7 @@ public DatabaseVulnerabilityAssessmentInner withStorageContainerPath(String stor * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -73,7 +124,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the DatabaseVulnerabilityAssessmentInner object itself. */ @@ -89,7 +140,7 @@ public DatabaseVulnerabilityAssessmentInner withStorageContainerSasKey(String st * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -100,7 +151,7 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the DatabaseVulnerabilityAssessmentInner object itself. */ @@ -114,7 +165,7 @@ public DatabaseVulnerabilityAssessmentInner withStorageAccountAccessKey(String s /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -123,12 +174,12 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the DatabaseVulnerabilityAssessmentInner object itself. */ - public DatabaseVulnerabilityAssessmentInner withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public DatabaseVulnerabilityAssessmentInner + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { if (this.innerProperties() == null) { this.innerProperties = new DatabaseVulnerabilityAssessmentProperties(); } @@ -138,7 +189,7 @@ public DatabaseVulnerabilityAssessmentInner withRecurringScans( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -146,4 +197,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentInner. + */ + public static DatabaseVulnerabilityAssessmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentInner deserializedDatabaseVulnerabilityAssessmentInner + = new DatabaseVulnerabilityAssessmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentInner.innerProperties + = DatabaseVulnerabilityAssessmentProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java index ef5e1066cc4de..cbac528174ef2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java @@ -5,17 +5,23 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a database Vulnerability Assessment. */ +/** + * Properties of a database Vulnerability Assessment. + */ @Fluent -public final class DatabaseVulnerabilityAssessmentProperties { +public final class DatabaseVulnerabilityAssessmentProperties + implements JsonSerializable { /* * A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). * It is required if server level vulnerability assessment policy doesn't set */ - @JsonProperty(value = "storageContainerPath") private String storageContainerPath; /* @@ -23,7 +29,6 @@ public final class DatabaseVulnerabilityAssessmentProperties { * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is * required. Applies only if the storage account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageContainerSasKey") private String storageContainerSasKey; /* @@ -31,16 +36,16 @@ public final class DatabaseVulnerabilityAssessmentProperties { * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage * account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * The recurring scans settings */ - @JsonProperty(value = "recurringScans") private VulnerabilityAssessmentRecurringScansProperties recurringScans; - /** Creates an instance of DatabaseVulnerabilityAssessmentProperties class. */ + /** + * Creates an instance of DatabaseVulnerabilityAssessmentProperties class. + */ public DatabaseVulnerabilityAssessmentProperties() { } @@ -48,7 +53,7 @@ public DatabaseVulnerabilityAssessmentProperties() { * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy * doesn't set. - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -59,7 +64,7 @@ public String storageContainerPath() { * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy * doesn't set. - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the DatabaseVulnerabilityAssessmentProperties object itself. */ @@ -72,7 +77,7 @@ public DatabaseVulnerabilityAssessmentProperties withStorageContainerPath(String * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -83,7 +88,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the DatabaseVulnerabilityAssessmentProperties object itself. */ @@ -96,7 +101,7 @@ public DatabaseVulnerabilityAssessmentProperties withStorageContainerSasKey(Stri * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -107,7 +112,7 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the DatabaseVulnerabilityAssessmentProperties object itself. */ @@ -118,7 +123,7 @@ public DatabaseVulnerabilityAssessmentProperties withStorageAccountAccessKey(Str /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -127,19 +132,19 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the DatabaseVulnerabilityAssessmentProperties object itself. */ - public DatabaseVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public DatabaseVulnerabilityAssessmentProperties + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.recurringScans = recurringScans; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -147,4 +152,51 @@ public void validate() { recurringScans().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageContainerPath", this.storageContainerPath); + jsonWriter.writeStringField("storageContainerSasKey", this.storageContainerSasKey); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeJsonField("recurringScans", this.recurringScans); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentProperties. + */ + public static DatabaseVulnerabilityAssessmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentProperties deserializedDatabaseVulnerabilityAssessmentProperties + = new DatabaseVulnerabilityAssessmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageContainerPath".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentProperties.storageContainerPath = reader.getString(); + } else if ("storageContainerSasKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentProperties.storageContainerSasKey = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentProperties.storageAccountAccessKey = reader.getString(); + } else if ("recurringScans".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentProperties.recurringScans + = VulnerabilityAssessmentRecurringScansProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java new file mode 100644 index 0000000000000..97516e237bc58 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; +import java.io.IOException; + +/** + * Properties of a database Vulnerability Assessment. + */ +@Fluent +public final class DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + implements JsonSerializable { + /* + * A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). + * It is required if server level vulnerability assessment policy doesn't set + */ + private String storageContainerPath; + + /* + * A shared access signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. Applies only if the storage account is not behind a Vnet or a firewall + */ + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage + * account is not behind a Vnet or a firewall + */ + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + private VulnerabilityAssessmentRecurringScansProperties recurringScans; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated class. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated() { + } + + /** + * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @return the storageContainerPath value. + */ + public String storageContainerPath() { + return this.storageContainerPath; + } + + /** + * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @param storageContainerPath the storageContainerPath value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageContainerPath(String storageContainerPath) { + this.storageContainerPath = storageContainerPath; + return this; + } + + /** + * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageContainerSasKey value. + */ + public String storageContainerSasKey() { + return this.storageContainerSasKey; + } + + /** + * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageContainerSasKey the storageContainerSasKey value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageContainerSasKey(String storageContainerSasKey) { + this.storageContainerSasKey = storageContainerSasKey; + return this; + } + + /** + * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageAccountAccessKey value. + */ + public String storageAccountAccessKey() { + return this.storageAccountAccessKey; + } + + /** + * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageAccountAccessKey(String storageAccountAccessKey) { + this.storageAccountAccessKey = storageAccountAccessKey; + return this; + } + + /** + * Get the recurringScans property: The recurring scans settings. + * + * @return the recurringScans value. + */ + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { + return this.recurringScans; + } + + /** + * Set the recurringScans property: The recurring scans settings. + * + * @param recurringScans the recurringScans value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { + this.recurringScans = recurringScans; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (recurringScans() != null) { + recurringScans().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageContainerPath", this.storageContainerPath); + jsonWriter.writeStringField("storageContainerSasKey", this.storageContainerSasKey); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeJsonField("recurringScans", this.recurringScans); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated. + */ + public static DatabaseVulnerabilityAssessmentPropertiesAutoGenerated fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentPropertiesAutoGenerated deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated + = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageContainerPath".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageContainerPath + = reader.getString(); + } else if ("storageContainerSasKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageContainerSasKey + = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageAccountAccessKey + = reader.getString(); + } else if ("recurringScans".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.recurringScans + = VulnerabilityAssessmentRecurringScansProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java index 7e2183038109c..f1a9554201c0c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A database vulnerability assessment rule baseline. */ +/** + * A database vulnerability assessment rule baseline. + */ @Fluent public final class DatabaseVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseVulnerabilityAssessmentRuleBaselineProperties innerProperties; - /** Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineInner class. + */ public DatabaseVulnerabilityAssessmentRuleBaselineInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseVulnerabilityAssessmentRuleBaselineProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the baselineResults property: The rule baseline result. - * + * * @return the baselineResults value. */ public List baselineResults() { @@ -43,12 +94,12 @@ public List baselineResults() { /** * Set the baselineResults property: The rule baseline result. - * + * * @param baselineResults the baselineResults value to set. * @return the DatabaseVulnerabilityAssessmentRuleBaselineInner object itself. */ - public DatabaseVulnerabilityAssessmentRuleBaselineInner withBaselineResults( - List baselineResults) { + public DatabaseVulnerabilityAssessmentRuleBaselineInner + withBaselineResults(List baselineResults) { if (this.innerProperties() == null) { this.innerProperties = new DatabaseVulnerabilityAssessmentRuleBaselineProperties(); } @@ -58,7 +109,7 @@ public DatabaseVulnerabilityAssessmentRuleBaselineInner withBaselineResults( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -66,4 +117,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentRuleBaselineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentRuleBaselineInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentRuleBaselineInner. + */ + public static DatabaseVulnerabilityAssessmentRuleBaselineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentRuleBaselineInner deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner + = new DatabaseVulnerabilityAssessmentRuleBaselineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.innerProperties + = DatabaseVulnerabilityAssessmentRuleBaselineProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java index 6973f33da3ead..21479cb7e4608 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java @@ -6,26 +6,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a database Vulnerability Assessment rule baseline. */ +/** + * Properties of a database Vulnerability Assessment rule baseline. + */ @Fluent -public final class DatabaseVulnerabilityAssessmentRuleBaselineProperties { +public final class DatabaseVulnerabilityAssessmentRuleBaselineProperties + implements JsonSerializable { /* * The rule baseline result */ - @JsonProperty(value = "baselineResults", required = true) private List baselineResults; - /** Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineProperties class. */ + /** + * Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineProperties class. + */ public DatabaseVulnerabilityAssessmentRuleBaselineProperties() { } /** * Get the baselineResults property: The rule baseline result. - * + * * @return the baselineResults value. */ public List baselineResults() { @@ -34,33 +42,73 @@ public List baselineResults() { /** * Set the baselineResults property: The rule baseline result. - * + * * @param baselineResults the baselineResults value to set. * @return the DatabaseVulnerabilityAssessmentRuleBaselineProperties object itself. */ - public DatabaseVulnerabilityAssessmentRuleBaselineProperties withBaselineResults( - List baselineResults) { + public DatabaseVulnerabilityAssessmentRuleBaselineProperties + withBaselineResults(List baselineResults) { this.baselineResults = baselineResults; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (baselineResults() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property baselineResults in model" - + " DatabaseVulnerabilityAssessmentRuleBaselineProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property baselineResults in model DatabaseVulnerabilityAssessmentRuleBaselineProperties")); } else { baselineResults().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = - new ClientLogger(DatabaseVulnerabilityAssessmentRuleBaselineProperties.class); + private static final ClientLogger LOGGER + = new ClientLogger(DatabaseVulnerabilityAssessmentRuleBaselineProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("baselineResults", this.baselineResults, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentRuleBaselineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentRuleBaselineProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentRuleBaselineProperties. + */ + public static DatabaseVulnerabilityAssessmentRuleBaselineProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentRuleBaselineProperties deserializedDatabaseVulnerabilityAssessmentRuleBaselineProperties + = new DatabaseVulnerabilityAssessmentRuleBaselineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("baselineResults".equals(fieldName)) { + List baselineResults = reader + .readArray(reader1 -> DatabaseVulnerabilityAssessmentRuleBaselineItem.fromJson(reader1)); + deserializedDatabaseVulnerabilityAssessmentRuleBaselineProperties.baselineResults = baselineResults; + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentRuleBaselineProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java index 270ca3cdc965c..790442ca6d0d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java @@ -5,26 +5,34 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of the export operation's result. */ +/** + * Properties of the export operation's result. + */ @Immutable -public final class DatabaseVulnerabilityAssessmentScanExportProperties { +public final class DatabaseVulnerabilityAssessmentScanExportProperties + implements JsonSerializable { /* * Location of the exported report (e.g. * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). */ - @JsonProperty(value = "exportedReportLocation", access = JsonProperty.Access.WRITE_ONLY) private String exportedReportLocation; - /** Creates an instance of DatabaseVulnerabilityAssessmentScanExportProperties class. */ + /** + * Creates an instance of DatabaseVulnerabilityAssessmentScanExportProperties class. + */ public DatabaseVulnerabilityAssessmentScanExportProperties() { } /** * Get the exportedReportLocation property: Location of the exported report (e.g. * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - * + * * @return the exportedReportLocation value. */ public String exportedReportLocation() { @@ -33,9 +41,47 @@ public String exportedReportLocation() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentScanExportProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentScanExportProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentScanExportProperties. + */ + public static DatabaseVulnerabilityAssessmentScanExportProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentScanExportProperties deserializedDatabaseVulnerabilityAssessmentScanExportProperties + = new DatabaseVulnerabilityAssessmentScanExportProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exportedReportLocation".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentScanExportProperties.exportedReportLocation + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentScanExportProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java index 1d99303cb1974..c615ec5fc26fa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A database Vulnerability Assessment scan export resource. */ +/** + * A database Vulnerability Assessment scan export resource. + */ @Immutable public final class DatabaseVulnerabilityAssessmentScansExportInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseVulnerabilityAssessmentScanExportProperties innerProperties; - /** Creates an instance of DatabaseVulnerabilityAssessmentScansExportInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentScansExportInner class. + */ public DatabaseVulnerabilityAssessmentScansExportInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseVulnerabilityAssessmentScanExportProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the exportedReportLocation property: Location of the exported report (e.g. * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - * + * * @return the exportedReportLocation value. */ public String exportedReportLocation() { @@ -42,7 +93,7 @@ public String exportedReportLocation() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -50,4 +101,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentScansExportInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentScansExportInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentScansExportInner. + */ + public static DatabaseVulnerabilityAssessmentScansExportInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentScansExportInner deserializedDatabaseVulnerabilityAssessmentScansExportInner + = new DatabaseVulnerabilityAssessmentScansExportInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentScansExportInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentScansExportInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentScansExportInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentScansExportInner.innerProperties + = DatabaseVulnerabilityAssessmentScanExportProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentScansExportInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java index 31b6b833c3f95..f2ac7a0fb9b87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** A deleted server. */ +/** + * A deleted server. + */ @Immutable public final class DeletedServerInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DeletedServerProperties innerProperties; - /** Creates an instance of DeletedServerInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DeletedServerInner class. + */ public DeletedServerInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DeletedServerProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the version property: The version of the deleted server. - * + * * @return the version value. */ public String version() { @@ -42,7 +93,7 @@ public String version() { /** * Get the deletionTime property: The deletion time of the deleted server. - * + * * @return the deletionTime value. */ public OffsetDateTime deletionTime() { @@ -51,7 +102,7 @@ public OffsetDateTime deletionTime() { /** * Get the originalId property: The original ID of the server before deletion. - * + * * @return the originalId value. */ public String originalId() { @@ -60,7 +111,7 @@ public String originalId() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -69,7 +120,7 @@ public String fullyQualifiedDomainName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -77,4 +128,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeletedServerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeletedServerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DeletedServerInner. + */ + public static DeletedServerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeletedServerInner deserializedDeletedServerInner = new DeletedServerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDeletedServerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDeletedServerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDeletedServerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDeletedServerInner.innerProperties = DeletedServerProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDeletedServerInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java index db3c339d76102..ca202b5e57668 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java @@ -5,43 +5,48 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a deleted server. */ +/** + * The properties of a deleted server. + */ @Immutable -public final class DeletedServerProperties { +public final class DeletedServerProperties implements JsonSerializable { /* * The version of the deleted server. */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; /* * The deletion time of the deleted server. */ - @JsonProperty(value = "deletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime deletionTime; /* * The original ID of the server before deletion. */ - @JsonProperty(value = "originalId", access = JsonProperty.Access.WRITE_ONLY) private String originalId; /* * The fully qualified domain name of the server. */ - @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY) private String fullyQualifiedDomainName; - /** Creates an instance of DeletedServerProperties class. */ + /** + * Creates an instance of DeletedServerProperties class. + */ public DeletedServerProperties() { } /** * Get the version property: The version of the deleted server. - * + * * @return the version value. */ public String version() { @@ -50,7 +55,7 @@ public String version() { /** * Get the deletionTime property: The deletion time of the deleted server. - * + * * @return the deletionTime value. */ public OffsetDateTime deletionTime() { @@ -59,7 +64,7 @@ public OffsetDateTime deletionTime() { /** * Get the originalId property: The original ID of the server before deletion. - * + * * @return the originalId value. */ public String originalId() { @@ -68,7 +73,7 @@ public String originalId() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -77,9 +82,51 @@ public String fullyQualifiedDomainName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeletedServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeletedServerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeletedServerProperties. + */ + public static DeletedServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeletedServerProperties deserializedDeletedServerProperties = new DeletedServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedDeletedServerProperties.version = reader.getString(); + } else if ("deletionTime".equals(fieldName)) { + deserializedDeletedServerProperties.deletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("originalId".equals(fieldName)) { + deserializedDeletedServerProperties.originalId = reader.getString(); + } else if ("fullyQualifiedDomainName".equals(fieldName)) { + deserializedDeletedServerProperties.fullyQualifiedDomainName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeletedServerProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupInner.java index f15632bd93123..1779edd53dd44 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ReplicationMode; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** Distributed availability group between box and Sql Managed Instance. */ +/** + * Distributed availability group between box and Sql Managed Instance. + */ @Fluent public final class DistributedAvailabilityGroupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DistributedAvailabilityGroupProperties innerProperties; - /** Creates an instance of DistributedAvailabilityGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DistributedAvailabilityGroupInner class. + */ public DistributedAvailabilityGroupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DistributedAvailabilityGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the targetDatabase property: The name of the target database. - * + * * @return the targetDatabase value. */ public String targetDatabase() { @@ -43,7 +94,7 @@ public String targetDatabase() { /** * Set the targetDatabase property: The name of the target database. - * + * * @param targetDatabase the targetDatabase value to set. * @return the DistributedAvailabilityGroupInner object itself. */ @@ -57,7 +108,7 @@ public DistributedAvailabilityGroupInner withTargetDatabase(String targetDatabas /** * Get the sourceEndpoint property: The source endpoint. - * + * * @return the sourceEndpoint value. */ public String sourceEndpoint() { @@ -66,7 +117,7 @@ public String sourceEndpoint() { /** * Set the sourceEndpoint property: The source endpoint. - * + * * @param sourceEndpoint the sourceEndpoint value to set. * @return the DistributedAvailabilityGroupInner object itself. */ @@ -80,7 +131,7 @@ public DistributedAvailabilityGroupInner withSourceEndpoint(String sourceEndpoin /** * Get the primaryAvailabilityGroupName property: The primary availability group name. - * + * * @return the primaryAvailabilityGroupName value. */ public String primaryAvailabilityGroupName() { @@ -89,7 +140,7 @@ public String primaryAvailabilityGroupName() { /** * Set the primaryAvailabilityGroupName property: The primary availability group name. - * + * * @param primaryAvailabilityGroupName the primaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupInner object itself. */ @@ -103,7 +154,7 @@ public DistributedAvailabilityGroupInner withPrimaryAvailabilityGroupName(String /** * Get the secondaryAvailabilityGroupName property: The secondary availability group name. - * + * * @return the secondaryAvailabilityGroupName value. */ public String secondaryAvailabilityGroupName() { @@ -112,7 +163,7 @@ public String secondaryAvailabilityGroupName() { /** * Set the secondaryAvailabilityGroupName property: The secondary availability group name. - * + * * @param secondaryAvailabilityGroupName the secondaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupInner object itself. */ @@ -127,7 +178,7 @@ public DistributedAvailabilityGroupInner withSecondaryAvailabilityGroupName(Stri /** * Get the replicationMode property: The replication mode of a distributed availability group. Parameter will be * ignored during link creation. - * + * * @return the replicationMode value. */ public ReplicationMode replicationMode() { @@ -137,7 +188,7 @@ public ReplicationMode replicationMode() { /** * Set the replicationMode property: The replication mode of a distributed availability group. Parameter will be * ignored during link creation. - * + * * @param replicationMode the replicationMode value to set. * @return the DistributedAvailabilityGroupInner object itself. */ @@ -151,7 +202,7 @@ public DistributedAvailabilityGroupInner withReplicationMode(ReplicationMode rep /** * Get the distributedAvailabilityGroupId property: The distributed availability group id. - * + * * @return the distributedAvailabilityGroupId value. */ public UUID distributedAvailabilityGroupId() { @@ -160,7 +211,7 @@ public UUID distributedAvailabilityGroupId() { /** * Get the sourceReplicaId property: The source replica id. - * + * * @return the sourceReplicaId value. */ public UUID sourceReplicaId() { @@ -169,7 +220,7 @@ public UUID sourceReplicaId() { /** * Get the targetReplicaId property: The target replica id. - * + * * @return the targetReplicaId value. */ public UUID targetReplicaId() { @@ -178,7 +229,7 @@ public UUID targetReplicaId() { /** * Get the linkState property: The link state. - * + * * @return the linkState value. */ public String linkState() { @@ -187,7 +238,7 @@ public String linkState() { /** * Get the lastHardenedLsn property: The last hardened lsn. - * + * * @return the lastHardenedLsn value. */ public String lastHardenedLsn() { @@ -196,7 +247,7 @@ public String lastHardenedLsn() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -204,4 +255,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DistributedAvailabilityGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DistributedAvailabilityGroupInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DistributedAvailabilityGroupInner. + */ + public static DistributedAvailabilityGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DistributedAvailabilityGroupInner deserializedDistributedAvailabilityGroupInner + = new DistributedAvailabilityGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDistributedAvailabilityGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDistributedAvailabilityGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDistributedAvailabilityGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDistributedAvailabilityGroupInner.innerProperties + = DistributedAvailabilityGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDistributedAvailabilityGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java index 39d4b1c07f7ef..f0b6cb7204222 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java @@ -5,80 +5,79 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ReplicationMode; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** The properties of a distributed availability group. */ +/** + * The properties of a distributed availability group. + */ @Fluent -public final class DistributedAvailabilityGroupProperties { +public final class DistributedAvailabilityGroupProperties + implements JsonSerializable { /* * The name of the target database */ - @JsonProperty(value = "targetDatabase") private String targetDatabase; /* * The source endpoint */ - @JsonProperty(value = "sourceEndpoint") private String sourceEndpoint; /* * The primary availability group name */ - @JsonProperty(value = "primaryAvailabilityGroupName") private String primaryAvailabilityGroupName; /* * The secondary availability group name */ - @JsonProperty(value = "secondaryAvailabilityGroupName") private String secondaryAvailabilityGroupName; /* * The replication mode of a distributed availability group. Parameter will be ignored during link creation. */ - @JsonProperty(value = "replicationMode") private ReplicationMode replicationMode; /* * The distributed availability group id */ - @JsonProperty(value = "distributedAvailabilityGroupId", access = JsonProperty.Access.WRITE_ONLY) private UUID distributedAvailabilityGroupId; /* * The source replica id */ - @JsonProperty(value = "sourceReplicaId", access = JsonProperty.Access.WRITE_ONLY) private UUID sourceReplicaId; /* * The target replica id */ - @JsonProperty(value = "targetReplicaId", access = JsonProperty.Access.WRITE_ONLY) private UUID targetReplicaId; /* * The link state */ - @JsonProperty(value = "linkState", access = JsonProperty.Access.WRITE_ONLY) private String linkState; /* * The last hardened lsn */ - @JsonProperty(value = "lastHardenedLsn", access = JsonProperty.Access.WRITE_ONLY) private String lastHardenedLsn; - /** Creates an instance of DistributedAvailabilityGroupProperties class. */ + /** + * Creates an instance of DistributedAvailabilityGroupProperties class. + */ public DistributedAvailabilityGroupProperties() { } /** * Get the targetDatabase property: The name of the target database. - * + * * @return the targetDatabase value. */ public String targetDatabase() { @@ -87,7 +86,7 @@ public String targetDatabase() { /** * Set the targetDatabase property: The name of the target database. - * + * * @param targetDatabase the targetDatabase value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ @@ -98,7 +97,7 @@ public DistributedAvailabilityGroupProperties withTargetDatabase(String targetDa /** * Get the sourceEndpoint property: The source endpoint. - * + * * @return the sourceEndpoint value. */ public String sourceEndpoint() { @@ -107,7 +106,7 @@ public String sourceEndpoint() { /** * Set the sourceEndpoint property: The source endpoint. - * + * * @param sourceEndpoint the sourceEndpoint value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ @@ -118,7 +117,7 @@ public DistributedAvailabilityGroupProperties withSourceEndpoint(String sourceEn /** * Get the primaryAvailabilityGroupName property: The primary availability group name. - * + * * @return the primaryAvailabilityGroupName value. */ public String primaryAvailabilityGroupName() { @@ -127,19 +126,19 @@ public String primaryAvailabilityGroupName() { /** * Set the primaryAvailabilityGroupName property: The primary availability group name. - * + * * @param primaryAvailabilityGroupName the primaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties withPrimaryAvailabilityGroupName( - String primaryAvailabilityGroupName) { + public DistributedAvailabilityGroupProperties + withPrimaryAvailabilityGroupName(String primaryAvailabilityGroupName) { this.primaryAvailabilityGroupName = primaryAvailabilityGroupName; return this; } /** * Get the secondaryAvailabilityGroupName property: The secondary availability group name. - * + * * @return the secondaryAvailabilityGroupName value. */ public String secondaryAvailabilityGroupName() { @@ -148,12 +147,12 @@ public String secondaryAvailabilityGroupName() { /** * Set the secondaryAvailabilityGroupName property: The secondary availability group name. - * + * * @param secondaryAvailabilityGroupName the secondaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties withSecondaryAvailabilityGroupName( - String secondaryAvailabilityGroupName) { + public DistributedAvailabilityGroupProperties + withSecondaryAvailabilityGroupName(String secondaryAvailabilityGroupName) { this.secondaryAvailabilityGroupName = secondaryAvailabilityGroupName; return this; } @@ -161,7 +160,7 @@ public DistributedAvailabilityGroupProperties withSecondaryAvailabilityGroupName /** * Get the replicationMode property: The replication mode of a distributed availability group. Parameter will be * ignored during link creation. - * + * * @return the replicationMode value. */ public ReplicationMode replicationMode() { @@ -171,7 +170,7 @@ public ReplicationMode replicationMode() { /** * Set the replicationMode property: The replication mode of a distributed availability group. Parameter will be * ignored during link creation. - * + * * @param replicationMode the replicationMode value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ @@ -182,7 +181,7 @@ public DistributedAvailabilityGroupProperties withReplicationMode(ReplicationMod /** * Get the distributedAvailabilityGroupId property: The distributed availability group id. - * + * * @return the distributedAvailabilityGroupId value. */ public UUID distributedAvailabilityGroupId() { @@ -191,7 +190,7 @@ public UUID distributedAvailabilityGroupId() { /** * Get the sourceReplicaId property: The source replica id. - * + * * @return the sourceReplicaId value. */ public UUID sourceReplicaId() { @@ -200,7 +199,7 @@ public UUID sourceReplicaId() { /** * Get the targetReplicaId property: The target replica id. - * + * * @return the targetReplicaId value. */ public UUID targetReplicaId() { @@ -209,7 +208,7 @@ public UUID targetReplicaId() { /** * Get the linkState property: The link state. - * + * * @return the linkState value. */ public String linkState() { @@ -218,7 +217,7 @@ public String linkState() { /** * Get the lastHardenedLsn property: The last hardened lsn. - * + * * @return the lastHardenedLsn value. */ public String lastHardenedLsn() { @@ -227,9 +226,75 @@ public String lastHardenedLsn() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetDatabase", this.targetDatabase); + jsonWriter.writeStringField("sourceEndpoint", this.sourceEndpoint); + jsonWriter.writeStringField("primaryAvailabilityGroupName", this.primaryAvailabilityGroupName); + jsonWriter.writeStringField("secondaryAvailabilityGroupName", this.secondaryAvailabilityGroupName); + jsonWriter.writeStringField("replicationMode", + this.replicationMode == null ? null : this.replicationMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DistributedAvailabilityGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DistributedAvailabilityGroupProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DistributedAvailabilityGroupProperties. + */ + public static DistributedAvailabilityGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DistributedAvailabilityGroupProperties deserializedDistributedAvailabilityGroupProperties + = new DistributedAvailabilityGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetDatabase".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.targetDatabase = reader.getString(); + } else if ("sourceEndpoint".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.sourceEndpoint = reader.getString(); + } else if ("primaryAvailabilityGroupName".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.primaryAvailabilityGroupName + = reader.getString(); + } else if ("secondaryAvailabilityGroupName".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.secondaryAvailabilityGroupName + = reader.getString(); + } else if ("replicationMode".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.replicationMode + = ReplicationMode.fromString(reader.getString()); + } else if ("distributedAvailabilityGroupId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.distributedAvailabilityGroupId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("sourceReplicaId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.sourceReplicaId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("targetReplicaId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.targetReplicaId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("linkState".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.linkState = reader.getString(); + } else if ("lastHardenedLsn".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.lastHardenedLsn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDistributedAvailabilityGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java index 5db81ac4d8e4e..2e7dc2db96ba0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java @@ -5,25 +5,32 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DnsRefreshConfigurationPropertiesStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** DNS refresh configuration properties. */ +/** + * DNS refresh configuration properties. + */ @Immutable -public final class DnsRefreshConfigurationProperties { +public final class DnsRefreshConfigurationProperties implements JsonSerializable { /* * The status of the DNS refresh operation. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DnsRefreshConfigurationPropertiesStatus status; - /** Creates an instance of DnsRefreshConfigurationProperties class. */ + /** + * Creates an instance of DnsRefreshConfigurationProperties class. + */ public DnsRefreshConfigurationProperties() { } /** * Get the status property: The status of the DNS refresh operation. - * + * * @return the status value. */ public DnsRefreshConfigurationPropertiesStatus status() { @@ -32,9 +39,46 @@ public DnsRefreshConfigurationPropertiesStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DnsRefreshConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DnsRefreshConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DnsRefreshConfigurationProperties. + */ + public static DnsRefreshConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DnsRefreshConfigurationProperties deserializedDnsRefreshConfigurationProperties + = new DnsRefreshConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedDnsRefreshConfigurationProperties.status + = DnsRefreshConfigurationPropertiesStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDnsRefreshConfigurationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java index c2ec3ca773da2..9b08ca391ecb2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java @@ -6,57 +6,77 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; import com.azure.resourcemanager.sql.models.ElasticPoolState; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -/** An elastic pool. */ +/** + * An elastic pool. + */ @Fluent public final class ElasticPoolInner extends Resource { /* * The elastic pool SKU. - * + * * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or the following command: - * + * * ```azurecli * az sql elastic-pool list-editions -l -o table * ```` - * */ - @JsonProperty(value = "sku") private Sku sku; /* * Kind of elastic pool. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private ElasticPoolProperties innerProperties; - /** Creates an instance of ElasticPoolInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticPoolInner class. + */ public ElasticPoolInner() { } /** * Get the sku property: The elastic pool SKU. - * - *

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or the following command: - * - *

```azurecli az sql elastic-pool list-editions -l <location> -o table ````. - * + * + * ```azurecli + * az sql elastic-pool list-editions -l <location> -o table + * ````. + * * @return the sku value. */ public Sku sku() { @@ -65,13 +85,15 @@ public Sku sku() { /** * Set the sku property: The elastic pool SKU. - * - *

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, * tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the * `Capabilities_ListByLocation` REST API or the following command: - * - *

```azurecli az sql elastic-pool list-editions -l <location> -o table ````. - * + * + * ```azurecli + * az sql elastic-pool list-editions -l <location> -o table + * ````. + * * @param sku the sku value to set. * @return the ElasticPoolInner object itself. */ @@ -82,7 +104,7 @@ public ElasticPoolInner withSku(Sku sku) { /** * Get the kind property: Kind of elastic pool. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -91,21 +113,55 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ElasticPoolProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public ElasticPoolInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ElasticPoolInner withTags(Map tags) { super.withTags(tags); @@ -114,7 +170,7 @@ public ElasticPoolInner withTags(Map tags) { /** * Get the state property: The state of the elastic pool. - * + * * @return the state value. */ public ElasticPoolState state() { @@ -123,7 +179,7 @@ public ElasticPoolState state() { /** * Get the creationDate property: The creation date of the elastic pool (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -132,7 +188,7 @@ public OffsetDateTime creationDate() { /** * Get the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -141,7 +197,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the ElasticPoolInner object itself. */ @@ -155,7 +211,7 @@ public ElasticPoolInner withMaxSizeBytes(Long maxSizeBytes) { /** * Get the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -164,7 +220,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the ElasticPoolInner object itself. */ @@ -178,7 +234,7 @@ public ElasticPoolInner withMinCapacity(Double minCapacity) { /** * Get the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @return the perDatabaseSettings value. */ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { @@ -187,7 +243,7 @@ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { /** * Set the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @param perDatabaseSettings the perDatabaseSettings value to set. * @return the ElasticPoolInner object itself. */ @@ -202,7 +258,7 @@ public ElasticPoolInner withPerDatabaseSettings(ElasticPoolPerDatabaseSettings p /** * Get the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -212,7 +268,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ElasticPoolInner object itself. */ @@ -226,7 +282,7 @@ public ElasticPoolInner withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this elastic pool. - * + * * @return the licenseType value. */ public ElasticPoolLicenseType licenseType() { @@ -235,7 +291,7 @@ public ElasticPoolLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this elastic pool. - * + * * @param licenseType the licenseType value to set. * @return the ElasticPoolInner object itself. */ @@ -250,7 +306,7 @@ public ElasticPoolInner withLicenseType(ElasticPoolLicenseType licenseType) { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -260,7 +316,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ElasticPoolInner object itself. */ @@ -275,7 +331,7 @@ public ElasticPoolInner withMaintenanceConfigurationId(String maintenanceConfigu /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -285,7 +341,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolInner object itself. */ @@ -299,7 +355,7 @@ public ElasticPoolInner withHighAvailabilityReplicaCount(Integer highAvailabilit /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -310,4 +366,59 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticPoolInner. + */ + public static ElasticPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolInner deserializedElasticPoolInner = new ElasticPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticPoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticPoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticPoolInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedElasticPoolInner.sku = Sku.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedElasticPoolInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticPoolInner.innerProperties = ElasticPoolProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java index ca2a1c3933410..4790901e2ae95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** A elastic pool operation. */ +/** + * A elastic pool operation. + */ @Immutable public final class ElasticPoolOperationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ElasticPoolOperationProperties innerProperties; - /** Creates an instance of ElasticPoolOperationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticPoolOperationInner class. + */ public ElasticPoolOperationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ElasticPoolOperationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the elasticPoolName property: The name of the elastic pool the operation is being performed on. - * + * * @return the elasticPoolName value. */ public String elasticPoolName() { @@ -42,7 +93,7 @@ public String elasticPoolName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -51,7 +102,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -60,7 +111,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -69,7 +120,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -78,7 +129,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -87,7 +138,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public String state() { @@ -96,7 +147,7 @@ public String state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -105,7 +156,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -114,7 +165,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -123,7 +174,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -132,7 +183,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -141,7 +192,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -150,7 +201,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -159,7 +210,7 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -167,4 +218,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolOperationInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticPoolOperationInner. + */ + public static ElasticPoolOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolOperationInner deserializedElasticPoolOperationInner = new ElasticPoolOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticPoolOperationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticPoolOperationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticPoolOperationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticPoolOperationInner.innerProperties + = ElasticPoolOperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java index 32bcbd42fce1d..7207ed68d562e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java @@ -5,103 +5,98 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a elastic pool operation. */ +/** + * The properties of a elastic pool operation. + */ @Immutable -public final class ElasticPoolOperationProperties { +public final class ElasticPoolOperationProperties implements JsonSerializable { /* * The name of the elastic pool the operation is being performed on. */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) private String elasticPoolName; /* * The name of operation. */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The friendly name of operation. */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) private String operationFriendlyName; /* * The percentage of the operation completed. */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) private Integer percentComplete; /* * The name of the server. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * The operation start time. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The operation state. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; /* * The operation error code. */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private Integer errorCode; /* * The operation error description. */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) private String errorDescription; /* * The operation error severity. */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) private Integer errorSeverity; /* * Whether or not the error is a user error. */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) private Boolean isUserError; /* * The estimated completion time of the operation. */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime estimatedCompletionTime; /* * The operation description. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Whether the operation can be cancelled. */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) private Boolean isCancellable; - /** Creates an instance of ElasticPoolOperationProperties class. */ + /** + * Creates an instance of ElasticPoolOperationProperties class. + */ public ElasticPoolOperationProperties() { } /** * Get the elasticPoolName property: The name of the elastic pool the operation is being performed on. - * + * * @return the elasticPoolName value. */ public String elasticPoolName() { @@ -110,7 +105,7 @@ public String elasticPoolName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -119,7 +114,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -128,7 +123,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -137,7 +132,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -146,7 +141,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -155,7 +150,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public String state() { @@ -164,7 +159,7 @@ public String state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -173,7 +168,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -182,7 +177,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -191,7 +186,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -200,7 +195,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -209,7 +204,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -218,7 +213,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -227,9 +222,74 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolOperationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolOperationProperties. + */ + public static ElasticPoolOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolOperationProperties deserializedElasticPoolOperationProperties + = new ElasticPoolOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticPoolName".equals(fieldName)) { + deserializedElasticPoolOperationProperties.elasticPoolName = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedElasticPoolOperationProperties.operation = reader.getString(); + } else if ("operationFriendlyName".equals(fieldName)) { + deserializedElasticPoolOperationProperties.operationFriendlyName = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedElasticPoolOperationProperties.percentComplete = reader.getNullable(JsonReader::getInt); + } else if ("serverName".equals(fieldName)) { + deserializedElasticPoolOperationProperties.serverName = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedElasticPoolOperationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedElasticPoolOperationProperties.state = reader.getString(); + } else if ("errorCode".equals(fieldName)) { + deserializedElasticPoolOperationProperties.errorCode = reader.getNullable(JsonReader::getInt); + } else if ("errorDescription".equals(fieldName)) { + deserializedElasticPoolOperationProperties.errorDescription = reader.getString(); + } else if ("errorSeverity".equals(fieldName)) { + deserializedElasticPoolOperationProperties.errorSeverity = reader.getNullable(JsonReader::getInt); + } else if ("isUserError".equals(fieldName)) { + deserializedElasticPoolOperationProperties.isUserError = reader.getNullable(JsonReader::getBoolean); + } else if ("estimatedCompletionTime".equals(fieldName)) { + deserializedElasticPoolOperationProperties.estimatedCompletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("description".equals(fieldName)) { + deserializedElasticPoolOperationProperties.description = reader.getString(); + } else if ("isCancellable".equals(fieldName)) { + deserializedElasticPoolOperationProperties.isCancellable + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolProperties.java index 981e4d23e250c..54040d68c0628 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolProperties.java @@ -5,79 +5,79 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; import com.azure.resourcemanager.sql.models.ElasticPoolState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of an elastic pool. */ +/** + * Properties of an elastic pool. + */ @Fluent -public final class ElasticPoolProperties { +public final class ElasticPoolProperties implements JsonSerializable { /* * The state of the elastic pool. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private ElasticPoolState state; /* * The creation date of the elastic pool (ISO8601 format). */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * The storage limit for the database elastic pool in bytes. */ - @JsonProperty(value = "maxSizeBytes") private Long maxSizeBytes; /* * Minimal capacity that serverless pool will not shrink below, if not paused */ - @JsonProperty(value = "minCapacity") private Double minCapacity; /* * The per database settings for the elastic pool. */ - @JsonProperty(value = "perDatabaseSettings") private ElasticPoolPerDatabaseSettings perDatabaseSettings; /* * Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread * across multiple availability zones. */ - @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; /* * The license type to apply for this elastic pool. */ - @JsonProperty(value = "licenseType") private ElasticPoolLicenseType licenseType; /* * Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the * maintenance updates will will occur. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; /* * The number of secondary replicas associated with the elastic pool that are used to provide high availability. * Applicable only to Hyperscale elastic pools. */ - @JsonProperty(value = "highAvailabilityReplicaCount") private Integer highAvailabilityReplicaCount; - /** Creates an instance of ElasticPoolProperties class. */ + /** + * Creates an instance of ElasticPoolProperties class. + */ public ElasticPoolProperties() { } /** * Get the state property: The state of the elastic pool. - * + * * @return the state value. */ public ElasticPoolState state() { @@ -86,7 +86,7 @@ public ElasticPoolState state() { /** * Get the creationDate property: The creation date of the elastic pool (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -95,7 +95,7 @@ public OffsetDateTime creationDate() { /** * Get the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -104,7 +104,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the ElasticPoolProperties object itself. */ @@ -115,7 +115,7 @@ public ElasticPoolProperties withMaxSizeBytes(Long maxSizeBytes) { /** * Get the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -124,7 +124,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the ElasticPoolProperties object itself. */ @@ -135,7 +135,7 @@ public ElasticPoolProperties withMinCapacity(Double minCapacity) { /** * Get the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @return the perDatabaseSettings value. */ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { @@ -144,7 +144,7 @@ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { /** * Set the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @param perDatabaseSettings the perDatabaseSettings value to set. * @return the ElasticPoolProperties object itself. */ @@ -156,7 +156,7 @@ public ElasticPoolProperties withPerDatabaseSettings(ElasticPoolPerDatabaseSetti /** * Get the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -166,7 +166,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ElasticPoolProperties object itself. */ @@ -177,7 +177,7 @@ public ElasticPoolProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this elastic pool. - * + * * @return the licenseType value. */ public ElasticPoolLicenseType licenseType() { @@ -186,7 +186,7 @@ public ElasticPoolLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this elastic pool. - * + * * @param licenseType the licenseType value to set. * @return the ElasticPoolProperties object itself. */ @@ -198,7 +198,7 @@ public ElasticPoolProperties withLicenseType(ElasticPoolLicenseType licenseType) /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -208,7 +208,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ElasticPoolProperties object itself. */ @@ -220,7 +220,7 @@ public ElasticPoolProperties withMaintenanceConfigurationId(String maintenanceCo /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -230,7 +230,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolProperties object itself. */ @@ -241,7 +241,7 @@ public ElasticPoolProperties withHighAvailabilityReplicaCount(Integer highAvaila /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -249,4 +249,66 @@ public void validate() { perDatabaseSettings().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeNumberField("minCapacity", this.minCapacity); + jsonWriter.writeJsonField("perDatabaseSettings", this.perDatabaseSettings); + jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + jsonWriter.writeNumberField("highAvailabilityReplicaCount", this.highAvailabilityReplicaCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolProperties. + */ + public static ElasticPoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolProperties deserializedElasticPoolProperties = new ElasticPoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedElasticPoolProperties.state = ElasticPoolState.fromString(reader.getString()); + } else if ("creationDate".equals(fieldName)) { + deserializedElasticPoolProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedElasticPoolProperties.maxSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("minCapacity".equals(fieldName)) { + deserializedElasticPoolProperties.minCapacity = reader.getNullable(JsonReader::getDouble); + } else if ("perDatabaseSettings".equals(fieldName)) { + deserializedElasticPoolProperties.perDatabaseSettings + = ElasticPoolPerDatabaseSettings.fromJson(reader); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedElasticPoolProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("licenseType".equals(fieldName)) { + deserializedElasticPoolProperties.licenseType + = ElasticPoolLicenseType.fromString(reader.getString()); + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedElasticPoolProperties.maintenanceConfigurationId = reader.getString(); + } else if ("highAvailabilityReplicaCount".equals(fieldName)) { + deserializedElasticPoolProperties.highAvailabilityReplicaCount + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolUpdateProperties.java index 265fd8904c795..66f7efbe67141 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolUpdateProperties.java @@ -5,65 +5,66 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of an elastic pool. */ +/** + * Properties of an elastic pool. + */ @Fluent -public final class ElasticPoolUpdateProperties { +public final class ElasticPoolUpdateProperties implements JsonSerializable { /* * The storage limit for the database elastic pool in bytes. */ - @JsonProperty(value = "maxSizeBytes") private Long maxSizeBytes; /* * Minimal capacity that serverless pool will not shrink below, if not paused */ - @JsonProperty(value = "minCapacity") private Double minCapacity; /* * The per database settings for the elastic pool. */ - @JsonProperty(value = "perDatabaseSettings") private ElasticPoolPerDatabaseSettings perDatabaseSettings; /* * Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread * across multiple availability zones. */ - @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; /* * The license type to apply for this elastic pool. */ - @JsonProperty(value = "licenseType") private ElasticPoolLicenseType licenseType; /* * Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the * maintenance updates will will occur. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; /* * The number of secondary replicas associated with the elastic pool that are used to provide high availability. * Applicable only to Hyperscale elastic pools. */ - @JsonProperty(value = "highAvailabilityReplicaCount") private Integer highAvailabilityReplicaCount; - /** Creates an instance of ElasticPoolUpdateProperties class. */ + /** + * Creates an instance of ElasticPoolUpdateProperties class. + */ public ElasticPoolUpdateProperties() { } /** * Get the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -72,7 +73,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -83,7 +84,7 @@ public ElasticPoolUpdateProperties withMaxSizeBytes(Long maxSizeBytes) { /** * Get the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -92,7 +93,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -103,7 +104,7 @@ public ElasticPoolUpdateProperties withMinCapacity(Double minCapacity) { /** * Get the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @return the perDatabaseSettings value. */ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { @@ -112,7 +113,7 @@ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { /** * Set the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @param perDatabaseSettings the perDatabaseSettings value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -124,7 +125,7 @@ public ElasticPoolUpdateProperties withPerDatabaseSettings(ElasticPoolPerDatabas /** * Get the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -134,7 +135,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -145,7 +146,7 @@ public ElasticPoolUpdateProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this elastic pool. - * + * * @return the licenseType value. */ public ElasticPoolLicenseType licenseType() { @@ -154,7 +155,7 @@ public ElasticPoolLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this elastic pool. - * + * * @param licenseType the licenseType value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -166,7 +167,7 @@ public ElasticPoolUpdateProperties withLicenseType(ElasticPoolLicenseType licens /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -176,7 +177,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -188,7 +189,7 @@ public ElasticPoolUpdateProperties withMaintenanceConfigurationId(String mainten /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -198,7 +199,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolUpdateProperties object itself. */ @@ -209,7 +210,7 @@ public ElasticPoolUpdateProperties withHighAvailabilityReplicaCount(Integer high /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -217,4 +218,61 @@ public void validate() { perDatabaseSettings().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeNumberField("minCapacity", this.minCapacity); + jsonWriter.writeJsonField("perDatabaseSettings", this.perDatabaseSettings); + jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + jsonWriter.writeNumberField("highAvailabilityReplicaCount", this.highAvailabilityReplicaCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolUpdateProperties. + */ + public static ElasticPoolUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolUpdateProperties deserializedElasticPoolUpdateProperties = new ElasticPoolUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxSizeBytes".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.maxSizeBytes = reader.getNullable(JsonReader::getLong); + } else if ("minCapacity".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.minCapacity = reader.getNullable(JsonReader::getDouble); + } else if ("perDatabaseSettings".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.perDatabaseSettings + = ElasticPoolPerDatabaseSettings.fromJson(reader); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("licenseType".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.licenseType + = ElasticPoolLicenseType.fromString(reader.getString()); + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.maintenanceConfigurationId = reader.getString(); + } else if ("highAvailabilityReplicaCount".equals(fieldName)) { + deserializedElasticPoolUpdateProperties.highAvailabilityReplicaCount + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorInner.java index be9d85df16a64..b99774cc4496f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorInner.java @@ -6,37 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The server encryption protector. */ +/** + * The server encryption protector. + */ @Fluent public final class EncryptionProtectorInner extends ProxyResource { /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource properties. */ - @JsonProperty(value = "properties") private EncryptionProtectorProperties innerProperties; - /** Creates an instance of EncryptionProtectorInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of EncryptionProtectorInner class. + */ public EncryptionProtectorInner() { } /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -45,7 +64,7 @@ public String kind() { /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -54,16 +73,46 @@ public String location() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private EncryptionProtectorProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the subregion property: Subregion of the encryption protector. - * + * * @return the subregion value. */ public String subregion() { @@ -72,7 +121,7 @@ public String subregion() { /** * Get the serverKeyName property: The name of the server key. - * + * * @return the serverKeyName value. */ public String serverKeyName() { @@ -81,7 +130,7 @@ public String serverKeyName() { /** * Set the serverKeyName property: The name of the server key. - * + * * @param serverKeyName the serverKeyName value to set. * @return the EncryptionProtectorInner object itself. */ @@ -95,7 +144,7 @@ public EncryptionProtectorInner withServerKeyName(String serverKeyName) { /** * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -104,7 +153,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the EncryptionProtectorInner object itself. */ @@ -118,7 +167,7 @@ public EncryptionProtectorInner withServerKeyType(ServerKeyType serverKeyType) { /** * Get the uri property: The URI of the server key. - * + * * @return the uri value. */ public String uri() { @@ -127,7 +176,7 @@ public String uri() { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -136,7 +185,7 @@ public String thumbprint() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -145,7 +194,7 @@ public Boolean autoRotationEnabled() { /** * Set the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @param autoRotationEnabled the autoRotationEnabled value to set. * @return the EncryptionProtectorInner object itself. */ @@ -159,7 +208,7 @@ public EncryptionProtectorInner withAutoRotationEnabled(Boolean autoRotationEnab /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -167,4 +216,52 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionProtectorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionProtectorInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EncryptionProtectorInner. + */ + public static EncryptionProtectorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionProtectorInner deserializedEncryptionProtectorInner = new EncryptionProtectorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEncryptionProtectorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEncryptionProtectorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEncryptionProtectorInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedEncryptionProtectorInner.kind = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedEncryptionProtectorInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEncryptionProtectorInner.innerProperties + = EncryptionProtectorProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionProtectorInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorProperties.java index b0483cb67ce92..c9672bbf6d008 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorProperties.java @@ -6,55 +6,57 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties for an encryption protector execution. */ +/** + * Properties for an encryption protector execution. + */ @Fluent -public final class EncryptionProtectorProperties { +public final class EncryptionProtectorProperties implements JsonSerializable { /* * Subregion of the encryption protector. */ - @JsonProperty(value = "subregion", access = JsonProperty.Access.WRITE_ONLY) private String subregion; /* * The name of the server key. */ - @JsonProperty(value = "serverKeyName") private String serverKeyName; /* * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ - @JsonProperty(value = "serverKeyType", required = true) private ServerKeyType serverKeyType; /* * The URI of the server key. */ - @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) private String uri; /* * Thumbprint of the server key. */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) private String thumbprint; /* * Key auto rotation opt-in flag. Either true or false. */ - @JsonProperty(value = "autoRotationEnabled") private Boolean autoRotationEnabled; - /** Creates an instance of EncryptionProtectorProperties class. */ + /** + * Creates an instance of EncryptionProtectorProperties class. + */ public EncryptionProtectorProperties() { } /** * Get the subregion property: Subregion of the encryption protector. - * + * * @return the subregion value. */ public String subregion() { @@ -63,7 +65,7 @@ public String subregion() { /** * Get the serverKeyName property: The name of the server key. - * + * * @return the serverKeyName value. */ public String serverKeyName() { @@ -72,7 +74,7 @@ public String serverKeyName() { /** * Set the serverKeyName property: The name of the server key. - * + * * @param serverKeyName the serverKeyName value to set. * @return the EncryptionProtectorProperties object itself. */ @@ -83,7 +85,7 @@ public EncryptionProtectorProperties withServerKeyName(String serverKeyName) { /** * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -92,7 +94,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the EncryptionProtectorProperties object itself. */ @@ -103,7 +105,7 @@ public EncryptionProtectorProperties withServerKeyType(ServerKeyType serverKeyTy /** * Get the uri property: The URI of the server key. - * + * * @return the uri value. */ public String uri() { @@ -112,7 +114,7 @@ public String uri() { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -121,7 +123,7 @@ public String thumbprint() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -130,7 +132,7 @@ public Boolean autoRotationEnabled() { /** * Set the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @param autoRotationEnabled the autoRotationEnabled value to set. * @return the EncryptionProtectorProperties object itself. */ @@ -141,17 +143,68 @@ public EncryptionProtectorProperties withAutoRotationEnabled(Boolean autoRotatio /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model EncryptionProtectorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serverKeyType in model EncryptionProtectorProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(EncryptionProtectorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverKeyType", this.serverKeyType == null ? null : this.serverKeyType.toString()); + jsonWriter.writeStringField("serverKeyName", this.serverKeyName); + jsonWriter.writeBooleanField("autoRotationEnabled", this.autoRotationEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionProtectorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionProtectorProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EncryptionProtectorProperties. + */ + public static EncryptionProtectorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionProtectorProperties deserializedEncryptionProtectorProperties + = new EncryptionProtectorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverKeyType".equals(fieldName)) { + deserializedEncryptionProtectorProperties.serverKeyType + = ServerKeyType.fromString(reader.getString()); + } else if ("subregion".equals(fieldName)) { + deserializedEncryptionProtectorProperties.subregion = reader.getString(); + } else if ("serverKeyName".equals(fieldName)) { + deserializedEncryptionProtectorProperties.serverKeyName = reader.getString(); + } else if ("uri".equals(fieldName)) { + deserializedEncryptionProtectorProperties.uri = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedEncryptionProtectorProperties.thumbprint = reader.getString(); + } else if ("autoRotationEnabled".equals(fieldName)) { + deserializedEncryptionProtectorProperties.autoRotationEnabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionProtectorProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateInner.java index d1d0c60356be3..c7762a585360d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Certificate used on an endpoint on the Managed Instance. */ +/** + * Certificate used on an endpoint on the Managed Instance. + */ @Fluent public final class EndpointCertificateInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private EndpointCertificateProperties innerProperties; - /** Creates an instance of EndpointCertificateInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of EndpointCertificateInner class. + */ public EndpointCertificateInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private EndpointCertificateProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the publicBlob property: The certificate public blob. - * + * * @return the publicBlob value. */ public String publicBlob() { @@ -41,7 +92,7 @@ public String publicBlob() { /** * Set the publicBlob property: The certificate public blob. - * + * * @param publicBlob the publicBlob value to set. * @return the EndpointCertificateInner object itself. */ @@ -55,7 +106,7 @@ public EndpointCertificateInner withPublicBlob(String publicBlob) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -63,4 +114,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointCertificateInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointCertificateInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EndpointCertificateInner. + */ + public static EndpointCertificateInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointCertificateInner deserializedEndpointCertificateInner = new EndpointCertificateInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointCertificateInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointCertificateInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointCertificateInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointCertificateInner.innerProperties + = EndpointCertificateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointCertificateInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateProperties.java index 826c98090fce6..9f304a7fdfbb4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateProperties.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of an endpoint certificate. */ +/** + * The properties of an endpoint certificate. + */ @Fluent -public final class EndpointCertificateProperties { +public final class EndpointCertificateProperties implements JsonSerializable { /* * The certificate public blob */ - @JsonProperty(value = "publicBlob") private String publicBlob; - /** Creates an instance of EndpointCertificateProperties class. */ + /** + * Creates an instance of EndpointCertificateProperties class. + */ public EndpointCertificateProperties() { } /** * Get the publicBlob property: The certificate public blob. - * + * * @return the publicBlob value. */ public String publicBlob() { @@ -31,7 +38,7 @@ public String publicBlob() { /** * Set the publicBlob property: The certificate public blob. - * + * * @param publicBlob the publicBlob value to set. * @return the EndpointCertificateProperties object itself. */ @@ -42,9 +49,46 @@ public EndpointCertificateProperties withPublicBlob(String publicBlob) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicBlob", this.publicBlob); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointCertificateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointCertificateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointCertificateProperties. + */ + public static EndpointCertificateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointCertificateProperties deserializedEndpointCertificateProperties + = new EndpointCertificateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicBlob".equals(fieldName)) { + deserializedEndpointCertificateProperties.publicBlob = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointCertificateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyInner.java index f2fac16f9ab93..71940a8f34386 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** An extended database blob auditing policy. */ +/** + * An extended database blob auditing policy. + */ @Fluent public final class ExtendedDatabaseBlobAuditingPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ExtendedDatabaseBlobAuditingPolicyProperties innerProperties; - /** Creates an instance of ExtendedDatabaseBlobAuditingPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExtendedDatabaseBlobAuditingPolicyInner class. + */ public ExtendedDatabaseBlobAuditingPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ExtendedDatabaseBlobAuditingPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @return the predicateExpression value. */ public String predicateExpression() { @@ -44,7 +95,7 @@ public String predicateExpression() { /** * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @param predicateExpression the predicateExpression value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -58,7 +109,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withPredicateExpression(String pr /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -67,7 +118,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -81,48 +132,76 @@ public ExtendedDatabaseBlobAuditingPolicyInner withRetentionDays(Integer retenti /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -131,48 +210,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -187,7 +294,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withAuditActionsAndGroups(ListWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -230,24 +339,26 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ - public ExtendedDatabaseBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { + public ExtendedDatabaseBlobAuditingPolicyInner + withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { if (this.innerProperties() == null) { this.innerProperties = new ExtendedDatabaseBlobAuditingPolicyProperties(); } @@ -257,8 +368,9 @@ public ExtendedDatabaseBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled( /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -267,8 +379,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -282,7 +395,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withQueueDelayMs(Integer queueDel /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -291,7 +404,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -306,7 +419,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withIsManagedIdentityInUse(Boolea /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -316,7 +429,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -332,7 +445,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withState(BlobAuditingPolicyState * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -343,7 +456,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -356,14 +469,16 @@ public ExtendedDatabaseBlobAuditingPolicyInner withStorageEndpoint(String storag } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -371,14 +486,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -392,7 +509,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withStorageAccountAccessKey(Strin /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -401,7 +518,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself. */ @@ -415,7 +532,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withStorageAccountSubscriptionId( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -423,4 +540,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedDatabaseBlobAuditingPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedDatabaseBlobAuditingPolicyInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedDatabaseBlobAuditingPolicyInner. + */ + public static ExtendedDatabaseBlobAuditingPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedDatabaseBlobAuditingPolicyInner deserializedExtendedDatabaseBlobAuditingPolicyInner + = new ExtendedDatabaseBlobAuditingPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyInner.innerProperties + = ExtendedDatabaseBlobAuditingPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedDatabaseBlobAuditingPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyProperties.java index 741a311996a01..192e11e88a8db 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyProperties.java @@ -6,42 +6,48 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.UUID; -/** Properties of an extended database blob auditing policy. */ +/** + * Properties of an extended database blob auditing policy. + */ @Fluent -public final class ExtendedDatabaseBlobAuditingPolicyProperties { +public final class ExtendedDatabaseBlobAuditingPolicyProperties + implements JsonSerializable { /* * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "predicateExpression") private String predicateExpression; /* * Specifies the number of days to keep in the audit logs in the storage account. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the Actions-Groups and Actions to audit. - * + * * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * + * * BATCH_COMPLETED_GROUP, * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, * FAILED_DATABASE_AUTHENTICATION_GROUP. - * + * * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP * BACKUP_RESTORE_GROUP * DATABASE_LOGOUT_GROUP @@ -66,13 +72,14 @@ public final class ExtendedDatabaseBlobAuditingPolicyProperties { * DATABASE_OWNERSHIP_CHANGE_GROUP * DATABASE_CHANGE_GROUP * LEDGER_OPERATION_GROUP - * + * * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * + * * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-action-groups). + * * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for * Server auditing policy). The supported actions to audit are: * SELECT @@ -82,76 +89,71 @@ public final class ExtendedDatabaseBlobAuditingPolicyProperties { * EXECUTE * RECEIVE * REFERENCES - * + * * The general form for defining an action to be audited is: * {action} ON {object} BY {principal} - * + * * Note that in the above format can refer to an object like a table, view, or stored procedure, or an * entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. - * + * * For example: * SELECT on dbo.myTable by public * SELECT on DATABASE::myDatabase by public * SELECT on SCHEMA::mySchema by public - * + * * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-actions) */ - @JsonProperty(value = "auditActionsAndGroups") private List auditActionsAndGroups; /* * Specifies whether storageAccountAccessKey value is the storage's secondary key. */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") private Boolean isStorageSecondaryKeyInUse; /* * Specifies whether audit events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * + * * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs * category on the database should be also created. * Note that for server level audit you should use the 'master' database as {databaseName}. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}? + * api-version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") private Boolean isAzureMonitorTargetEnabled; /* * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ - @JsonProperty(value = "queueDelayMs") private Integer queueDelayMs; /* * Specifies whether Managed Identity is used to access blob storage */ - @JsonProperty(value = "isManagedIdentityInUse") private Boolean isManagedIdentityInUse; /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. */ - @JsonProperty(value = "state", required = true) private BlobAuditingPolicyState state; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint or isAzureMonitorTargetEnabled is required. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* @@ -160,27 +162,27 @@ public final class ExtendedDatabaseBlobAuditingPolicyProperties { * server system-assigned managed identity to access the storage. * Prerequisites for using managed identity authentication: * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role - * to the server identity. + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the blob storage subscription Id. */ - @JsonProperty(value = "storageAccountSubscriptionId") private UUID storageAccountSubscriptionId; - /** Creates an instance of ExtendedDatabaseBlobAuditingPolicyProperties class. */ + /** + * Creates an instance of ExtendedDatabaseBlobAuditingPolicyProperties class. + */ public ExtendedDatabaseBlobAuditingPolicyProperties() { } /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @return the predicateExpression value. */ public String predicateExpression() { @@ -189,7 +191,7 @@ public String predicateExpression() { /** * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @param predicateExpression the predicateExpression value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -200,7 +202,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withPredicateExpression(Stri /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -209,7 +211,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -220,48 +222,76 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withRetentionDays(Integer re /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -270,48 +300,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -323,7 +381,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withAuditActionsAndGroups(Li /** * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { @@ -333,30 +391,32 @@ public Boolean isStorageSecondaryKeyInUse() { /** * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ - public ExtendedDatabaseBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { + public ExtendedDatabaseBlobAuditingPolicyProperties + withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -364,32 +424,35 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ - public ExtendedDatabaseBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { + public ExtendedDatabaseBlobAuditingPolicyProperties + withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -398,8 +461,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -410,7 +474,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withQueueDelayMs(Integer que /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -419,7 +483,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -431,7 +495,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withIsManagedIdentityInUse(B /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -441,7 +505,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -454,7 +518,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withState(BlobAuditingPolicy * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -465,7 +529,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -475,14 +539,16 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withStorageEndpoint(String s } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -490,14 +556,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ @@ -508,7 +576,7 @@ public ExtendedDatabaseBlobAuditingPolicyProperties withStorageAccountAccessKey( /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -517,29 +585,108 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ExtendedDatabaseBlobAuditingPolicyProperties object itself. */ - public ExtendedDatabaseBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { + public ExtendedDatabaseBlobAuditingPolicyProperties + withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedDatabaseBlobAuditingPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model ExtendedDatabaseBlobAuditingPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ExtendedDatabaseBlobAuditingPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("predicateExpression", this.predicateExpression); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeArrayField("auditActionsAndGroups", this.auditActionsAndGroups, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isStorageSecondaryKeyInUse", this.isStorageSecondaryKeyInUse); + jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); + jsonWriter.writeNumberField("queueDelayMs", this.queueDelayMs); + jsonWriter.writeBooleanField("isManagedIdentityInUse", this.isManagedIdentityInUse); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeStringField("storageAccountSubscriptionId", + Objects.toString(this.storageAccountSubscriptionId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedDatabaseBlobAuditingPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedDatabaseBlobAuditingPolicyProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedDatabaseBlobAuditingPolicyProperties. + */ + public static ExtendedDatabaseBlobAuditingPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedDatabaseBlobAuditingPolicyProperties deserializedExtendedDatabaseBlobAuditingPolicyProperties + = new ExtendedDatabaseBlobAuditingPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.state + = BlobAuditingPolicyState.fromString(reader.getString()); + } else if ("predicateExpression".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.predicateExpression = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("auditActionsAndGroups".equals(fieldName)) { + List auditActionsAndGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedExtendedDatabaseBlobAuditingPolicyProperties.auditActionsAndGroups + = auditActionsAndGroups; + } else if ("isStorageSecondaryKeyInUse".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.isStorageSecondaryKeyInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.isAzureMonitorTargetEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("queueDelayMs".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.queueDelayMs + = reader.getNullable(JsonReader::getInt); + } else if ("isManagedIdentityInUse".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.isManagedIdentityInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.storageAccountAccessKey + = reader.getString(); + } else if ("storageAccountSubscriptionId".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyProperties.storageAccountSubscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedDatabaseBlobAuditingPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyInner.java index 7586815969742..6efd79632d111 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyInner.java @@ -6,47 +6,100 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** An extended server blob auditing policy. */ +/** + * An extended server blob auditing policy. + */ @Fluent public final class ExtendedServerBlobAuditingPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ExtendedServerBlobAuditingPolicyProperties innerProperties; - /** Creates an instance of ExtendedServerBlobAuditingPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExtendedServerBlobAuditingPolicyInner class. + */ public ExtendedServerBlobAuditingPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ExtendedServerBlobAuditingPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isDevopsAuditEnabled value. */ public Boolean isDevopsAuditEnabled() { @@ -55,18 +108,20 @@ public Boolean isDevopsAuditEnabled() { /** * Set the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isDevopsAuditEnabled the isDevopsAuditEnabled value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -80,7 +135,7 @@ public ExtendedServerBlobAuditingPolicyInner withIsDevopsAuditEnabled(Boolean is /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @return the predicateExpression value. */ public String predicateExpression() { @@ -89,7 +144,7 @@ public String predicateExpression() { /** * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @param predicateExpression the predicateExpression value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -103,7 +158,7 @@ public ExtendedServerBlobAuditingPolicyInner withPredicateExpression(String pred /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -112,7 +167,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -126,48 +181,76 @@ public ExtendedServerBlobAuditingPolicyInner withRetentionDays(Integer retention /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -176,48 +259,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -232,7 +343,7 @@ public ExtendedServerBlobAuditingPolicyInner withAuditActionsAndGroups(ListWhen using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -275,19 +388,21 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -301,8 +416,9 @@ public ExtendedServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boo /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -311,8 +427,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -326,7 +443,7 @@ public ExtendedServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelay /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -335,7 +452,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -350,7 +467,7 @@ public ExtendedServerBlobAuditingPolicyInner withIsManagedIdentityInUse(Boolean /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -360,7 +477,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -376,7 +493,7 @@ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState s * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -387,7 +504,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -400,14 +517,16 @@ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageE } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -415,14 +534,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -436,7 +557,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageAccountAccessKey(String /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -445,7 +566,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ @@ -459,7 +580,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UU /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -467,4 +588,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedServerBlobAuditingPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedServerBlobAuditingPolicyInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedServerBlobAuditingPolicyInner. + */ + public static ExtendedServerBlobAuditingPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedServerBlobAuditingPolicyInner deserializedExtendedServerBlobAuditingPolicyInner + = new ExtendedServerBlobAuditingPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyInner.innerProperties + = ExtendedServerBlobAuditingPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedServerBlobAuditingPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java index 1c84c588ecccd..8e395bf019160 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java @@ -6,61 +6,67 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.UUID; -/** Properties of an extended server blob auditing policy. */ +/** + * Properties of an extended server blob auditing policy. + */ @Fluent -public final class ExtendedServerBlobAuditingPolicyProperties { +public final class ExtendedServerBlobAuditingPolicyProperties + implements JsonSerializable { /* * Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as - * true and 'IsDevopsAuditEnabled' as true - * + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- + * version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isDevopsAuditEnabled") private Boolean isDevopsAuditEnabled; /* * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "predicateExpression") private String predicateExpression; /* * Specifies the number of days to keep in the audit logs in the storage account. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the Actions-Groups and Actions to audit. - * + * * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * + * * BATCH_COMPLETED_GROUP, * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, * FAILED_DATABASE_AUTHENTICATION_GROUP. - * + * * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP * BACKUP_RESTORE_GROUP * DATABASE_LOGOUT_GROUP @@ -85,13 +91,14 @@ public final class ExtendedServerBlobAuditingPolicyProperties { * DATABASE_OWNERSHIP_CHANGE_GROUP * DATABASE_CHANGE_GROUP * LEDGER_OPERATION_GROUP - * + * * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * + * * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-action-groups). + * * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for * Server auditing policy). The supported actions to audit are: * SELECT @@ -101,76 +108,71 @@ public final class ExtendedServerBlobAuditingPolicyProperties { * EXECUTE * RECEIVE * REFERENCES - * + * * The general form for defining an action to be audited is: * {action} ON {object} BY {principal} - * + * * Note that in the above format can refer to an object like a table, view, or stored procedure, or an * entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. - * + * * For example: * SELECT on dbo.myTable by public * SELECT on DATABASE::myDatabase by public * SELECT on SCHEMA::mySchema by public - * + * * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-actions) */ - @JsonProperty(value = "auditActionsAndGroups") private List auditActionsAndGroups; /* * Specifies whether storageAccountAccessKey value is the storage's secondary key. */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") private Boolean isStorageSecondaryKeyInUse; /* * Specifies whether audit events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * + * * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs * category on the database should be also created. * Note that for server level audit you should use the 'master' database as {databaseName}. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}? + * api-version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") private Boolean isAzureMonitorTargetEnabled; /* * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ - @JsonProperty(value = "queueDelayMs") private Integer queueDelayMs; /* * Specifies whether Managed Identity is used to access blob storage */ - @JsonProperty(value = "isManagedIdentityInUse") private Boolean isManagedIdentityInUse; /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. */ - @JsonProperty(value = "state", required = true) private BlobAuditingPolicyState state; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint or isAzureMonitorTargetEnabled is required. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* @@ -179,38 +181,40 @@ public final class ExtendedServerBlobAuditingPolicyProperties { * server system-assigned managed identity to access the storage. * Prerequisites for using managed identity authentication: * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role - * to the server identity. + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the blob storage subscription Id. */ - @JsonProperty(value = "storageAccountSubscriptionId") private UUID storageAccountSubscriptionId; - /** Creates an instance of ExtendedServerBlobAuditingPolicyProperties class. */ + /** + * Creates an instance of ExtendedServerBlobAuditingPolicyProperties class. + */ public ExtendedServerBlobAuditingPolicyProperties() { } /** * Get the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isDevopsAuditEnabled value. */ public Boolean isDevopsAuditEnabled() { @@ -219,18 +223,20 @@ public Boolean isDevopsAuditEnabled() { /** * Set the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isDevopsAuditEnabled the isDevopsAuditEnabled value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -241,7 +247,7 @@ public ExtendedServerBlobAuditingPolicyProperties withIsDevopsAuditEnabled(Boole /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @return the predicateExpression value. */ public String predicateExpression() { @@ -250,7 +256,7 @@ public String predicateExpression() { /** * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * + * * @param predicateExpression the predicateExpression value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -261,7 +267,7 @@ public ExtendedServerBlobAuditingPolicyProperties withPredicateExpression(String /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -270,7 +276,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -281,48 +287,76 @@ public ExtendedServerBlobAuditingPolicyProperties withRetentionDays(Integer rete /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -331,48 +365,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -384,7 +446,7 @@ public ExtendedServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List /** * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { @@ -394,30 +456,32 @@ public Boolean isStorageSecondaryKeyInUse() { /** * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ - public ExtendedServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { + public ExtendedServerBlobAuditingPolicyProperties + withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -425,32 +489,35 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ - public ExtendedServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { + public ExtendedServerBlobAuditingPolicyProperties + withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -459,8 +526,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -471,7 +539,7 @@ public ExtendedServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queue /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -480,7 +548,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -492,7 +560,7 @@ public ExtendedServerBlobAuditingPolicyProperties withIsManagedIdentityInUse(Boo /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -502,7 +570,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -515,7 +583,7 @@ public ExtendedServerBlobAuditingPolicyProperties withState(BlobAuditingPolicySt * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -526,7 +594,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -536,14 +604,16 @@ public ExtendedServerBlobAuditingPolicyProperties withStorageEndpoint(String sto } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -551,14 +621,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ @@ -569,7 +641,7 @@ public ExtendedServerBlobAuditingPolicyProperties withStorageAccountAccessKey(St /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -578,29 +650,111 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ExtendedServerBlobAuditingPolicyProperties object itself. */ - public ExtendedServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { + public ExtendedServerBlobAuditingPolicyProperties + withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedServerBlobAuditingPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model ExtendedServerBlobAuditingPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ExtendedServerBlobAuditingPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeBooleanField("isDevopsAuditEnabled", this.isDevopsAuditEnabled); + jsonWriter.writeStringField("predicateExpression", this.predicateExpression); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeArrayField("auditActionsAndGroups", this.auditActionsAndGroups, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isStorageSecondaryKeyInUse", this.isStorageSecondaryKeyInUse); + jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); + jsonWriter.writeNumberField("queueDelayMs", this.queueDelayMs); + jsonWriter.writeBooleanField("isManagedIdentityInUse", this.isManagedIdentityInUse); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeStringField("storageAccountSubscriptionId", + Objects.toString(this.storageAccountSubscriptionId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedServerBlobAuditingPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedServerBlobAuditingPolicyProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExtendedServerBlobAuditingPolicyProperties. + */ + public static ExtendedServerBlobAuditingPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedServerBlobAuditingPolicyProperties deserializedExtendedServerBlobAuditingPolicyProperties + = new ExtendedServerBlobAuditingPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.state + = BlobAuditingPolicyState.fromString(reader.getString()); + } else if ("isDevopsAuditEnabled".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.isDevopsAuditEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("predicateExpression".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.predicateExpression = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("auditActionsAndGroups".equals(fieldName)) { + List auditActionsAndGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedExtendedServerBlobAuditingPolicyProperties.auditActionsAndGroups + = auditActionsAndGroups; + } else if ("isStorageSecondaryKeyInUse".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.isStorageSecondaryKeyInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.isAzureMonitorTargetEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("queueDelayMs".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.queueDelayMs + = reader.getNullable(JsonReader::getInt); + } else if ("isManagedIdentityInUse".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.isManagedIdentityInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.storageAccountAccessKey = reader.getString(); + } else if ("storageAccountSubscriptionId".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyProperties.storageAccountSubscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedServerBlobAuditingPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupInner.java index 38af9756cbc14..4f7d703b52bdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupInner.java @@ -6,44 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.PartnerInfo; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; -/** A failover group. */ +/** + * A failover group. + */ @Fluent public final class FailoverGroupInner extends ProxyResource { /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Resource properties. */ - @JsonProperty(value = "properties") private FailoverGroupProperties innerProperties; - /** Creates an instance of FailoverGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of FailoverGroupInner class. + */ public FailoverGroupInner() { } /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -52,7 +69,7 @@ public String location() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -61,7 +78,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the FailoverGroupInner object itself. */ @@ -72,16 +89,46 @@ public FailoverGroupInner withTags(Map tags) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private FailoverGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -90,7 +137,7 @@ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the FailoverGroupInner object itself. */ @@ -104,7 +151,7 @@ public FailoverGroupInner withReadWriteEndpoint(FailoverGroupReadWriteEndpoint r /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -113,7 +160,7 @@ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the FailoverGroupInner object itself. */ @@ -127,7 +174,7 @@ public FailoverGroupInner withReadOnlyEndpoint(FailoverGroupReadOnlyEndpoint rea /** * Get the replicationRole property: Local replication role of the failover group instance. - * + * * @return the replicationRole value. */ public FailoverGroupReplicationRole replicationRole() { @@ -136,7 +183,7 @@ public FailoverGroupReplicationRole replicationRole() { /** * Get the replicationState property: Replication state of the failover group instance. - * + * * @return the replicationState value. */ public String replicationState() { @@ -145,7 +192,7 @@ public String replicationState() { /** * Get the partnerServers property: List of partner server information for the failover group. - * + * * @return the partnerServers value. */ public List partnerServers() { @@ -154,7 +201,7 @@ public List partnerServers() { /** * Set the partnerServers property: List of partner server information for the failover group. - * + * * @param partnerServers the partnerServers value to set. * @return the FailoverGroupInner object itself. */ @@ -168,7 +215,7 @@ public FailoverGroupInner withPartnerServers(List partnerServers) { /** * Get the databases property: List of databases in the failover group. - * + * * @return the databases value. */ public List databases() { @@ -177,7 +224,7 @@ public List databases() { /** * Set the databases property: List of databases in the failover group. - * + * * @param databases the databases value to set. * @return the FailoverGroupInner object itself. */ @@ -191,7 +238,7 @@ public FailoverGroupInner withDatabases(List databases) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -199,4 +246,53 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FailoverGroupInner. + */ + public static FailoverGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupInner deserializedFailoverGroupInner = new FailoverGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFailoverGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFailoverGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFailoverGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedFailoverGroupInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFailoverGroupInner.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedFailoverGroupInner.innerProperties = FailoverGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java index 69bbbafe90fc8..1ff37b011de99 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java @@ -6,59 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.PartnerInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a failover group. */ +/** + * Properties of a failover group. + */ @Fluent -public final class FailoverGroupProperties { +public final class FailoverGroupProperties implements JsonSerializable { /* * Read-write endpoint of the failover group instance. */ - @JsonProperty(value = "readWriteEndpoint", required = true) private FailoverGroupReadWriteEndpoint readWriteEndpoint; /* * Read-only endpoint of the failover group instance. */ - @JsonProperty(value = "readOnlyEndpoint") private FailoverGroupReadOnlyEndpoint readOnlyEndpoint; /* * Local replication role of the failover group instance. */ - @JsonProperty(value = "replicationRole", access = JsonProperty.Access.WRITE_ONLY) private FailoverGroupReplicationRole replicationRole; /* * Replication state of the failover group instance. */ - @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY) private String replicationState; /* * List of partner server information for the failover group. */ - @JsonProperty(value = "partnerServers", required = true) private List partnerServers; /* * List of databases in the failover group. */ - @JsonProperty(value = "databases") private List databases; - /** Creates an instance of FailoverGroupProperties class. */ + /** + * Creates an instance of FailoverGroupProperties class. + */ public FailoverGroupProperties() { } /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -67,7 +69,7 @@ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the FailoverGroupProperties object itself. */ @@ -78,7 +80,7 @@ public FailoverGroupProperties withReadWriteEndpoint(FailoverGroupReadWriteEndpo /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -87,7 +89,7 @@ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the FailoverGroupProperties object itself. */ @@ -98,7 +100,7 @@ public FailoverGroupProperties withReadOnlyEndpoint(FailoverGroupReadOnlyEndpoin /** * Get the replicationRole property: Local replication role of the failover group instance. - * + * * @return the replicationRole value. */ public FailoverGroupReplicationRole replicationRole() { @@ -107,7 +109,7 @@ public FailoverGroupReplicationRole replicationRole() { /** * Get the replicationState property: Replication state of the failover group instance. - * + * * @return the replicationState value. */ public String replicationState() { @@ -116,7 +118,7 @@ public String replicationState() { /** * Get the partnerServers property: List of partner server information for the failover group. - * + * * @return the partnerServers value. */ public List partnerServers() { @@ -125,7 +127,7 @@ public List partnerServers() { /** * Set the partnerServers property: List of partner server information for the failover group. - * + * * @param partnerServers the partnerServers value to set. * @return the FailoverGroupProperties object itself. */ @@ -136,7 +138,7 @@ public FailoverGroupProperties withPartnerServers(List partnerServe /** * Get the databases property: List of databases in the failover group. - * + * * @return the databases value. */ public List databases() { @@ -145,7 +147,7 @@ public List databases() { /** * Set the databases property: List of databases in the failover group. - * + * * @param databases the databases value to set. * @return the FailoverGroupProperties object itself. */ @@ -156,15 +158,14 @@ public FailoverGroupProperties withDatabases(List databases) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (readWriteEndpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property readWriteEndpoint in model FailoverGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property readWriteEndpoint in model FailoverGroupProperties")); } else { readWriteEndpoint().validate(); } @@ -172,14 +173,69 @@ public void validate() { readOnlyEndpoint().validate(); } if (partnerServers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property partnerServers in model FailoverGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property partnerServers in model FailoverGroupProperties")); } else { partnerServers().forEach(e -> e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(FailoverGroupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("readWriteEndpoint", this.readWriteEndpoint); + jsonWriter.writeArrayField("partnerServers", this.partnerServers, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); + jsonWriter.writeArrayField("databases", this.databases, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FailoverGroupProperties. + */ + public static FailoverGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupProperties deserializedFailoverGroupProperties = new FailoverGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("readWriteEndpoint".equals(fieldName)) { + deserializedFailoverGroupProperties.readWriteEndpoint + = FailoverGroupReadWriteEndpoint.fromJson(reader); + } else if ("partnerServers".equals(fieldName)) { + List partnerServers = reader.readArray(reader1 -> PartnerInfo.fromJson(reader1)); + deserializedFailoverGroupProperties.partnerServers = partnerServers; + } else if ("readOnlyEndpoint".equals(fieldName)) { + deserializedFailoverGroupProperties.readOnlyEndpoint + = FailoverGroupReadOnlyEndpoint.fromJson(reader); + } else if ("replicationRole".equals(fieldName)) { + deserializedFailoverGroupProperties.replicationRole + = FailoverGroupReplicationRole.fromString(reader.getString()); + } else if ("replicationState".equals(fieldName)) { + deserializedFailoverGroupProperties.replicationState = reader.getString(); + } else if ("databases".equals(fieldName)) { + List databases = reader.readArray(reader1 -> reader1.getString()); + deserializedFailoverGroupProperties.databases = databases; + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java index 3f9168b40fdec..1bcfb42ab7427 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java @@ -5,39 +5,44 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a failover group update. */ +/** + * Properties of a failover group update. + */ @Fluent -public final class FailoverGroupUpdateProperties { +public final class FailoverGroupUpdateProperties implements JsonSerializable { /* * Read-write endpoint of the failover group instance. */ - @JsonProperty(value = "readWriteEndpoint") private FailoverGroupReadWriteEndpoint readWriteEndpoint; /* * Read-only endpoint of the failover group instance. */ - @JsonProperty(value = "readOnlyEndpoint") private FailoverGroupReadOnlyEndpoint readOnlyEndpoint; /* * List of databases in the failover group. */ - @JsonProperty(value = "databases") private List databases; - /** Creates an instance of FailoverGroupUpdateProperties class. */ + /** + * Creates an instance of FailoverGroupUpdateProperties class. + */ public FailoverGroupUpdateProperties() { } /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -46,7 +51,7 @@ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the FailoverGroupUpdateProperties object itself. */ @@ -57,7 +62,7 @@ public FailoverGroupUpdateProperties withReadWriteEndpoint(FailoverGroupReadWrit /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -66,7 +71,7 @@ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the FailoverGroupUpdateProperties object itself. */ @@ -77,7 +82,7 @@ public FailoverGroupUpdateProperties withReadOnlyEndpoint(FailoverGroupReadOnlyE /** * Get the databases property: List of databases in the failover group. - * + * * @return the databases value. */ public List databases() { @@ -86,7 +91,7 @@ public List databases() { /** * Set the databases property: List of databases in the failover group. - * + * * @param databases the databases value to set. * @return the FailoverGroupUpdateProperties object itself. */ @@ -97,7 +102,7 @@ public FailoverGroupUpdateProperties withDatabases(List databases) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -108,4 +113,50 @@ public void validate() { readOnlyEndpoint().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("readWriteEndpoint", this.readWriteEndpoint); + jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); + jsonWriter.writeArrayField("databases", this.databases, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FailoverGroupUpdateProperties. + */ + public static FailoverGroupUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupUpdateProperties deserializedFailoverGroupUpdateProperties + = new FailoverGroupUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("readWriteEndpoint".equals(fieldName)) { + deserializedFailoverGroupUpdateProperties.readWriteEndpoint + = FailoverGroupReadWriteEndpoint.fromJson(reader); + } else if ("readOnlyEndpoint".equals(fieldName)) { + deserializedFailoverGroupUpdateProperties.readOnlyEndpoint + = FailoverGroupReadOnlyEndpoint.fromJson(reader); + } else if ("databases".equals(fieldName)) { + List databases = reader.readArray(reader1 -> reader1.getString()); + deserializedFailoverGroupUpdateProperties.databases = databases; + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java index ab5020149b62f..10350292c2474 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java @@ -5,32 +5,70 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ProxyResourceWithWritableName; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A server firewall rule. */ +/** + * A server firewall rule. + */ @Fluent public final class FirewallRuleInner extends ProxyResourceWithWritableName { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerFirewallRuleProperties innerProperties; - /** Creates an instance of FirewallRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of FirewallRuleInner class. + */ public FirewallRuleInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerFirewallRuleProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public FirewallRuleInner withName(String name) { super.withName(name); @@ -40,7 +78,7 @@ public FirewallRuleInner withName(String name) { /** * Get the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format. Use value * '0.0.0.0' for all Azure-internal IP addresses. - * + * * @return the startIpAddress value. */ public String startIpAddress() { @@ -50,7 +88,7 @@ public String startIpAddress() { /** * Set the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format. Use value * '0.0.0.0' for all Azure-internal IP addresses. - * + * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleInner object itself. */ @@ -65,7 +103,7 @@ public FirewallRuleInner withStartIpAddress(String startIpAddress) { /** * Get the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than * or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. - * + * * @return the endIpAddress value. */ public String endIpAddress() { @@ -75,7 +113,7 @@ public String endIpAddress() { /** * Set the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than * or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. - * + * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleInner object itself. */ @@ -89,7 +127,7 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -99,4 +137,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FirewallRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FirewallRuleInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FirewallRuleInner. + */ + public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FirewallRuleInner deserializedFirewallRuleInner = new FirewallRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFirewallRuleInner.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFirewallRuleInner.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFirewallRuleInner.withName(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedFirewallRuleInner.innerProperties = ServerFirewallRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFirewallRuleInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java index a675712b2dac4..761a7f883476b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java @@ -6,37 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.GeoBackupPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A Geo backup policy. */ +/** + * A Geo backup policy. + */ @Fluent public final class GeoBackupPolicyInner extends ProxyResource { /* * Backup policy location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* - * Kind of geo backup policy. This is metadata used for the Azure portal experience. + * Kind of geo backup policy. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private GeoBackupPolicyProperties innerProperties; - /** Creates an instance of GeoBackupPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GeoBackupPolicyInner class. + */ public GeoBackupPolicyInner() { } /** * Get the location property: Backup policy location. - * + * * @return the location value. */ public String location() { @@ -45,7 +64,7 @@ public String location() { /** * Get the kind property: Kind of geo backup policy. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -54,16 +73,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private GeoBackupPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: The state of the geo backup policy. - * + * * @return the state value. */ public GeoBackupPolicyState state() { @@ -72,7 +121,7 @@ public GeoBackupPolicyState state() { /** * Set the state property: The state of the geo backup policy. - * + * * @param state the state value to set. * @return the GeoBackupPolicyInner object itself. */ @@ -86,7 +135,7 @@ public GeoBackupPolicyInner withState(GeoBackupPolicyState state) { /** * Get the storageType property: The storage type of the geo backup policy. - * + * * @return the storageType value. */ public String storageType() { @@ -95,7 +144,7 @@ public String storageType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -103,4 +152,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeoBackupPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeoBackupPolicyInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GeoBackupPolicyInner. + */ + public static GeoBackupPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoBackupPolicyInner deserializedGeoBackupPolicyInner = new GeoBackupPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGeoBackupPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGeoBackupPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGeoBackupPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGeoBackupPolicyInner.location = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedGeoBackupPolicyInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGeoBackupPolicyInner.innerProperties = GeoBackupPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGeoBackupPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java index 9b6e13719cfef..b8146cc72a276 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java @@ -6,31 +6,37 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.GeoBackupPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The properties of the geo backup policy. */ +/** + * The properties of the geo backup policy. + */ @Fluent -public final class GeoBackupPolicyProperties { +public final class GeoBackupPolicyProperties implements JsonSerializable { /* * The state of the geo backup policy. */ - @JsonProperty(value = "state", required = true) private GeoBackupPolicyState state; /* * The storage type of the geo backup policy. */ - @JsonProperty(value = "storageType", access = JsonProperty.Access.WRITE_ONLY) private String storageType; - /** Creates an instance of GeoBackupPolicyProperties class. */ + /** + * Creates an instance of GeoBackupPolicyProperties class. + */ public GeoBackupPolicyProperties() { } /** * Get the state property: The state of the geo backup policy. - * + * * @return the state value. */ public GeoBackupPolicyState state() { @@ -39,7 +45,7 @@ public GeoBackupPolicyState state() { /** * Set the state property: The state of the geo backup policy. - * + * * @param state the state value to set. * @return the GeoBackupPolicyProperties object itself. */ @@ -50,7 +56,7 @@ public GeoBackupPolicyProperties withState(GeoBackupPolicyState state) { /** * Get the storageType property: The storage type of the geo backup policy. - * + * * @return the storageType value. */ public String storageType() { @@ -59,16 +65,55 @@ public String storageType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property state in model GeoBackupPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(GeoBackupPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeoBackupPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeoBackupPolicyProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GeoBackupPolicyProperties. + */ + public static GeoBackupPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoBackupPolicyProperties deserializedGeoBackupPolicyProperties = new GeoBackupPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedGeoBackupPolicyProperties.state = GeoBackupPolicyState.fromString(reader.getString()); + } else if ("storageType".equals(fieldName)) { + deserializedGeoBackupPolicyProperties.storageType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGeoBackupPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java index 864bdf791c1e5..d6b4f8bcae2d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java @@ -5,32 +5,70 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ProxyResourceWithWritableName; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** An IPv6 server firewall rule. */ +/** + * An IPv6 server firewall rule. + */ @Fluent public final class IPv6FirewallRuleInner extends ProxyResourceWithWritableName { /* * Resource properties. */ - @JsonProperty(value = "properties") private IPv6ServerFirewallRuleProperties innerProperties; - /** Creates an instance of IPv6FirewallRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of IPv6FirewallRuleInner class. + */ public IPv6FirewallRuleInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private IPv6ServerFirewallRuleProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public IPv6FirewallRuleInner withName(String name) { super.withName(name); @@ -39,7 +77,7 @@ public IPv6FirewallRuleInner withName(String name) { /** * Get the startIPv6Address property: The start IP address of the firewall rule. Must be IPv6 format. - * + * * @return the startIPv6Address value. */ public String startIPv6Address() { @@ -48,7 +86,7 @@ public String startIPv6Address() { /** * Set the startIPv6Address property: The start IP address of the firewall rule. Must be IPv6 format. - * + * * @param startIPv6Address the startIPv6Address value to set. * @return the IPv6FirewallRuleInner object itself. */ @@ -63,7 +101,7 @@ public IPv6FirewallRuleInner withStartIPv6Address(String startIPv6Address) { /** * Get the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater * than or equal to startIpAddress. - * + * * @return the endIPv6Address value. */ public String endIPv6Address() { @@ -73,7 +111,7 @@ public String endIPv6Address() { /** * Set the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater * than or equal to startIpAddress. - * + * * @param endIPv6Address the endIPv6Address value to set. * @return the IPv6FirewallRuleInner object itself. */ @@ -87,7 +125,7 @@ public IPv6FirewallRuleInner withEndIPv6Address(String endIPv6Address) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -97,4 +135,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPv6FirewallRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPv6FirewallRuleInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IPv6FirewallRuleInner. + */ + public static IPv6FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPv6FirewallRuleInner deserializedIPv6FirewallRuleInner = new IPv6FirewallRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIPv6FirewallRuleInner.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIPv6FirewallRuleInner.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIPv6FirewallRuleInner.withName(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedIPv6FirewallRuleInner.innerProperties + = IPv6ServerFirewallRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIPv6FirewallRuleInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java index 1196d22b221d5..fe7570678f51e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of an IPv6 server firewall rule. */ +/** + * The properties of an IPv6 server firewall rule. + */ @Fluent -public final class IPv6ServerFirewallRuleProperties { +public final class IPv6ServerFirewallRuleProperties implements JsonSerializable { /* * The start IP address of the firewall rule. Must be IPv6 format. */ - @JsonProperty(value = "startIPv6Address") private String startIPv6Address; /* * The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. */ - @JsonProperty(value = "endIPv6Address") private String endIPv6Address; - /** Creates an instance of IPv6ServerFirewallRuleProperties class. */ + /** + * Creates an instance of IPv6ServerFirewallRuleProperties class. + */ public IPv6ServerFirewallRuleProperties() { } /** * Get the startIPv6Address property: The start IP address of the firewall rule. Must be IPv6 format. - * + * * @return the startIPv6Address value. */ public String startIPv6Address() { @@ -37,7 +43,7 @@ public String startIPv6Address() { /** * Set the startIPv6Address property: The start IP address of the firewall rule. Must be IPv6 format. - * + * * @param startIPv6Address the startIPv6Address value to set. * @return the IPv6ServerFirewallRuleProperties object itself. */ @@ -49,7 +55,7 @@ public IPv6ServerFirewallRuleProperties withStartIPv6Address(String startIPv6Add /** * Get the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater * than or equal to startIpAddress. - * + * * @return the endIPv6Address value. */ public String endIPv6Address() { @@ -59,7 +65,7 @@ public String endIPv6Address() { /** * Set the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater * than or equal to startIpAddress. - * + * * @param endIPv6Address the endIPv6Address value to set. * @return the IPv6ServerFirewallRuleProperties object itself. */ @@ -70,9 +76,49 @@ public IPv6ServerFirewallRuleProperties withEndIPv6Address(String endIPv6Address /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("startIPv6Address", this.startIPv6Address); + jsonWriter.writeStringField("endIPv6Address", this.endIPv6Address); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPv6ServerFirewallRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPv6ServerFirewallRuleProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IPv6ServerFirewallRuleProperties. + */ + public static IPv6ServerFirewallRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPv6ServerFirewallRuleProperties deserializedIPv6ServerFirewallRuleProperties + = new IPv6ServerFirewallRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startIPv6Address".equals(fieldName)) { + deserializedIPv6ServerFirewallRuleProperties.startIPv6Address = reader.getString(); + } else if ("endIPv6Address".equals(fieldName)) { + deserializedIPv6ServerFirewallRuleProperties.endIPv6Address = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIPv6ServerFirewallRuleProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java index 4003e0cd289e1..3fc2b41e29eef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointConnectionRequestStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** An Extension operation result resource. */ +/** + * An Extension operation result resource. + */ @Immutable public final class ImportExportExtensionsOperationResultInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ImportExportExtensionsOperationResultProperties innerProperties; - /** Creates an instance of ImportExportExtensionsOperationResultInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ImportExportExtensionsOperationResultInner class. + */ public ImportExportExtensionsOperationResultInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ImportExportExtensionsOperationResultProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -44,7 +95,7 @@ public UUID requestId() { /** * Get the requestType property: Request type. - * + * * @return the requestType value. */ public String requestType() { @@ -53,7 +104,7 @@ public String requestType() { /** * Get the lastModifiedTime property: Last modified time. - * + * * @return the lastModifiedTime value. */ public String lastModifiedTime() { @@ -62,7 +113,7 @@ public String lastModifiedTime() { /** * Get the serverName property: Server name. - * + * * @return the serverName value. */ public String serverName() { @@ -71,7 +122,7 @@ public String serverName() { /** * Get the databaseName property: Database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -80,7 +131,7 @@ public String databaseName() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -89,7 +140,7 @@ public String status() { /** * Get the errorMessage property: Error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -98,7 +149,7 @@ public String errorMessage() { /** * Get the queuedTime property: Queued time. - * + * * @return the queuedTime value. */ public String queuedTime() { @@ -107,7 +158,7 @@ public String queuedTime() { /** * Get the blobUri property: Blob URI. - * + * * @return the blobUri value. */ public String blobUri() { @@ -116,7 +167,7 @@ public String blobUri() { /** * Get the privateEndpointConnections property: Gets the status of private endpoints associated with this request. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -125,7 +176,7 @@ public List privateEndpointConnections() /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -133,4 +184,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExportExtensionsOperationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExportExtensionsOperationResultInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportExportExtensionsOperationResultInner. + */ + public static ImportExportExtensionsOperationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExportExtensionsOperationResultInner deserializedImportExportExtensionsOperationResultInner + = new ImportExportExtensionsOperationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultInner.innerProperties + = ImportExportExtensionsOperationResultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportExportExtensionsOperationResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java index 5e56cd975415e..5af1ddc109a5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java @@ -5,81 +5,80 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointConnectionRequestStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** Contains the operation result properties for import/export operation. */ +/** + * Contains the operation result properties for import/export operation. + */ @Immutable -public final class ImportExportExtensionsOperationResultProperties { +public final class ImportExportExtensionsOperationResultProperties + implements JsonSerializable { /* * Request Id. */ - @JsonProperty(value = "requestId", access = JsonProperty.Access.WRITE_ONLY) private UUID requestId; /* * Request type. */ - @JsonProperty(value = "requestType", access = JsonProperty.Access.WRITE_ONLY) private String requestType; /* * Last modified time. */ - @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) private String lastModifiedTime; /* * Server name. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * Database name. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * Operation status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; /* * Error message. */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; /* * Queued time. */ - @JsonProperty(value = "queuedTime", access = JsonProperty.Access.WRITE_ONLY) private String queuedTime; /* * Blob URI. */ - @JsonProperty(value = "blobUri", access = JsonProperty.Access.WRITE_ONLY) private String blobUri; /* * Gets the status of private endpoints associated with this request. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of ImportExportExtensionsOperationResultProperties class. */ + /** + * Creates an instance of ImportExportExtensionsOperationResultProperties class. + */ public ImportExportExtensionsOperationResultProperties() { } /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -88,7 +87,7 @@ public UUID requestId() { /** * Get the requestType property: Request type. - * + * * @return the requestType value. */ public String requestType() { @@ -97,7 +96,7 @@ public String requestType() { /** * Get the lastModifiedTime property: Last modified time. - * + * * @return the lastModifiedTime value. */ public String lastModifiedTime() { @@ -106,7 +105,7 @@ public String lastModifiedTime() { /** * Get the serverName property: Server name. - * + * * @return the serverName value. */ public String serverName() { @@ -115,7 +114,7 @@ public String serverName() { /** * Get the databaseName property: Database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -124,7 +123,7 @@ public String databaseName() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -133,7 +132,7 @@ public String status() { /** * Get the errorMessage property: Error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -142,7 +141,7 @@ public String errorMessage() { /** * Get the queuedTime property: Queued time. - * + * * @return the queuedTime value. */ public String queuedTime() { @@ -151,7 +150,7 @@ public String queuedTime() { /** * Get the blobUri property: Blob URI. - * + * * @return the blobUri value. */ public String blobUri() { @@ -160,7 +159,7 @@ public String blobUri() { /** * Get the privateEndpointConnections property: Gets the status of private endpoints associated with this request. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -169,7 +168,7 @@ public List privateEndpointConnections() /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -177,4 +176,62 @@ public void validate() { privateEndpointConnections().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExportExtensionsOperationResultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExportExtensionsOperationResultProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportExportExtensionsOperationResultProperties. + */ + public static ImportExportExtensionsOperationResultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExportExtensionsOperationResultProperties deserializedImportExportExtensionsOperationResultProperties + = new ImportExportExtensionsOperationResultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requestId".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.requestId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("requestType".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.requestType = reader.getString(); + } else if ("lastModifiedTime".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.lastModifiedTime = reader.getString(); + } else if ("serverName".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.databaseName = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.status = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.errorMessage = reader.getString(); + } else if ("queuedTime".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.queuedTime = reader.getString(); + } else if ("blobUri".equals(fieldName)) { + deserializedImportExportExtensionsOperationResultProperties.blobUri = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionRequestStatus.fromJson(reader1)); + deserializedImportExportExtensionsOperationResultProperties.privateEndpointConnections + = privateEndpointConnections; + } else { + reader.skipChildren(); + } + } + + return deserializedImportExportExtensionsOperationResultProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java index 494b4019233e7..66aa3d9b0729a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointConnectionRequestStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** An ImportExport operation result resource. */ +/** + * An ImportExport operation result resource. + */ @Immutable public final class ImportExportOperationResultInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ImportExportOperationResultProperties innerProperties; - /** Creates an instance of ImportExportOperationResultInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ImportExportOperationResultInner class. + */ public ImportExportOperationResultInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ImportExportOperationResultProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -44,7 +95,7 @@ public UUID requestId() { /** * Get the requestType property: Request type. - * + * * @return the requestType value. */ public String requestType() { @@ -53,7 +104,7 @@ public String requestType() { /** * Get the queuedTime property: Queued time. - * + * * @return the queuedTime value. */ public String queuedTime() { @@ -62,7 +113,7 @@ public String queuedTime() { /** * Get the lastModifiedTime property: Last modified time. - * + * * @return the lastModifiedTime value. */ public String lastModifiedTime() { @@ -71,7 +122,7 @@ public String lastModifiedTime() { /** * Get the blobUri property: Blob Uri. - * + * * @return the blobUri value. */ public String blobUri() { @@ -80,7 +131,7 @@ public String blobUri() { /** * Get the serverName property: Server name. - * + * * @return the serverName value. */ public String serverName() { @@ -89,7 +140,7 @@ public String serverName() { /** * Get the databaseName property: Database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -98,7 +149,7 @@ public String databaseName() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -107,7 +158,7 @@ public String status() { /** * Get the errorMessage property: Error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -116,7 +167,7 @@ public String errorMessage() { /** * Get the privateEndpointConnections property: Gets the status of private endpoints associated with this request. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -125,7 +176,7 @@ public List privateEndpointConnections() /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -133,4 +184,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExportOperationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExportOperationResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportExportOperationResultInner. + */ + public static ImportExportOperationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExportOperationResultInner deserializedImportExportOperationResultInner + = new ImportExportOperationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedImportExportOperationResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedImportExportOperationResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedImportExportOperationResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedImportExportOperationResultInner.innerProperties + = ImportExportOperationResultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportExportOperationResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java index 6f7d97d89474a..16703add607e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java @@ -5,81 +5,80 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointConnectionRequestStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** Contains the operation result properties for import/export operation. */ +/** + * Contains the operation result properties for import/export operation. + */ @Immutable -public final class ImportExportOperationResultProperties { +public final class ImportExportOperationResultProperties + implements JsonSerializable { /* * Request Id. */ - @JsonProperty(value = "requestId", access = JsonProperty.Access.WRITE_ONLY) private UUID requestId; /* * Request type. */ - @JsonProperty(value = "requestType", access = JsonProperty.Access.WRITE_ONLY) private String requestType; /* * Queued time. */ - @JsonProperty(value = "queuedTime", access = JsonProperty.Access.WRITE_ONLY) private String queuedTime; /* * Last modified time. */ - @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) private String lastModifiedTime; /* * Blob Uri. */ - @JsonProperty(value = "blobUri", access = JsonProperty.Access.WRITE_ONLY) private String blobUri; /* * Server name. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * Database name. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * Operation status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; /* * Error message. */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; /* * Gets the status of private endpoints associated with this request. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of ImportExportOperationResultProperties class. */ + /** + * Creates an instance of ImportExportOperationResultProperties class. + */ public ImportExportOperationResultProperties() { } /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -88,7 +87,7 @@ public UUID requestId() { /** * Get the requestType property: Request type. - * + * * @return the requestType value. */ public String requestType() { @@ -97,7 +96,7 @@ public String requestType() { /** * Get the queuedTime property: Queued time. - * + * * @return the queuedTime value. */ public String queuedTime() { @@ -106,7 +105,7 @@ public String queuedTime() { /** * Get the lastModifiedTime property: Last modified time. - * + * * @return the lastModifiedTime value. */ public String lastModifiedTime() { @@ -115,7 +114,7 @@ public String lastModifiedTime() { /** * Get the blobUri property: Blob Uri. - * + * * @return the blobUri value. */ public String blobUri() { @@ -124,7 +123,7 @@ public String blobUri() { /** * Get the serverName property: Server name. - * + * * @return the serverName value. */ public String serverName() { @@ -133,7 +132,7 @@ public String serverName() { /** * Get the databaseName property: Database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -142,7 +141,7 @@ public String databaseName() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -151,7 +150,7 @@ public String status() { /** * Get the errorMessage property: Error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -160,7 +159,7 @@ public String errorMessage() { /** * Get the privateEndpointConnections property: Gets the status of private endpoints associated with this request. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -169,7 +168,7 @@ public List privateEndpointConnections() /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -177,4 +176,62 @@ public void validate() { privateEndpointConnections().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExportOperationResultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExportOperationResultProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportExportOperationResultProperties. + */ + public static ImportExportOperationResultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExportOperationResultProperties deserializedImportExportOperationResultProperties + = new ImportExportOperationResultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requestId".equals(fieldName)) { + deserializedImportExportOperationResultProperties.requestId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("requestType".equals(fieldName)) { + deserializedImportExportOperationResultProperties.requestType = reader.getString(); + } else if ("queuedTime".equals(fieldName)) { + deserializedImportExportOperationResultProperties.queuedTime = reader.getString(); + } else if ("lastModifiedTime".equals(fieldName)) { + deserializedImportExportOperationResultProperties.lastModifiedTime = reader.getString(); + } else if ("blobUri".equals(fieldName)) { + deserializedImportExportOperationResultProperties.blobUri = reader.getString(); + } else if ("serverName".equals(fieldName)) { + deserializedImportExportOperationResultProperties.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedImportExportOperationResultProperties.databaseName = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedImportExportOperationResultProperties.status = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedImportExportOperationResultProperties.errorMessage = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionRequestStatus.fromJson(reader1)); + deserializedImportExportOperationResultProperties.privateEndpointConnections + = privateEndpointConnections; + } else { + reader.skipChildren(); + } + } + + return deserializedImportExportOperationResultProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java index c9c74a01b9843..8eeba3a6ddc54 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java @@ -6,39 +6,90 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.ManagedInstancePairInfo; import com.azure.resourcemanager.sql.models.PartnerRegionInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** An instance failover group. */ +/** + * An instance failover group. + */ @Fluent public final class InstanceFailoverGroupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private InstanceFailoverGroupProperties innerProperties; - /** Creates an instance of InstanceFailoverGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of InstanceFailoverGroupInner class. + */ public InstanceFailoverGroupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private InstanceFailoverGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -47,7 +98,7 @@ public InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the InstanceFailoverGroupInner object itself. */ @@ -61,7 +112,7 @@ public InstanceFailoverGroupInner withReadWriteEndpoint(InstanceFailoverGroupRea /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -70,7 +121,7 @@ public InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the InstanceFailoverGroupInner object itself. */ @@ -84,7 +135,7 @@ public InstanceFailoverGroupInner withReadOnlyEndpoint(InstanceFailoverGroupRead /** * Get the replicationRole property: Local replication role of the failover group instance. - * + * * @return the replicationRole value. */ public InstanceFailoverGroupReplicationRole replicationRole() { @@ -93,7 +144,7 @@ public InstanceFailoverGroupReplicationRole replicationRole() { /** * Get the replicationState property: Replication state of the failover group instance. - * + * * @return the replicationState value. */ public String replicationState() { @@ -102,7 +153,7 @@ public String replicationState() { /** * Get the partnerRegions property: Partner region information for the failover group. - * + * * @return the partnerRegions value. */ public List partnerRegions() { @@ -111,7 +162,7 @@ public List partnerRegions() { /** * Set the partnerRegions property: Partner region information for the failover group. - * + * * @param partnerRegions the partnerRegions value to set. * @return the InstanceFailoverGroupInner object itself. */ @@ -125,7 +176,7 @@ public InstanceFailoverGroupInner withPartnerRegions(List par /** * Get the managedInstancePairs property: List of managed instance pairs in the failover group. - * + * * @return the managedInstancePairs value. */ public List managedInstancePairs() { @@ -134,7 +185,7 @@ public List managedInstancePairs() { /** * Set the managedInstancePairs property: List of managed instance pairs in the failover group. - * + * * @param managedInstancePairs the managedInstancePairs value to set. * @return the InstanceFailoverGroupInner object itself. */ @@ -148,7 +199,7 @@ public InstanceFailoverGroupInner withManagedInstancePairs(List { + InstanceFailoverGroupInner deserializedInstanceFailoverGroupInner = new InstanceFailoverGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInstanceFailoverGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInstanceFailoverGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInstanceFailoverGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedInstanceFailoverGroupInner.innerProperties + = InstanceFailoverGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInstanceFailoverGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java index 4b67493d3281b..6b08f9b048e36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java @@ -6,60 +6,62 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.ManagedInstancePairInfo; import com.azure.resourcemanager.sql.models.PartnerRegionInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a instance failover group. */ +/** + * Properties of a instance failover group. + */ @Fluent -public final class InstanceFailoverGroupProperties { +public final class InstanceFailoverGroupProperties implements JsonSerializable { /* * Read-write endpoint of the failover group instance. */ - @JsonProperty(value = "readWriteEndpoint", required = true) private InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint; /* * Read-only endpoint of the failover group instance. */ - @JsonProperty(value = "readOnlyEndpoint") private InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint; /* * Local replication role of the failover group instance. */ - @JsonProperty(value = "replicationRole", access = JsonProperty.Access.WRITE_ONLY) private InstanceFailoverGroupReplicationRole replicationRole; /* * Replication state of the failover group instance. */ - @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY) private String replicationState; /* * Partner region information for the failover group. */ - @JsonProperty(value = "partnerRegions", required = true) private List partnerRegions; /* * List of managed instance pairs in the failover group. */ - @JsonProperty(value = "managedInstancePairs", required = true) private List managedInstancePairs; - /** Creates an instance of InstanceFailoverGroupProperties class. */ + /** + * Creates an instance of InstanceFailoverGroupProperties class. + */ public InstanceFailoverGroupProperties() { } /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -68,19 +70,19 @@ public InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the InstanceFailoverGroupProperties object itself. */ - public InstanceFailoverGroupProperties withReadWriteEndpoint( - InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint) { + public InstanceFailoverGroupProperties + withReadWriteEndpoint(InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint) { this.readWriteEndpoint = readWriteEndpoint; return this; } /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -89,19 +91,19 @@ public InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the InstanceFailoverGroupProperties object itself. */ - public InstanceFailoverGroupProperties withReadOnlyEndpoint( - InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint) { + public InstanceFailoverGroupProperties + withReadOnlyEndpoint(InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint) { this.readOnlyEndpoint = readOnlyEndpoint; return this; } /** * Get the replicationRole property: Local replication role of the failover group instance. - * + * * @return the replicationRole value. */ public InstanceFailoverGroupReplicationRole replicationRole() { @@ -110,7 +112,7 @@ public InstanceFailoverGroupReplicationRole replicationRole() { /** * Get the replicationState property: Replication state of the failover group instance. - * + * * @return the replicationState value. */ public String replicationState() { @@ -119,7 +121,7 @@ public String replicationState() { /** * Get the partnerRegions property: Partner region information for the failover group. - * + * * @return the partnerRegions value. */ public List partnerRegions() { @@ -128,7 +130,7 @@ public List partnerRegions() { /** * Set the partnerRegions property: Partner region information for the failover group. - * + * * @param partnerRegions the partnerRegions value to set. * @return the InstanceFailoverGroupProperties object itself. */ @@ -139,7 +141,7 @@ public InstanceFailoverGroupProperties withPartnerRegions(List managedInstancePairs() { @@ -148,27 +150,26 @@ public List managedInstancePairs() { /** * Set the managedInstancePairs property: List of managed instance pairs in the failover group. - * + * * @param managedInstancePairs the managedInstancePairs value to set. * @return the InstanceFailoverGroupProperties object itself. */ - public InstanceFailoverGroupProperties withManagedInstancePairs( - List managedInstancePairs) { + public InstanceFailoverGroupProperties + withManagedInstancePairs(List managedInstancePairs) { this.managedInstancePairs = managedInstancePairs; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (readWriteEndpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property readWriteEndpoint in model InstanceFailoverGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property readWriteEndpoint in model InstanceFailoverGroupProperties")); } else { readWriteEndpoint().validate(); } @@ -176,22 +177,80 @@ public void validate() { readOnlyEndpoint().validate(); } if (partnerRegions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property partnerRegions in model InstanceFailoverGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property partnerRegions in model InstanceFailoverGroupProperties")); } else { partnerRegions().forEach(e -> e.validate()); } if (managedInstancePairs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property managedInstancePairs in model InstanceFailoverGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedInstancePairs in model InstanceFailoverGroupProperties")); } else { managedInstancePairs().forEach(e -> e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(InstanceFailoverGroupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("readWriteEndpoint", this.readWriteEndpoint); + jsonWriter.writeArrayField("partnerRegions", this.partnerRegions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("managedInstancePairs", this.managedInstancePairs, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstanceFailoverGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstanceFailoverGroupProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InstanceFailoverGroupProperties. + */ + public static InstanceFailoverGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstanceFailoverGroupProperties deserializedInstanceFailoverGroupProperties + = new InstanceFailoverGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("readWriteEndpoint".equals(fieldName)) { + deserializedInstanceFailoverGroupProperties.readWriteEndpoint + = InstanceFailoverGroupReadWriteEndpoint.fromJson(reader); + } else if ("partnerRegions".equals(fieldName)) { + List partnerRegions + = reader.readArray(reader1 -> PartnerRegionInfo.fromJson(reader1)); + deserializedInstanceFailoverGroupProperties.partnerRegions = partnerRegions; + } else if ("managedInstancePairs".equals(fieldName)) { + List managedInstancePairs + = reader.readArray(reader1 -> ManagedInstancePairInfo.fromJson(reader1)); + deserializedInstanceFailoverGroupProperties.managedInstancePairs = managedInstancePairs; + } else if ("readOnlyEndpoint".equals(fieldName)) { + deserializedInstanceFailoverGroupProperties.readOnlyEndpoint + = InstanceFailoverGroupReadOnlyEndpoint.fromJson(reader); + } else if ("replicationRole".equals(fieldName)) { + deserializedInstanceFailoverGroupProperties.replicationRole + = InstanceFailoverGroupReplicationRole.fromString(reader.getString()); + } else if ("replicationState".equals(fieldName)) { + deserializedInstanceFailoverGroupProperties.replicationState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstanceFailoverGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java index 7cda8bc25901f..ef960f4f60f20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java @@ -6,33 +6,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.InstancePoolLicenseType; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** An Azure SQL instance pool. */ +/** + * An Azure SQL instance pool. + */ @Fluent public final class InstancePoolInner extends Resource { /* * The name and tier of the SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource properties. */ - @JsonProperty(value = "properties") private InstancePoolProperties innerProperties; - /** Creates an instance of InstancePoolInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of InstancePoolInner class. + */ public InstancePoolInner() { } /** * Get the sku property: The name and tier of the SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -41,7 +61,7 @@ public Sku sku() { /** * Set the sku property: The name and tier of the SKU. - * + * * @param sku the sku value to set. * @return the InstancePoolInner object itself. */ @@ -52,21 +72,55 @@ public InstancePoolInner withSku(Sku sku) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private InstancePoolProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public InstancePoolInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InstancePoolInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +129,7 @@ public InstancePoolInner withTags(Map tags) { /** * Get the subnetId property: Resource ID of the subnet to place this instance pool in. - * + * * @return the subnetId value. */ public String subnetId() { @@ -84,7 +138,7 @@ public String subnetId() { /** * Set the subnetId property: Resource ID of the subnet to place this instance pool in. - * + * * @param subnetId the subnetId value to set. * @return the InstancePoolInner object itself. */ @@ -98,7 +152,7 @@ public InstancePoolInner withSubnetId(String subnetId) { /** * Get the vCores property: Count of vCores belonging to this instance pool. - * + * * @return the vCores value. */ public Integer vCores() { @@ -107,7 +161,7 @@ public Integer vCores() { /** * Set the vCores property: Count of vCores belonging to this instance pool. - * + * * @param vCores the vCores value to set. * @return the InstancePoolInner object itself. */ @@ -122,7 +176,7 @@ public InstancePoolInner withVCores(Integer vCores) { /** * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is * included) and 'BasePrice' (without SQL license price). - * + * * @return the licenseType value. */ public InstancePoolLicenseType licenseType() { @@ -132,7 +186,7 @@ public InstancePoolLicenseType licenseType() { /** * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is * included) and 'BasePrice' (without SQL license price). - * + * * @param licenseType the licenseType value to set. * @return the InstancePoolInner object itself. */ @@ -146,7 +200,7 @@ public InstancePoolInner withLicenseType(InstancePoolLicenseType licenseType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -157,4 +211,57 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InstancePoolInner. + */ + public static InstancePoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolInner deserializedInstancePoolInner = new InstancePoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInstancePoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInstancePoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInstancePoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInstancePoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInstancePoolInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedInstancePoolInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedInstancePoolInner.innerProperties = InstancePoolProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java index 4a766490560e4..b3be3a41ff979 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java @@ -6,38 +6,43 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.InstancePoolLicenseType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of an instance pool. */ +/** + * Properties of an instance pool. + */ @Fluent -public final class InstancePoolProperties { +public final class InstancePoolProperties implements JsonSerializable { /* * Resource ID of the subnet to place this instance pool in. */ - @JsonProperty(value = "subnetId", required = true) private String subnetId; /* * Count of vCores belonging to this instance pool. */ - @JsonProperty(value = "vCores", required = true) private int vCores; /* * The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' * (without SQL license price). */ - @JsonProperty(value = "licenseType", required = true) private InstancePoolLicenseType licenseType; - /** Creates an instance of InstancePoolProperties class. */ + /** + * Creates an instance of InstancePoolProperties class. + */ public InstancePoolProperties() { } /** * Get the subnetId property: Resource ID of the subnet to place this instance pool in. - * + * * @return the subnetId value. */ public String subnetId() { @@ -46,7 +51,7 @@ public String subnetId() { /** * Set the subnetId property: Resource ID of the subnet to place this instance pool in. - * + * * @param subnetId the subnetId value to set. * @return the InstancePoolProperties object itself. */ @@ -57,7 +62,7 @@ public InstancePoolProperties withSubnetId(String subnetId) { /** * Get the vCores property: Count of vCores belonging to this instance pool. - * + * * @return the vCores value. */ public int vCores() { @@ -66,7 +71,7 @@ public int vCores() { /** * Set the vCores property: Count of vCores belonging to this instance pool. - * + * * @param vCores the vCores value to set. * @return the InstancePoolProperties object itself. */ @@ -78,7 +83,7 @@ public InstancePoolProperties withVCores(int vCores) { /** * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is * included) and 'BasePrice' (without SQL license price). - * + * * @return the licenseType value. */ public InstancePoolLicenseType licenseType() { @@ -88,7 +93,7 @@ public InstancePoolLicenseType licenseType() { /** * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is * included) and 'BasePrice' (without SQL license price). - * + * * @param licenseType the licenseType value to set. * @return the InstancePoolProperties object itself. */ @@ -99,22 +104,65 @@ public InstancePoolProperties withLicenseType(InstancePoolLicenseType licenseTyp /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (subnetId() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property subnetId in model InstancePoolProperties")); } if (licenseType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property licenseType in model InstancePoolProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property licenseType in model InstancePoolProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(InstancePoolProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeIntField("vCores", this.vCores); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InstancePoolProperties. + */ + public static InstancePoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolProperties deserializedInstancePoolProperties = new InstancePoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subnetId".equals(fieldName)) { + deserializedInstancePoolProperties.subnetId = reader.getString(); + } else if ("vCores".equals(fieldName)) { + deserializedInstancePoolProperties.vCores = reader.getInt(); + } else if ("licenseType".equals(fieldName)) { + deserializedInstancePoolProperties.licenseType + = InstancePoolLicenseType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentInner.java index 080eb461504da..16fffaad3132d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentInner.java @@ -6,33 +6,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobAgentState; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** An Azure SQL job agent. */ +/** + * An Azure SQL job agent. + */ @Fluent public final class JobAgentInner extends Resource { /* * The name and tier of the SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource properties. */ - @JsonProperty(value = "properties") private JobAgentProperties innerProperties; - /** Creates an instance of JobAgentInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobAgentInner class. + */ public JobAgentInner() { } /** * Get the sku property: The name and tier of the SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -41,7 +61,7 @@ public Sku sku() { /** * Set the sku property: The name and tier of the SKU. - * + * * @param sku the sku value to set. * @return the JobAgentInner object itself. */ @@ -52,21 +72,55 @@ public JobAgentInner withSku(Sku sku) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobAgentProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public JobAgentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobAgentInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +129,7 @@ public JobAgentInner withTags(Map tags) { /** * Get the databaseId property: Resource ID of the database to store job metadata in. - * + * * @return the databaseId value. */ public String databaseId() { @@ -84,7 +138,7 @@ public String databaseId() { /** * Set the databaseId property: Resource ID of the database to store job metadata in. - * + * * @param databaseId the databaseId value to set. * @return the JobAgentInner object itself. */ @@ -98,7 +152,7 @@ public JobAgentInner withDatabaseId(String databaseId) { /** * Get the state property: The state of the job agent. - * + * * @return the state value. */ public JobAgentState state() { @@ -107,7 +161,7 @@ public JobAgentState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -118,4 +172,57 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobAgentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobAgentInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobAgentInner. + */ + public static JobAgentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobAgentInner deserializedJobAgentInner = new JobAgentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobAgentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobAgentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobAgentInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedJobAgentInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedJobAgentInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedJobAgentInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedJobAgentInner.innerProperties = JobAgentProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobAgentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java index 8fb11c54b2be2..7f2e7d1154585 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java @@ -6,31 +6,37 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobAgentState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a job agent. */ +/** + * Properties of a job agent. + */ @Fluent -public final class JobAgentProperties { +public final class JobAgentProperties implements JsonSerializable { /* * Resource ID of the database to store job metadata in. */ - @JsonProperty(value = "databaseId", required = true) private String databaseId; /* * The state of the job agent. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private JobAgentState state; - /** Creates an instance of JobAgentProperties class. */ + /** + * Creates an instance of JobAgentProperties class. + */ public JobAgentProperties() { } /** * Get the databaseId property: Resource ID of the database to store job metadata in. - * + * * @return the databaseId value. */ public String databaseId() { @@ -39,7 +45,7 @@ public String databaseId() { /** * Set the databaseId property: Resource ID of the database to store job metadata in. - * + * * @param databaseId the databaseId value to set. * @return the JobAgentProperties object itself. */ @@ -50,7 +56,7 @@ public JobAgentProperties withDatabaseId(String databaseId) { /** * Get the state property: The state of the job agent. - * + * * @return the state value. */ public JobAgentState state() { @@ -59,16 +65,54 @@ public JobAgentState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (databaseId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property databaseId in model JobAgentProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property databaseId in model JobAgentProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(JobAgentProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("databaseId", this.databaseId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobAgentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobAgentProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobAgentProperties. + */ + public static JobAgentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobAgentProperties deserializedJobAgentProperties = new JobAgentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseId".equals(fieldName)) { + deserializedJobAgentProperties.databaseId = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedJobAgentProperties.state = JobAgentState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedJobAgentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java index a62d639f7606d..e1253e8782a94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A stored credential that can be used by a job to connect to target databases. */ +/** + * A stored credential that can be used by a job to connect to target databases. + */ @Fluent public final class JobCredentialInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private JobCredentialProperties innerProperties; - /** Creates an instance of JobCredentialInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobCredentialInner class. + */ public JobCredentialInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobCredentialProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the username property: The credential user name. - * + * * @return the username value. */ public String username() { @@ -41,7 +92,7 @@ public String username() { /** * Set the username property: The credential user name. - * + * * @param username the username value to set. * @return the JobCredentialInner object itself. */ @@ -55,7 +106,7 @@ public JobCredentialInner withUsername(String username) { /** * Get the password property: The credential password. - * + * * @return the password value. */ public String password() { @@ -64,7 +115,7 @@ public String password() { /** * Set the password property: The credential password. - * + * * @param password the password value to set. * @return the JobCredentialInner object itself. */ @@ -78,7 +129,7 @@ public JobCredentialInner withPassword(String password) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -86,4 +137,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobCredentialInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobCredentialInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobCredentialInner. + */ + public static JobCredentialInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobCredentialInner deserializedJobCredentialInner = new JobCredentialInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobCredentialInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobCredentialInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobCredentialInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJobCredentialInner.innerProperties = JobCredentialProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobCredentialInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java index 4d80b75705f58..5a8bbf6454e48 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java @@ -6,30 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a job credential. */ +/** + * Properties of a job credential. + */ @Fluent -public final class JobCredentialProperties { +public final class JobCredentialProperties implements JsonSerializable { /* * The credential user name. */ - @JsonProperty(value = "username", required = true) private String username; /* * The credential password. */ - @JsonProperty(value = "password", required = true) private String password; - /** Creates an instance of JobCredentialProperties class. */ + /** + * Creates an instance of JobCredentialProperties class. + */ public JobCredentialProperties() { } /** * Get the username property: The credential user name. - * + * * @return the username value. */ public String username() { @@ -38,7 +44,7 @@ public String username() { /** * Set the username property: The credential user name. - * + * * @param username the username value to set. * @return the JobCredentialProperties object itself. */ @@ -49,7 +55,7 @@ public JobCredentialProperties withUsername(String username) { /** * Get the password property: The credential password. - * + * * @return the password value. */ public String password() { @@ -58,7 +64,7 @@ public String password() { /** * Set the password property: The credential password. - * + * * @param password the password value to set. * @return the JobCredentialProperties object itself. */ @@ -69,23 +75,61 @@ public JobCredentialProperties withPassword(String password) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (username() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property username in model JobCredentialProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model JobCredentialProperties")); } if (password() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property password in model JobCredentialProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property password in model JobCredentialProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(JobCredentialProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobCredentialProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobCredentialProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobCredentialProperties. + */ + public static JobCredentialProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobCredentialProperties deserializedJobCredentialProperties = new JobCredentialProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedJobCredentialProperties.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedJobCredentialProperties.password = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobCredentialProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java index a36eec831402f..baead7958ef68 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java @@ -6,38 +6,89 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobExecutionLifecycle; import com.azure.resourcemanager.sql.models.JobExecutionTarget; import com.azure.resourcemanager.sql.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; -/** An execution of a job. */ +/** + * An execution of a job. + */ @Fluent public final class JobExecutionInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private JobExecutionProperties innerProperties; - /** Creates an instance of JobExecutionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobExecutionInner class. + */ public JobExecutionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobExecutionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the jobVersion property: The job version number. - * + * * @return the jobVersion value. */ public Integer jobVersion() { @@ -46,7 +97,7 @@ public Integer jobVersion() { /** * Get the stepName property: The job step name. - * + * * @return the stepName value. */ public String stepName() { @@ -55,7 +106,7 @@ public String stepName() { /** * Get the stepId property: The job step id. - * + * * @return the stepId value. */ public Integer stepId() { @@ -64,7 +115,7 @@ public Integer stepId() { /** * Get the jobExecutionId property: The unique identifier of the job execution. - * + * * @return the jobExecutionId value. */ public UUID jobExecutionId() { @@ -73,7 +124,7 @@ public UUID jobExecutionId() { /** * Get the lifecycle property: The detailed state of the job execution. - * + * * @return the lifecycle value. */ public JobExecutionLifecycle lifecycle() { @@ -82,7 +133,7 @@ public JobExecutionLifecycle lifecycle() { /** * Get the provisioningState property: The ARM provisioning state of the job execution. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -91,7 +142,7 @@ public ProvisioningState provisioningState() { /** * Get the createTime property: The time that the job execution was created. - * + * * @return the createTime value. */ public OffsetDateTime createTime() { @@ -100,7 +151,7 @@ public OffsetDateTime createTime() { /** * Get the startTime property: The time that the job execution started. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -109,7 +160,7 @@ public OffsetDateTime startTime() { /** * Get the endTime property: The time that the job execution completed. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -118,7 +169,7 @@ public OffsetDateTime endTime() { /** * Get the currentAttempts property: Number of times the job execution has been attempted. - * + * * @return the currentAttempts value. */ public Integer currentAttempts() { @@ -127,7 +178,7 @@ public Integer currentAttempts() { /** * Set the currentAttempts property: Number of times the job execution has been attempted. - * + * * @param currentAttempts the currentAttempts value to set. * @return the JobExecutionInner object itself. */ @@ -141,7 +192,7 @@ public JobExecutionInner withCurrentAttempts(Integer currentAttempts) { /** * Get the currentAttemptStartTime property: Start time of the current attempt. - * + * * @return the currentAttemptStartTime value. */ public OffsetDateTime currentAttemptStartTime() { @@ -150,7 +201,7 @@ public OffsetDateTime currentAttemptStartTime() { /** * Get the lastMessage property: The last status or error message. - * + * * @return the lastMessage value. */ public String lastMessage() { @@ -159,7 +210,7 @@ public String lastMessage() { /** * Get the target property: The target that this execution is executed on. - * + * * @return the target value. */ public JobExecutionTarget target() { @@ -168,7 +219,7 @@ public JobExecutionTarget target() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -176,4 +227,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobExecutionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobExecutionInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobExecutionInner. + */ + public static JobExecutionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobExecutionInner deserializedJobExecutionInner = new JobExecutionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobExecutionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobExecutionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobExecutionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJobExecutionInner.innerProperties = JobExecutionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobExecutionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java index bcbc4d6dbf062..4060ca9352ea0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java @@ -5,101 +5,97 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobExecutionLifecycle; import com.azure.resourcemanager.sql.models.JobExecutionTarget; import com.azure.resourcemanager.sql.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; -/** Properties for an Azure SQL Database Elastic job execution. */ +/** + * Properties for an Azure SQL Database Elastic job execution. + */ @Fluent -public final class JobExecutionProperties { +public final class JobExecutionProperties implements JsonSerializable { /* * The job version number. */ - @JsonProperty(value = "jobVersion", access = JsonProperty.Access.WRITE_ONLY) private Integer jobVersion; /* * The job step name. */ - @JsonProperty(value = "stepName", access = JsonProperty.Access.WRITE_ONLY) private String stepName; /* * The job step id. */ - @JsonProperty(value = "stepId", access = JsonProperty.Access.WRITE_ONLY) private Integer stepId; /* * The unique identifier of the job execution. */ - @JsonProperty(value = "jobExecutionId", access = JsonProperty.Access.WRITE_ONLY) private UUID jobExecutionId; /* * The detailed state of the job execution. */ - @JsonProperty(value = "lifecycle", access = JsonProperty.Access.WRITE_ONLY) private JobExecutionLifecycle lifecycle; /* * The ARM provisioning state of the job execution. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * The time that the job execution was created. */ - @JsonProperty(value = "createTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createTime; /* * The time that the job execution started. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The time that the job execution completed. */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime endTime; /* * Number of times the job execution has been attempted. */ - @JsonProperty(value = "currentAttempts") private Integer currentAttempts; /* * Start time of the current attempt. */ - @JsonProperty(value = "currentAttemptStartTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime currentAttemptStartTime; /* * The last status or error message. */ - @JsonProperty(value = "lastMessage", access = JsonProperty.Access.WRITE_ONLY) private String lastMessage; /* * The target that this execution is executed on. */ - @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) private JobExecutionTarget target; - /** Creates an instance of JobExecutionProperties class. */ + /** + * Creates an instance of JobExecutionProperties class. + */ public JobExecutionProperties() { } /** * Get the jobVersion property: The job version number. - * + * * @return the jobVersion value. */ public Integer jobVersion() { @@ -108,7 +104,7 @@ public Integer jobVersion() { /** * Get the stepName property: The job step name. - * + * * @return the stepName value. */ public String stepName() { @@ -117,7 +113,7 @@ public String stepName() { /** * Get the stepId property: The job step id. - * + * * @return the stepId value. */ public Integer stepId() { @@ -126,7 +122,7 @@ public Integer stepId() { /** * Get the jobExecutionId property: The unique identifier of the job execution. - * + * * @return the jobExecutionId value. */ public UUID jobExecutionId() { @@ -135,7 +131,7 @@ public UUID jobExecutionId() { /** * Get the lifecycle property: The detailed state of the job execution. - * + * * @return the lifecycle value. */ public JobExecutionLifecycle lifecycle() { @@ -144,7 +140,7 @@ public JobExecutionLifecycle lifecycle() { /** * Get the provisioningState property: The ARM provisioning state of the job execution. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -153,7 +149,7 @@ public ProvisioningState provisioningState() { /** * Get the createTime property: The time that the job execution was created. - * + * * @return the createTime value. */ public OffsetDateTime createTime() { @@ -162,7 +158,7 @@ public OffsetDateTime createTime() { /** * Get the startTime property: The time that the job execution started. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -171,7 +167,7 @@ public OffsetDateTime startTime() { /** * Get the endTime property: The time that the job execution completed. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -180,7 +176,7 @@ public OffsetDateTime endTime() { /** * Get the currentAttempts property: Number of times the job execution has been attempted. - * + * * @return the currentAttempts value. */ public Integer currentAttempts() { @@ -189,7 +185,7 @@ public Integer currentAttempts() { /** * Set the currentAttempts property: Number of times the job execution has been attempted. - * + * * @param currentAttempts the currentAttempts value to set. * @return the JobExecutionProperties object itself. */ @@ -200,7 +196,7 @@ public JobExecutionProperties withCurrentAttempts(Integer currentAttempts) { /** * Get the currentAttemptStartTime property: Start time of the current attempt. - * + * * @return the currentAttemptStartTime value. */ public OffsetDateTime currentAttemptStartTime() { @@ -209,7 +205,7 @@ public OffsetDateTime currentAttemptStartTime() { /** * Get the lastMessage property: The last status or error message. - * + * * @return the lastMessage value. */ public String lastMessage() { @@ -218,7 +214,7 @@ public String lastMessage() { /** * Get the target property: The target that this execution is executed on. - * + * * @return the target value. */ public JobExecutionTarget target() { @@ -227,7 +223,7 @@ public JobExecutionTarget target() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -235,4 +231,70 @@ public void validate() { target().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("currentAttempts", this.currentAttempts); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobExecutionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobExecutionProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobExecutionProperties. + */ + public static JobExecutionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobExecutionProperties deserializedJobExecutionProperties = new JobExecutionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("jobVersion".equals(fieldName)) { + deserializedJobExecutionProperties.jobVersion = reader.getNullable(JsonReader::getInt); + } else if ("stepName".equals(fieldName)) { + deserializedJobExecutionProperties.stepName = reader.getString(); + } else if ("stepId".equals(fieldName)) { + deserializedJobExecutionProperties.stepId = reader.getNullable(JsonReader::getInt); + } else if ("jobExecutionId".equals(fieldName)) { + deserializedJobExecutionProperties.jobExecutionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("lifecycle".equals(fieldName)) { + deserializedJobExecutionProperties.lifecycle = JobExecutionLifecycle.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedJobExecutionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("createTime".equals(fieldName)) { + deserializedJobExecutionProperties.createTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startTime".equals(fieldName)) { + deserializedJobExecutionProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedJobExecutionProperties.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentAttempts".equals(fieldName)) { + deserializedJobExecutionProperties.currentAttempts = reader.getNullable(JsonReader::getInt); + } else if ("currentAttemptStartTime".equals(fieldName)) { + deserializedJobExecutionProperties.currentAttemptStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastMessage".equals(fieldName)) { + deserializedJobExecutionProperties.lastMessage = reader.getString(); + } else if ("target".equals(fieldName)) { + deserializedJobExecutionProperties.target = JobExecutionTarget.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobExecutionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobInner.java index 488ab406a8e3d..9cf7563966cab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobSchedule; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A job. */ +/** + * A job. + */ @Fluent public final class JobInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private JobProperties innerProperties; - /** Creates an instance of JobInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobInner class. + */ public JobInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the description property: User-defined description of the job. - * + * * @return the description value. */ public String description() { @@ -42,7 +93,7 @@ public String description() { /** * Set the description property: User-defined description of the job. - * + * * @param description the description value to set. * @return the JobInner object itself. */ @@ -56,7 +107,7 @@ public JobInner withDescription(String description) { /** * Get the version property: The job version number. - * + * * @return the version value. */ public Integer version() { @@ -65,7 +116,7 @@ public Integer version() { /** * Get the schedule property: Schedule properties of the job. - * + * * @return the schedule value. */ public JobSchedule schedule() { @@ -74,7 +125,7 @@ public JobSchedule schedule() { /** * Set the schedule property: Schedule properties of the job. - * + * * @param schedule the schedule value to set. * @return the JobInner object itself. */ @@ -88,7 +139,7 @@ public JobInner withSchedule(JobSchedule schedule) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -96,4 +147,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobInner. + */ + public static JobInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobInner deserializedJobInner = new JobInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJobInner.innerProperties = JobProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java index b464c481b7771..9413583d5b4a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java @@ -5,37 +5,42 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobSchedule; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a job. */ +/** + * Properties of a job. + */ @Fluent -public final class JobProperties { +public final class JobProperties implements JsonSerializable { /* * User-defined description of the job. */ - @JsonProperty(value = "description") private String description; /* * The job version number. */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private Integer version; /* * Schedule properties of the job. */ - @JsonProperty(value = "schedule") private JobSchedule schedule; - /** Creates an instance of JobProperties class. */ + /** + * Creates an instance of JobProperties class. + */ public JobProperties() { } /** * Get the description property: User-defined description of the job. - * + * * @return the description value. */ public String description() { @@ -44,7 +49,7 @@ public String description() { /** * Set the description property: User-defined description of the job. - * + * * @param description the description value to set. * @return the JobProperties object itself. */ @@ -55,7 +60,7 @@ public JobProperties withDescription(String description) { /** * Get the version property: The job version number. - * + * * @return the version value. */ public Integer version() { @@ -64,7 +69,7 @@ public Integer version() { /** * Get the schedule property: Schedule properties of the job. - * + * * @return the schedule value. */ public JobSchedule schedule() { @@ -73,7 +78,7 @@ public JobSchedule schedule() { /** * Set the schedule property: Schedule properties of the job. - * + * * @param schedule the schedule value to set. * @return the JobProperties object itself. */ @@ -84,7 +89,7 @@ public JobProperties withSchedule(JobSchedule schedule) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -92,4 +97,45 @@ public void validate() { schedule().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeJsonField("schedule", this.schedule); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobProperties. + */ + public static JobProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobProperties deserializedJobProperties = new JobProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedJobProperties.description = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedJobProperties.version = reader.getNullable(JsonReader::getInt); + } else if ("schedule".equals(fieldName)) { + deserializedJobProperties.schedule = JobSchedule.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java index a6b1387c253a9..2d1cdbcd7b45d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobStepAction; import com.azure.resourcemanager.sql.models.JobStepExecutionOptions; import com.azure.resourcemanager.sql.models.JobStepOutput; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A job step. */ +/** + * A job step. + */ @Fluent public final class JobStepInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private JobStepProperties innerProperties; - /** Creates an instance of JobStepInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobStepInner class. + */ public JobStepInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobStepProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the stepId property: The job step's index within the job. If not specified when creating the job step, it * will be created as the last step. If not specified when updating the job step, the step id is not modified. - * + * * @return the stepId value. */ public Integer stepId() { @@ -46,7 +97,7 @@ public Integer stepId() { /** * Set the stepId property: The job step's index within the job. If not specified when creating the job step, it * will be created as the last step. If not specified when updating the job step, the step id is not modified. - * + * * @param stepId the stepId value to set. * @return the JobStepInner object itself. */ @@ -60,7 +111,7 @@ public JobStepInner withStepId(Integer stepId) { /** * Get the targetGroup property: The resource ID of the target group that the job step will be executed on. - * + * * @return the targetGroup value. */ public String targetGroup() { @@ -69,7 +120,7 @@ public String targetGroup() { /** * Set the targetGroup property: The resource ID of the target group that the job step will be executed on. - * + * * @param targetGroup the targetGroup value to set. * @return the JobStepInner object itself. */ @@ -83,7 +134,7 @@ public JobStepInner withTargetGroup(String targetGroup) { /** * Get the credential property: The resource ID of the job credential that will be used to connect to the targets. - * + * * @return the credential value. */ public String credential() { @@ -92,7 +143,7 @@ public String credential() { /** * Set the credential property: The resource ID of the job credential that will be used to connect to the targets. - * + * * @param credential the credential value to set. * @return the JobStepInner object itself. */ @@ -106,7 +157,7 @@ public JobStepInner withCredential(String credential) { /** * Get the action property: The action payload of the job step. - * + * * @return the action value. */ public JobStepAction action() { @@ -115,7 +166,7 @@ public JobStepAction action() { /** * Set the action property: The action payload of the job step. - * + * * @param action the action value to set. * @return the JobStepInner object itself. */ @@ -129,7 +180,7 @@ public JobStepInner withAction(JobStepAction action) { /** * Get the output property: Output destination properties of the job step. - * + * * @return the output value. */ public JobStepOutput output() { @@ -138,7 +189,7 @@ public JobStepOutput output() { /** * Set the output property: Output destination properties of the job step. - * + * * @param output the output value to set. * @return the JobStepInner object itself. */ @@ -152,7 +203,7 @@ public JobStepInner withOutput(JobStepOutput output) { /** * Get the executionOptions property: Execution options for the job step. - * + * * @return the executionOptions value. */ public JobStepExecutionOptions executionOptions() { @@ -161,7 +212,7 @@ public JobStepExecutionOptions executionOptions() { /** * Set the executionOptions property: Execution options for the job step. - * + * * @param executionOptions the executionOptions value to set. * @return the JobStepInner object itself. */ @@ -175,7 +226,7 @@ public JobStepInner withExecutionOptions(JobStepExecutionOptions executionOption /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -183,4 +234,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobStepInner. + */ + public static JobStepInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepInner deserializedJobStepInner = new JobStepInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobStepInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobStepInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobStepInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJobStepInner.innerProperties = JobStepProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java index a31dfadd84be8..f9138ac6469ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java @@ -6,59 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobStepAction; import com.azure.resourcemanager.sql.models.JobStepExecutionOptions; import com.azure.resourcemanager.sql.models.JobStepOutput; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a job step. */ +/** + * Properties of a job step. + */ @Fluent -public final class JobStepProperties { +public final class JobStepProperties implements JsonSerializable { /* * The job step's index within the job. If not specified when creating the job step, it will be created as the last * step. If not specified when updating the job step, the step id is not modified. */ - @JsonProperty(value = "stepId") private Integer stepId; /* * The resource ID of the target group that the job step will be executed on. */ - @JsonProperty(value = "targetGroup", required = true) private String targetGroup; /* * The resource ID of the job credential that will be used to connect to the targets. */ - @JsonProperty(value = "credential", required = true) private String credential; /* * The action payload of the job step. */ - @JsonProperty(value = "action", required = true) private JobStepAction action; /* * Output destination properties of the job step. */ - @JsonProperty(value = "output") private JobStepOutput output; /* * Execution options for the job step. */ - @JsonProperty(value = "executionOptions") private JobStepExecutionOptions executionOptions; - /** Creates an instance of JobStepProperties class. */ + /** + * Creates an instance of JobStepProperties class. + */ public JobStepProperties() { } /** * Get the stepId property: The job step's index within the job. If not specified when creating the job step, it * will be created as the last step. If not specified when updating the job step, the step id is not modified. - * + * * @return the stepId value. */ public Integer stepId() { @@ -68,7 +70,7 @@ public Integer stepId() { /** * Set the stepId property: The job step's index within the job. If not specified when creating the job step, it * will be created as the last step. If not specified when updating the job step, the step id is not modified. - * + * * @param stepId the stepId value to set. * @return the JobStepProperties object itself. */ @@ -79,7 +81,7 @@ public JobStepProperties withStepId(Integer stepId) { /** * Get the targetGroup property: The resource ID of the target group that the job step will be executed on. - * + * * @return the targetGroup value. */ public String targetGroup() { @@ -88,7 +90,7 @@ public String targetGroup() { /** * Set the targetGroup property: The resource ID of the target group that the job step will be executed on. - * + * * @param targetGroup the targetGroup value to set. * @return the JobStepProperties object itself. */ @@ -99,7 +101,7 @@ public JobStepProperties withTargetGroup(String targetGroup) { /** * Get the credential property: The resource ID of the job credential that will be used to connect to the targets. - * + * * @return the credential value. */ public String credential() { @@ -108,7 +110,7 @@ public String credential() { /** * Set the credential property: The resource ID of the job credential that will be used to connect to the targets. - * + * * @param credential the credential value to set. * @return the JobStepProperties object itself. */ @@ -119,7 +121,7 @@ public JobStepProperties withCredential(String credential) { /** * Get the action property: The action payload of the job step. - * + * * @return the action value. */ public JobStepAction action() { @@ -128,7 +130,7 @@ public JobStepAction action() { /** * Set the action property: The action payload of the job step. - * + * * @param action the action value to set. * @return the JobStepProperties object itself. */ @@ -139,7 +141,7 @@ public JobStepProperties withAction(JobStepAction action) { /** * Get the output property: Output destination properties of the job step. - * + * * @return the output value. */ public JobStepOutput output() { @@ -148,7 +150,7 @@ public JobStepOutput output() { /** * Set the output property: Output destination properties of the job step. - * + * * @param output the output value to set. * @return the JobStepProperties object itself. */ @@ -159,7 +161,7 @@ public JobStepProperties withOutput(JobStepOutput output) { /** * Get the executionOptions property: Execution options for the job step. - * + * * @return the executionOptions value. */ public JobStepExecutionOptions executionOptions() { @@ -168,7 +170,7 @@ public JobStepExecutionOptions executionOptions() { /** * Set the executionOptions property: Execution options for the job step. - * + * * @param executionOptions the executionOptions value to set. * @return the JobStepProperties object itself. */ @@ -179,24 +181,21 @@ public JobStepProperties withExecutionOptions(JobStepExecutionOptions executionO /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (targetGroup() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targetGroup in model JobStepProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property targetGroup in model JobStepProperties")); } if (credential() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property credential in model JobStepProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credential in model JobStepProperties")); } if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property action in model JobStepProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property action in model JobStepProperties")); } else { action().validate(); } @@ -209,4 +208,56 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(JobStepProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetGroup", this.targetGroup); + jsonWriter.writeStringField("credential", this.credential); + jsonWriter.writeJsonField("action", this.action); + jsonWriter.writeNumberField("stepId", this.stepId); + jsonWriter.writeJsonField("output", this.output); + jsonWriter.writeJsonField("executionOptions", this.executionOptions); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobStepProperties. + */ + public static JobStepProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepProperties deserializedJobStepProperties = new JobStepProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetGroup".equals(fieldName)) { + deserializedJobStepProperties.targetGroup = reader.getString(); + } else if ("credential".equals(fieldName)) { + deserializedJobStepProperties.credential = reader.getString(); + } else if ("action".equals(fieldName)) { + deserializedJobStepProperties.action = JobStepAction.fromJson(reader); + } else if ("stepId".equals(fieldName)) { + deserializedJobStepProperties.stepId = reader.getNullable(JsonReader::getInt); + } else if ("output".equals(fieldName)) { + deserializedJobStepProperties.output = JobStepOutput.fromJson(reader); + } else if ("executionOptions".equals(fieldName)) { + deserializedJobStepProperties.executionOptions = JobStepExecutionOptions.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java index b8bcfdecc41ce..5fc1861d73145 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobTarget; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A group of job targets. */ +/** + * A group of job targets. + */ @Fluent public final class JobTargetGroupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private JobTargetGroupProperties innerProperties; - /** Creates an instance of JobTargetGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobTargetGroupInner class. + */ public JobTargetGroupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private JobTargetGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the members property: Members of the target group. - * + * * @return the members value. */ public List members() { @@ -43,7 +94,7 @@ public List members() { /** * Set the members property: Members of the target group. - * + * * @param members the members value to set. * @return the JobTargetGroupInner object itself. */ @@ -57,7 +108,7 @@ public JobTargetGroupInner withMembers(List members) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -65,4 +116,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobTargetGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobTargetGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobTargetGroupInner. + */ + public static JobTargetGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobTargetGroupInner deserializedJobTargetGroupInner = new JobTargetGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobTargetGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobTargetGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobTargetGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJobTargetGroupInner.innerProperties = JobTargetGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJobTargetGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java index c08234e4e73ac..1a6a99cbd3c4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java @@ -6,26 +6,33 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.JobTarget; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of job target group. */ +/** + * Properties of job target group. + */ @Fluent -public final class JobTargetGroupProperties { +public final class JobTargetGroupProperties implements JsonSerializable { /* * Members of the target group. */ - @JsonProperty(value = "members", required = true) private List members; - /** Creates an instance of JobTargetGroupProperties class. */ + /** + * Creates an instance of JobTargetGroupProperties class. + */ public JobTargetGroupProperties() { } /** * Get the members property: Members of the target group. - * + * * @return the members value. */ public List members() { @@ -34,7 +41,7 @@ public List members() { /** * Set the members property: Members of the target group. - * + * * @param members the members value to set. * @return the JobTargetGroupProperties object itself. */ @@ -45,19 +52,56 @@ public JobTargetGroupProperties withMembers(List members) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (members() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property members in model JobTargetGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property members in model JobTargetGroupProperties")); } else { members().forEach(e -> e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(JobTargetGroupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("members", this.members, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobTargetGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobTargetGroupProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobTargetGroupProperties. + */ + public static JobTargetGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobTargetGroupProperties deserializedJobTargetGroupProperties = new JobTargetGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("members".equals(fieldName)) { + List members = reader.readArray(reader1 -> JobTarget.fromJson(reader1)); + deserializedJobTargetGroupProperties.members = members; + } else { + reader.skipChildren(); + } + } + + return deserializedJobTargetGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java index 627ed8f8e6ad5..de9a0cf26191a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java @@ -6,19 +6,112 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A job version. */ +/** + * A job version. + */ @Immutable public final class JobVersionInner extends ProxyResource { - /** Creates an instance of JobVersionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JobVersionInner class. + */ public JobVersionInner() { } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobVersionInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobVersionInner. + */ + public static JobVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobVersionInner deserializedJobVersionInner = new JobVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJobVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJobVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobVersionInner.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobVersionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java index d908707a13b6d..f54f069b93167 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Azure SQL Database ledger digest upload settings. */ +/** + * Azure SQL Database ledger digest upload settings. + */ @Fluent public final class LedgerDigestUploadsInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private LedgerDigestUploadsProperties innerProperties; - /** Creates an instance of LedgerDigestUploadsInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LedgerDigestUploadsInner class. + */ public LedgerDigestUploadsInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private LedgerDigestUploadsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage * endpoint or an URI for Azure Confidential Ledger. - * + * * @return the digestStorageEndpoint value. */ public String digestStorageEndpoint() { @@ -44,7 +95,7 @@ public String digestStorageEndpoint() { /** * Set the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage * endpoint or an URI for Azure Confidential Ledger. - * + * * @param digestStorageEndpoint the digestStorageEndpoint value to set. * @return the LedgerDigestUploadsInner object itself. */ @@ -58,7 +109,7 @@ public LedgerDigestUploadsInner withDigestStorageEndpoint(String digestStorageEn /** * Get the state property: Specifies the state of ledger digest upload. - * + * * @return the state value. */ public LedgerDigestUploadsState state() { @@ -67,7 +118,7 @@ public LedgerDigestUploadsState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -75,4 +126,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LedgerDigestUploadsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LedgerDigestUploadsInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LedgerDigestUploadsInner. + */ + public static LedgerDigestUploadsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LedgerDigestUploadsInner deserializedLedgerDigestUploadsInner = new LedgerDigestUploadsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLedgerDigestUploadsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLedgerDigestUploadsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLedgerDigestUploadsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLedgerDigestUploadsInner.innerProperties + = LedgerDigestUploadsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLedgerDigestUploadsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java index 2bf6c66dbae41..23f90cfa64945 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java @@ -5,33 +5,39 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The properties of a database ledger digest upload settings. */ +/** + * The properties of a database ledger digest upload settings. + */ @Fluent -public final class LedgerDigestUploadsProperties { +public final class LedgerDigestUploadsProperties implements JsonSerializable { /* - * The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure - * Confidential Ledger. + * The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential + * Ledger. */ - @JsonProperty(value = "digestStorageEndpoint") private String digestStorageEndpoint; /* * Specifies the state of ledger digest upload. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private LedgerDigestUploadsState state; - /** Creates an instance of LedgerDigestUploadsProperties class. */ + /** + * Creates an instance of LedgerDigestUploadsProperties class. + */ public LedgerDigestUploadsProperties() { } /** * Get the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage * endpoint or an URI for Azure Confidential Ledger. - * + * * @return the digestStorageEndpoint value. */ public String digestStorageEndpoint() { @@ -41,7 +47,7 @@ public String digestStorageEndpoint() { /** * Set the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage * endpoint or an URI for Azure Confidential Ledger. - * + * * @param digestStorageEndpoint the digestStorageEndpoint value to set. * @return the LedgerDigestUploadsProperties object itself. */ @@ -52,7 +58,7 @@ public LedgerDigestUploadsProperties withDigestStorageEndpoint(String digestStor /** * Get the state property: Specifies the state of ledger digest upload. - * + * * @return the state value. */ public LedgerDigestUploadsState state() { @@ -61,9 +67,49 @@ public LedgerDigestUploadsState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("digestStorageEndpoint", this.digestStorageEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LedgerDigestUploadsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LedgerDigestUploadsProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LedgerDigestUploadsProperties. + */ + public static LedgerDigestUploadsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LedgerDigestUploadsProperties deserializedLedgerDigestUploadsProperties + = new LedgerDigestUploadsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("digestStorageEndpoint".equals(fieldName)) { + deserializedLedgerDigestUploadsProperties.digestStorageEndpoint = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedLedgerDigestUploadsProperties.state + = LedgerDigestUploadsState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLedgerDigestUploadsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java index 7ccb21044998c..eed75e2595724 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java @@ -5,52 +5,55 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.CapabilityStatus; import com.azure.resourcemanager.sql.models.ManagedInstanceVersionCapability; import com.azure.resourcemanager.sql.models.ServerVersionCapability; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The location capability. */ +/** + * The location capability. + */ @Fluent -public final class LocationCapabilitiesInner { +public final class LocationCapabilitiesInner implements JsonSerializable { /* * The location name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported server versions. */ - @JsonProperty(value = "supportedServerVersions", access = JsonProperty.Access.WRITE_ONLY) private List supportedServerVersions; /* * The list of supported managed instance versions. */ - @JsonProperty(value = "supportedManagedInstanceVersions", access = JsonProperty.Access.WRITE_ONLY) private List supportedManagedInstanceVersions; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of LocationCapabilitiesInner class. */ + /** + * Creates an instance of LocationCapabilitiesInner class. + */ public LocationCapabilitiesInner() { } /** * Get the name property: The location name. - * + * * @return the name value. */ public String name() { @@ -59,7 +62,7 @@ public String name() { /** * Get the supportedServerVersions property: The list of supported server versions. - * + * * @return the supportedServerVersions value. */ public List supportedServerVersions() { @@ -68,7 +71,7 @@ public List supportedServerVersions() { /** * Get the supportedManagedInstanceVersions property: The list of supported managed instance versions. - * + * * @return the supportedManagedInstanceVersions value. */ public List supportedManagedInstanceVersions() { @@ -77,7 +80,7 @@ public List supportedManagedInstanceVersions() /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -86,7 +89,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -95,7 +98,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the LocationCapabilitiesInner object itself. */ @@ -106,7 +109,7 @@ public LocationCapabilitiesInner withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -117,4 +120,53 @@ public void validate() { supportedManagedInstanceVersions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationCapabilitiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationCapabilitiesInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LocationCapabilitiesInner. + */ + public static LocationCapabilitiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationCapabilitiesInner deserializedLocationCapabilitiesInner = new LocationCapabilitiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLocationCapabilitiesInner.name = reader.getString(); + } else if ("supportedServerVersions".equals(fieldName)) { + List supportedServerVersions + = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1)); + deserializedLocationCapabilitiesInner.supportedServerVersions = supportedServerVersions; + } else if ("supportedManagedInstanceVersions".equals(fieldName)) { + List supportedManagedInstanceVersions + = reader.readArray(reader1 -> ManagedInstanceVersionCapability.fromJson(reader1)); + deserializedLocationCapabilitiesInner.supportedManagedInstanceVersions + = supportedManagedInstanceVersions; + } else if ("status".equals(fieldName)) { + deserializedLocationCapabilitiesInner.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedLocationCapabilitiesInner.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLocationCapabilitiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java index 0ba13c9cd13d0..2bd1360613325 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A logical database transparent data encryption state. */ +/** + * A logical database transparent data encryption state. + */ @Fluent public final class LogicalDatabaseTransparentDataEncryptionInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private TransparentDataEncryptionProperties innerProperties; - /** Creates an instance of LogicalDatabaseTransparentDataEncryptionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LogicalDatabaseTransparentDataEncryptionInner class. + */ public LogicalDatabaseTransparentDataEncryptionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private TransparentDataEncryptionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the transparent data encryption. - * + * * @return the state value. */ public TransparentDataEncryptionState state() { @@ -42,7 +93,7 @@ public TransparentDataEncryptionState state() { /** * Set the state property: Specifies the state of the transparent data encryption. - * + * * @param state the state value to set. * @return the LogicalDatabaseTransparentDataEncryptionInner object itself. */ @@ -56,7 +107,7 @@ public LogicalDatabaseTransparentDataEncryptionInner withState(TransparentDataEn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -64,4 +115,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogicalDatabaseTransparentDataEncryptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogicalDatabaseTransparentDataEncryptionInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LogicalDatabaseTransparentDataEncryptionInner. + */ + public static LogicalDatabaseTransparentDataEncryptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogicalDatabaseTransparentDataEncryptionInner deserializedLogicalDatabaseTransparentDataEncryptionInner + = new LogicalDatabaseTransparentDataEncryptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLogicalDatabaseTransparentDataEncryptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLogicalDatabaseTransparentDataEncryptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLogicalDatabaseTransparentDataEncryptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLogicalDatabaseTransparentDataEncryptionInner.innerProperties + = TransparentDataEncryptionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLogicalDatabaseTransparentDataEncryptionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java index bb4da6e21df51..c3cbfb82e39af 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A long term retention backup. */ +/** + * A long term retention backup. + */ @Fluent public final class LongTermRetentionBackupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private LongTermRetentionBackupProperties innerProperties; - /** Creates an instance of LongTermRetentionBackupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LongTermRetentionBackupInner class. + */ public LongTermRetentionBackupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private LongTermRetentionBackupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the serverName property: The server name that the backup database belong to. - * + * * @return the serverName value. */ public String serverName() { @@ -43,7 +94,7 @@ public String serverName() { /** * Get the serverCreateTime property: The create time of the server. - * + * * @return the serverCreateTime value. */ public OffsetDateTime serverCreateTime() { @@ -52,7 +103,7 @@ public OffsetDateTime serverCreateTime() { /** * Get the databaseName property: The name of the database the backup belong to. - * + * * @return the databaseName value. */ public String databaseName() { @@ -61,7 +112,7 @@ public String databaseName() { /** * Get the databaseDeletionTime property: The delete time of the database. - * + * * @return the databaseDeletionTime value. */ public OffsetDateTime databaseDeletionTime() { @@ -70,7 +121,7 @@ public OffsetDateTime databaseDeletionTime() { /** * Get the backupTime property: The time the backup was taken. - * + * * @return the backupTime value. */ public OffsetDateTime backupTime() { @@ -79,7 +130,7 @@ public OffsetDateTime backupTime() { /** * Get the backupExpirationTime property: The time the long term retention backup will expire. - * + * * @return the backupExpirationTime value. */ public OffsetDateTime backupExpirationTime() { @@ -88,7 +139,7 @@ public OffsetDateTime backupExpirationTime() { /** * Get the backupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -97,7 +148,7 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -106,12 +157,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the LongTermRetentionBackupInner object itself. */ - public LongTermRetentionBackupInner withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public LongTermRetentionBackupInner + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new LongTermRetentionBackupProperties(); } @@ -121,7 +172,7 @@ public LongTermRetentionBackupInner withRequestedBackupStorageRedundancy( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -129,4 +180,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionBackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionBackupInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LongTermRetentionBackupInner. + */ + public static LongTermRetentionBackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionBackupInner deserializedLongTermRetentionBackupInner = new LongTermRetentionBackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLongTermRetentionBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLongTermRetentionBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLongTermRetentionBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLongTermRetentionBackupInner.innerProperties + = LongTermRetentionBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionBackupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java index 97d486647a8b6..d71e4e1d1b925 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** A LongTermRetentionBackup operation result resource. */ +/** + * A LongTermRetentionBackup operation result resource. + */ @Immutable public final class LongTermRetentionBackupOperationResultInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private LongTermRetentionOperationResultProperties innerProperties; - /** Creates an instance of LongTermRetentionBackupOperationResultInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LongTermRetentionBackupOperationResultInner class. + */ public LongTermRetentionBackupOperationResultInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private LongTermRetentionOperationResultProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -43,7 +94,7 @@ public UUID requestId() { /** * Get the operationType property: Operation type. - * + * * @return the operationType value. */ public String operationType() { @@ -52,7 +103,7 @@ public String operationType() { /** * Get the fromBackupResourceId property: Source backup resource id. - * + * * @return the fromBackupResourceId value. */ public String fromBackupResourceId() { @@ -61,7 +112,7 @@ public String fromBackupResourceId() { /** * Get the toBackupResourceId property: Target backup resource id. - * + * * @return the toBackupResourceId value. */ public String toBackupResourceId() { @@ -70,7 +121,7 @@ public String toBackupResourceId() { /** * Get the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the targetBackupStorageRedundancy value. */ public BackupStorageRedundancy targetBackupStorageRedundancy() { @@ -79,7 +130,7 @@ public BackupStorageRedundancy targetBackupStorageRedundancy() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -88,7 +139,7 @@ public String status() { /** * Get the message property: Progress message. - * + * * @return the message value. */ public String message() { @@ -97,7 +148,7 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -105,4 +156,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionBackupOperationResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionBackupOperationResultInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LongTermRetentionBackupOperationResultInner. + */ + public static LongTermRetentionBackupOperationResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionBackupOperationResultInner deserializedLongTermRetentionBackupOperationResultInner + = new LongTermRetentionBackupOperationResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLongTermRetentionBackupOperationResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLongTermRetentionBackupOperationResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLongTermRetentionBackupOperationResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLongTermRetentionBackupOperationResultInner.innerProperties + = LongTermRetentionOperationResultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionBackupOperationResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java index 82411e5541642..0fe025f137818 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java @@ -5,68 +5,69 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of a long term retention backup. */ +/** + * Properties of a long term retention backup. + */ @Fluent -public final class LongTermRetentionBackupProperties { +public final class LongTermRetentionBackupProperties implements JsonSerializable { /* * The server name that the backup database belong to. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * The create time of the server. */ - @JsonProperty(value = "serverCreateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime serverCreateTime; /* * The name of the database the backup belong to */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * The delete time of the database */ - @JsonProperty(value = "databaseDeletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime databaseDeletionTime; /* * The time the backup was taken */ - @JsonProperty(value = "backupTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime backupTime; /* * The time the long term retention backup will expire. */ - @JsonProperty(value = "backupExpirationTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime backupExpirationTime; /* * The storage redundancy type of the backup */ - @JsonProperty(value = "backupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy backupStorageRedundancy; /* * The storage redundancy type of the backup */ - @JsonProperty(value = "requestedBackupStorageRedundancy") private BackupStorageRedundancy requestedBackupStorageRedundancy; - /** Creates an instance of LongTermRetentionBackupProperties class. */ + /** + * Creates an instance of LongTermRetentionBackupProperties class. + */ public LongTermRetentionBackupProperties() { } /** * Get the serverName property: The server name that the backup database belong to. - * + * * @return the serverName value. */ public String serverName() { @@ -75,7 +76,7 @@ public String serverName() { /** * Get the serverCreateTime property: The create time of the server. - * + * * @return the serverCreateTime value. */ public OffsetDateTime serverCreateTime() { @@ -84,7 +85,7 @@ public OffsetDateTime serverCreateTime() { /** * Get the databaseName property: The name of the database the backup belong to. - * + * * @return the databaseName value. */ public String databaseName() { @@ -93,7 +94,7 @@ public String databaseName() { /** * Get the databaseDeletionTime property: The delete time of the database. - * + * * @return the databaseDeletionTime value. */ public OffsetDateTime databaseDeletionTime() { @@ -102,7 +103,7 @@ public OffsetDateTime databaseDeletionTime() { /** * Get the backupTime property: The time the backup was taken. - * + * * @return the backupTime value. */ public OffsetDateTime backupTime() { @@ -111,7 +112,7 @@ public OffsetDateTime backupTime() { /** * Get the backupExpirationTime property: The time the long term retention backup will expire. - * + * * @return the backupExpirationTime value. */ public OffsetDateTime backupExpirationTime() { @@ -120,7 +121,7 @@ public OffsetDateTime backupExpirationTime() { /** * Get the backupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -129,7 +130,7 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -138,21 +139,79 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the LongTermRetentionBackupProperties object itself. */ - public LongTermRetentionBackupProperties withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public LongTermRetentionBackupProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("requestedBackupStorageRedundancy", + this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionBackupProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LongTermRetentionBackupProperties. + */ + public static LongTermRetentionBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionBackupProperties deserializedLongTermRetentionBackupProperties + = new LongTermRetentionBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverName".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.serverName = reader.getString(); + } else if ("serverCreateTime".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.serverCreateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("databaseName".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.databaseName = reader.getString(); + } else if ("databaseDeletionTime".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.databaseDeletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupTime".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.backupTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupExpirationTime".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.backupExpirationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupStorageRedundancy".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.backupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("requestedBackupStorageRedundancy".equals(fieldName)) { + deserializedLongTermRetentionBackupProperties.requestedBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionBackupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java index 6a66fc22778ef..7a1bd1aa1bbd3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java @@ -5,62 +5,64 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** Contains the operation result properties for long term retention backup operation. */ +/** + * Contains the operation result properties for long term retention backup operation. + */ @Immutable -public final class LongTermRetentionOperationResultProperties { +public final class LongTermRetentionOperationResultProperties + implements JsonSerializable { /* * Request Id. */ - @JsonProperty(value = "requestId", access = JsonProperty.Access.WRITE_ONLY) private UUID requestId; /* * Operation type. */ - @JsonProperty(value = "operationType", access = JsonProperty.Access.WRITE_ONLY) private String operationType; /* * Source backup resource id */ - @JsonProperty(value = "fromBackupResourceId", access = JsonProperty.Access.WRITE_ONLY) private String fromBackupResourceId; /* * Target backup resource id */ - @JsonProperty(value = "toBackupResourceId", access = JsonProperty.Access.WRITE_ONLY) private String toBackupResourceId; /* * The storage redundancy type of the copied backup */ - @JsonProperty(value = "targetBackupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy targetBackupStorageRedundancy; /* * Operation status */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; /* * Progress message */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of LongTermRetentionOperationResultProperties class. */ + /** + * Creates an instance of LongTermRetentionOperationResultProperties class. + */ public LongTermRetentionOperationResultProperties() { } /** * Get the requestId property: Request Id. - * + * * @return the requestId value. */ public UUID requestId() { @@ -69,7 +71,7 @@ public UUID requestId() { /** * Get the operationType property: Operation type. - * + * * @return the operationType value. */ public String operationType() { @@ -78,7 +80,7 @@ public String operationType() { /** * Get the fromBackupResourceId property: Source backup resource id. - * + * * @return the fromBackupResourceId value. */ public String fromBackupResourceId() { @@ -87,7 +89,7 @@ public String fromBackupResourceId() { /** * Get the toBackupResourceId property: Target backup resource id. - * + * * @return the toBackupResourceId value. */ public String toBackupResourceId() { @@ -96,7 +98,7 @@ public String toBackupResourceId() { /** * Get the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the targetBackupStorageRedundancy value. */ public BackupStorageRedundancy targetBackupStorageRedundancy() { @@ -105,7 +107,7 @@ public BackupStorageRedundancy targetBackupStorageRedundancy() { /** * Get the status property: Operation status. - * + * * @return the status value. */ public String status() { @@ -114,7 +116,7 @@ public String status() { /** * Get the message property: Progress message. - * + * * @return the message value. */ public String message() { @@ -123,9 +125,59 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionOperationResultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionOperationResultProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LongTermRetentionOperationResultProperties. + */ + public static LongTermRetentionOperationResultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionOperationResultProperties deserializedLongTermRetentionOperationResultProperties + = new LongTermRetentionOperationResultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requestId".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.requestId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("operationType".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.operationType = reader.getString(); + } else if ("fromBackupResourceId".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.fromBackupResourceId = reader.getString(); + } else if ("toBackupResourceId".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.toBackupResourceId = reader.getString(); + } else if ("targetBackupStorageRedundancy".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.targetBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.status = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedLongTermRetentionOperationResultProperties.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionOperationResultProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java index 3811d463f46ab..c7ddedad02e3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A long term retention policy. */ +/** + * A long term retention policy. + */ @Fluent public final class LongTermRetentionPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private BaseLongTermRetentionPolicyProperties innerProperties; - /** Creates an instance of LongTermRetentionPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LongTermRetentionPolicyInner class. + */ public LongTermRetentionPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private BaseLongTermRetentionPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the weeklyRetention value. */ public String weeklyRetention() { @@ -41,7 +92,7 @@ public String weeklyRetention() { /** * Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param weeklyRetention the weeklyRetention value to set. * @return the LongTermRetentionPolicyInner object itself. */ @@ -55,7 +106,7 @@ public LongTermRetentionPolicyInner withWeeklyRetention(String weeklyRetention) /** * Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the monthlyRetention value. */ public String monthlyRetention() { @@ -64,7 +115,7 @@ public String monthlyRetention() { /** * Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param monthlyRetention the monthlyRetention value to set. * @return the LongTermRetentionPolicyInner object itself. */ @@ -78,7 +129,7 @@ public LongTermRetentionPolicyInner withMonthlyRetention(String monthlyRetention /** * Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the yearlyRetention value. */ public String yearlyRetention() { @@ -87,7 +138,7 @@ public String yearlyRetention() { /** * Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param yearlyRetention the yearlyRetention value to set. * @return the LongTermRetentionPolicyInner object itself. */ @@ -101,7 +152,7 @@ public LongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention) /** * Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @return the weekOfYear value. */ public Integer weekOfYear() { @@ -110,7 +161,7 @@ public Integer weekOfYear() { /** * Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @param weekOfYear the weekOfYear value to set. * @return the LongTermRetentionPolicyInner object itself. */ @@ -124,7 +175,7 @@ public LongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -132,4 +183,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionPolicyInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LongTermRetentionPolicyInner. + */ + public static LongTermRetentionPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionPolicyInner deserializedLongTermRetentionPolicyInner = new LongTermRetentionPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLongTermRetentionPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLongTermRetentionPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLongTermRetentionPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLongTermRetentionPolicyInner.innerProperties + = BaseLongTermRetentionPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java index 4d4544a346604..a9bd24541a384 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Maintenance window options. */ +/** + * Maintenance window options. + */ @Fluent public final class MaintenanceWindowOptionsInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private MaintenanceWindowOptionsProperties innerProperties; - /** Creates an instance of MaintenanceWindowOptionsInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceWindowOptionsInner class. + */ public MaintenanceWindowOptionsInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private MaintenanceWindowOptionsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the isEnabled property: Whether maintenance windows are enabled for the database. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -43,7 +94,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Whether maintenance windows are enabled for the database. - * + * * @param isEnabled the isEnabled value to set. * @return the MaintenanceWindowOptionsInner object itself. */ @@ -58,7 +109,7 @@ public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { /** * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. - * + * * @return the maintenanceWindowCycles value. */ public List maintenanceWindowCycles() { @@ -68,12 +119,12 @@ public List maintenanceWindowCycles() { /** * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. - * + * * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. * @return the MaintenanceWindowOptionsInner object itself. */ - public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( - List maintenanceWindowCycles) { + public MaintenanceWindowOptionsInner + withMaintenanceWindowCycles(List maintenanceWindowCycles) { if (this.innerProperties() == null) { this.innerProperties = new MaintenanceWindowOptionsProperties(); } @@ -83,7 +134,7 @@ public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( /** * Get the minDurationInMinutes property: Minimum duration of maintenance window. - * + * * @return the minDurationInMinutes value. */ public Integer minDurationInMinutes() { @@ -92,7 +143,7 @@ public Integer minDurationInMinutes() { /** * Set the minDurationInMinutes property: Minimum duration of maintenance window. - * + * * @param minDurationInMinutes the minDurationInMinutes value to set. * @return the MaintenanceWindowOptionsInner object itself. */ @@ -106,7 +157,7 @@ public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDuratio /** * Get the defaultDurationInMinutes property: Default duration for maintenance window. - * + * * @return the defaultDurationInMinutes value. */ public Integer defaultDurationInMinutes() { @@ -115,7 +166,7 @@ public Integer defaultDurationInMinutes() { /** * Set the defaultDurationInMinutes property: Default duration for maintenance window. - * + * * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. * @return the MaintenanceWindowOptionsInner object itself. */ @@ -129,7 +180,7 @@ public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaul /** * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * + * * @return the minCycles value. */ public Integer minCycles() { @@ -138,7 +189,7 @@ public Integer minCycles() { /** * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * + * * @param minCycles the minCycles value to set. * @return the MaintenanceWindowOptionsInner object itself. */ @@ -152,7 +203,7 @@ public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { /** * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * + * * @return the timeGranularityInMinutes value. */ public Integer timeGranularityInMinutes() { @@ -161,7 +212,7 @@ public Integer timeGranularityInMinutes() { /** * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * + * * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. * @return the MaintenanceWindowOptionsInner object itself. */ @@ -176,7 +227,7 @@ public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGr /** * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. - * + * * @return the allowMultipleMaintenanceWindowsPerCycle value. */ public Boolean allowMultipleMaintenanceWindowsPerCycle() { @@ -186,12 +237,12 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { /** * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. - * + * * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. * @return the MaintenanceWindowOptionsInner object itself. */ - public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle( - Boolean allowMultipleMaintenanceWindowsPerCycle) { + public MaintenanceWindowOptionsInner + withAllowMultipleMaintenanceWindowsPerCycle(Boolean allowMultipleMaintenanceWindowsPerCycle) { if (this.innerProperties() == null) { this.innerProperties = new MaintenanceWindowOptionsProperties(); } @@ -201,7 +252,7 @@ public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -209,4 +260,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowOptionsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowOptionsInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceWindowOptionsInner. + */ + public static MaintenanceWindowOptionsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowOptionsInner deserializedMaintenanceWindowOptionsInner + = new MaintenanceWindowOptionsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceWindowOptionsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceWindowOptionsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceWindowOptionsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceWindowOptionsInner.innerProperties + = MaintenanceWindowOptionsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowOptionsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java index 38fe97de6a800..8c495d4a5d8a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java @@ -5,62 +5,63 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Maintenance window options properties. */ +/** + * Maintenance window options properties. + */ @Fluent -public final class MaintenanceWindowOptionsProperties { +public final class MaintenanceWindowOptionsProperties implements JsonSerializable { /* * Whether maintenance windows are enabled for the database. */ - @JsonProperty(value = "isEnabled") private Boolean isEnabled; /* * Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. */ - @JsonProperty(value = "maintenanceWindowCycles") private List maintenanceWindowCycles; /* * Minimum duration of maintenance window. */ - @JsonProperty(value = "minDurationInMinutes") private Integer minDurationInMinutes; /* * Default duration for maintenance window. */ - @JsonProperty(value = "defaultDurationInMinutes") private Integer defaultDurationInMinutes; /* * Minimum number of maintenance windows cycles to be set on the database. */ - @JsonProperty(value = "minCycles") private Integer minCycles; /* * Time granularity in minutes for maintenance windows. */ - @JsonProperty(value = "timeGranularityInMinutes") private Integer timeGranularityInMinutes; /* * Whether we allow multiple maintenance windows per cycle. */ - @JsonProperty(value = "allowMultipleMaintenanceWindowsPerCycle") private Boolean allowMultipleMaintenanceWindowsPerCycle; - /** Creates an instance of MaintenanceWindowOptionsProperties class. */ + /** + * Creates an instance of MaintenanceWindowOptionsProperties class. + */ public MaintenanceWindowOptionsProperties() { } /** * Get the isEnabled property: Whether maintenance windows are enabled for the database. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -69,7 +70,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Whether maintenance windows are enabled for the database. - * + * * @param isEnabled the isEnabled value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ @@ -81,7 +82,7 @@ public MaintenanceWindowOptionsProperties withIsEnabled(Boolean isEnabled) { /** * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. - * + * * @return the maintenanceWindowCycles value. */ public List maintenanceWindowCycles() { @@ -91,19 +92,19 @@ public List maintenanceWindowCycles() { /** * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. - * + * * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ - public MaintenanceWindowOptionsProperties withMaintenanceWindowCycles( - List maintenanceWindowCycles) { + public MaintenanceWindowOptionsProperties + withMaintenanceWindowCycles(List maintenanceWindowCycles) { this.maintenanceWindowCycles = maintenanceWindowCycles; return this; } /** * Get the minDurationInMinutes property: Minimum duration of maintenance window. - * + * * @return the minDurationInMinutes value. */ public Integer minDurationInMinutes() { @@ -112,7 +113,7 @@ public Integer minDurationInMinutes() { /** * Set the minDurationInMinutes property: Minimum duration of maintenance window. - * + * * @param minDurationInMinutes the minDurationInMinutes value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ @@ -123,7 +124,7 @@ public MaintenanceWindowOptionsProperties withMinDurationInMinutes(Integer minDu /** * Get the defaultDurationInMinutes property: Default duration for maintenance window. - * + * * @return the defaultDurationInMinutes value. */ public Integer defaultDurationInMinutes() { @@ -132,7 +133,7 @@ public Integer defaultDurationInMinutes() { /** * Set the defaultDurationInMinutes property: Default duration for maintenance window. - * + * * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ @@ -143,7 +144,7 @@ public MaintenanceWindowOptionsProperties withDefaultDurationInMinutes(Integer d /** * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * + * * @return the minCycles value. */ public Integer minCycles() { @@ -152,7 +153,7 @@ public Integer minCycles() { /** * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * + * * @param minCycles the minCycles value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ @@ -163,7 +164,7 @@ public MaintenanceWindowOptionsProperties withMinCycles(Integer minCycles) { /** * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * + * * @return the timeGranularityInMinutes value. */ public Integer timeGranularityInMinutes() { @@ -172,7 +173,7 @@ public Integer timeGranularityInMinutes() { /** * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * + * * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ @@ -184,7 +185,7 @@ public MaintenanceWindowOptionsProperties withTimeGranularityInMinutes(Integer t /** * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. - * + * * @return the allowMultipleMaintenanceWindowsPerCycle value. */ public Boolean allowMultipleMaintenanceWindowsPerCycle() { @@ -194,19 +195,19 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { /** * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. - * + * * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. * @return the MaintenanceWindowOptionsProperties object itself. */ - public MaintenanceWindowOptionsProperties withAllowMultipleMaintenanceWindowsPerCycle( - Boolean allowMultipleMaintenanceWindowsPerCycle) { + public MaintenanceWindowOptionsProperties + withAllowMultipleMaintenanceWindowsPerCycle(Boolean allowMultipleMaintenanceWindowsPerCycle) { this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -214,4 +215,68 @@ public void validate() { maintenanceWindowCycles().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isEnabled", this.isEnabled); + jsonWriter.writeArrayField("maintenanceWindowCycles", this.maintenanceWindowCycles, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("minDurationInMinutes", this.minDurationInMinutes); + jsonWriter.writeNumberField("defaultDurationInMinutes", this.defaultDurationInMinutes); + jsonWriter.writeNumberField("minCycles", this.minCycles); + jsonWriter.writeNumberField("timeGranularityInMinutes", this.timeGranularityInMinutes); + jsonWriter.writeBooleanField("allowMultipleMaintenanceWindowsPerCycle", + this.allowMultipleMaintenanceWindowsPerCycle); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowOptionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowOptionsProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceWindowOptionsProperties. + */ + public static MaintenanceWindowOptionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowOptionsProperties deserializedMaintenanceWindowOptionsProperties + = new MaintenanceWindowOptionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isEnabled".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.isEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("maintenanceWindowCycles".equals(fieldName)) { + List maintenanceWindowCycles + = reader.readArray(reader1 -> MaintenanceWindowTimeRange.fromJson(reader1)); + deserializedMaintenanceWindowOptionsProperties.maintenanceWindowCycles = maintenanceWindowCycles; + } else if ("minDurationInMinutes".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.minDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("defaultDurationInMinutes".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.defaultDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("minCycles".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.minCycles = reader.getNullable(JsonReader::getInt); + } else if ("timeGranularityInMinutes".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.timeGranularityInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("allowMultipleMaintenanceWindowsPerCycle".equals(fieldName)) { + deserializedMaintenanceWindowOptionsProperties.allowMultipleMaintenanceWindowsPerCycle + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowOptionsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java index 4156a27da2bf0..eb302d62166b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Maintenance windows. */ +/** + * Maintenance windows. + */ @Fluent public final class MaintenanceWindowsInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private MaintenanceWindowsProperties innerProperties; - /** Creates an instance of MaintenanceWindowsInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MaintenanceWindowsInner class. + */ public MaintenanceWindowsInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private MaintenanceWindowsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the timeRanges property: The timeRanges property. - * + * * @return the timeRanges value. */ public List timeRanges() { @@ -43,7 +94,7 @@ public List timeRanges() { /** * Set the timeRanges property: The timeRanges property. - * + * * @param timeRanges the timeRanges value to set. * @return the MaintenanceWindowsInner object itself. */ @@ -57,7 +108,7 @@ public MaintenanceWindowsInner withTimeRanges(List t /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -65,4 +116,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowsInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MaintenanceWindowsInner. + */ + public static MaintenanceWindowsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowsInner deserializedMaintenanceWindowsInner = new MaintenanceWindowsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceWindowsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceWindowsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceWindowsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceWindowsInner.innerProperties = MaintenanceWindowsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java index c7f8305da88ed..c8eb8389167f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java @@ -5,26 +5,33 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Maintenance windows resource properties. */ +/** + * Maintenance windows resource properties. + */ @Fluent -public final class MaintenanceWindowsProperties { +public final class MaintenanceWindowsProperties implements JsonSerializable { /* * The timeRanges property. */ - @JsonProperty(value = "timeRanges") private List timeRanges; - /** Creates an instance of MaintenanceWindowsProperties class. */ + /** + * Creates an instance of MaintenanceWindowsProperties class. + */ public MaintenanceWindowsProperties() { } /** * Get the timeRanges property: The timeRanges property. - * + * * @return the timeRanges value. */ public List timeRanges() { @@ -33,7 +40,7 @@ public List timeRanges() { /** * Set the timeRanges property: The timeRanges property. - * + * * @param timeRanges the timeRanges value to set. * @return the MaintenanceWindowsProperties object itself. */ @@ -44,7 +51,7 @@ public MaintenanceWindowsProperties withTimeRanges(List e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("timeRanges", this.timeRanges, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowsProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceWindowsProperties. + */ + public static MaintenanceWindowsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowsProperties deserializedMaintenanceWindowsProperties = new MaintenanceWindowsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeRanges".equals(fieldName)) { + List timeRanges + = reader.readArray(reader1 -> MaintenanceWindowTimeRange.fromJson(reader1)); + deserializedMaintenanceWindowsProperties.timeRanges = timeRanges; + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java index 45ba97c84995f..1d872ad40043e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A short term retention policy. */ +/** + * A short term retention policy. + */ @Fluent public final class ManagedBackupShortTermRetentionPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedBackupShortTermRetentionPolicyProperties innerProperties; - /** Creates an instance of ManagedBackupShortTermRetentionPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedBackupShortTermRetentionPolicyInner class. + */ public ManagedBackupShortTermRetentionPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedBackupShortTermRetentionPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -43,7 +94,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @param retentionDays the retentionDays value to set. * @return the ManagedBackupShortTermRetentionPolicyInner object itself. */ @@ -57,7 +108,7 @@ public ManagedBackupShortTermRetentionPolicyInner withRetentionDays(Integer rete /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -65,4 +116,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedBackupShortTermRetentionPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedBackupShortTermRetentionPolicyInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedBackupShortTermRetentionPolicyInner. + */ + public static ManagedBackupShortTermRetentionPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedBackupShortTermRetentionPolicyInner deserializedManagedBackupShortTermRetentionPolicyInner + = new ManagedBackupShortTermRetentionPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyInner.innerProperties + = ManagedBackupShortTermRetentionPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedBackupShortTermRetentionPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java index b0336df00943c..806c74ae63caa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java @@ -5,25 +5,33 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a short term retention policy. */ +/** + * Properties of a short term retention policy. + */ @Fluent -public final class ManagedBackupShortTermRetentionPolicyProperties { +public final class ManagedBackupShortTermRetentionPolicyProperties + implements JsonSerializable { /* * The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; - /** Creates an instance of ManagedBackupShortTermRetentionPolicyProperties class. */ + /** + * Creates an instance of ManagedBackupShortTermRetentionPolicyProperties class. + */ public ManagedBackupShortTermRetentionPolicyProperties() { } /** * Get the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -33,7 +41,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: The backup retention period in days. This is how many days Point-in-Time Restore * will be supported. - * + * * @param retentionDays the retentionDays value to set. * @return the ManagedBackupShortTermRetentionPolicyProperties object itself. */ @@ -44,9 +52,47 @@ public ManagedBackupShortTermRetentionPolicyProperties withRetentionDays(Integer /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedBackupShortTermRetentionPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedBackupShortTermRetentionPolicyProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedBackupShortTermRetentionPolicyProperties. + */ + public static ManagedBackupShortTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedBackupShortTermRetentionPolicyProperties deserializedManagedBackupShortTermRetentionPolicyProperties + = new ManagedBackupShortTermRetentionPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("retentionDays".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedBackupShortTermRetentionPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java index 0864fe34dbc70..b35337f197970 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java @@ -6,43 +6,98 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; import com.azure.resourcemanager.sql.models.ManagedDatabaseStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -/** A managed database resource. */ +/** + * A managed database resource. + */ @Fluent public final class ManagedDatabaseInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedDatabaseProperties innerProperties; - /** Creates an instance of ManagedDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedDatabaseInner class. + */ public ManagedDatabaseInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedDatabaseProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public ManagedDatabaseInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedDatabaseInner withTags(Map tags) { super.withTags(tags); @@ -51,7 +106,7 @@ public ManagedDatabaseInner withTags(Map tags) { /** * Get the collation property: Collation of the managed database. - * + * * @return the collation value. */ public String collation() { @@ -60,7 +115,7 @@ public String collation() { /** * Set the collation property: Collation of the managed database. - * + * * @param collation the collation value to set. * @return the ManagedDatabaseInner object itself. */ @@ -74,7 +129,7 @@ public ManagedDatabaseInner withCollation(String collation) { /** * Get the status property: Status of the database. - * + * * @return the status value. */ public ManagedDatabaseStatus status() { @@ -83,7 +138,7 @@ public ManagedDatabaseStatus status() { /** * Get the creationDate property: Creation date of the database. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -92,7 +147,7 @@ public OffsetDateTime creationDate() { /** * Get the earliestRestorePoint property: Earliest restore point in time for point in time restore. - * + * * @return the earliestRestorePoint value. */ public OffsetDateTime earliestRestorePoint() { @@ -103,7 +158,7 @@ public OffsetDateTime earliestRestorePoint() { * Get the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -114,7 +169,7 @@ public OffsetDateTime restorePointInTime() { * Set the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedDatabaseInner object itself. */ @@ -128,7 +183,7 @@ public ManagedDatabaseInner withRestorePointInTime(OffsetDateTime restorePointIn /** * Get the defaultSecondaryLocation property: Geo paired region. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -137,7 +192,7 @@ public String defaultSecondaryLocation() { /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -146,7 +201,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the ManagedDatabaseInner object itself. */ @@ -166,7 +221,7 @@ public ManagedDatabaseInner withCatalogCollation(CatalogCollationType catalogCol * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @return the createMode value. */ public ManagedDatabaseCreateMode createMode() { @@ -181,7 +236,7 @@ public ManagedDatabaseCreateMode createMode() { * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @param createMode the createMode value to set. * @return the ManagedDatabaseInner object itself. */ @@ -196,7 +251,7 @@ public ManagedDatabaseInner withCreateMode(ManagedDatabaseCreateMode createMode) /** * Get the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @return the storageContainerUri value. */ public String storageContainerUri() { @@ -206,7 +261,7 @@ public String storageContainerUri() { /** * Set the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @param storageContainerUri the storageContainerUri value to set. * @return the ManagedDatabaseInner object itself. */ @@ -221,7 +276,7 @@ public ManagedDatabaseInner withStorageContainerUri(String storageContainerUri) /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -231,7 +286,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the ManagedDatabaseInner object itself. */ @@ -246,7 +301,7 @@ public ManagedDatabaseInner withSourceDatabaseId(String sourceDatabaseId) { /** * Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -256,7 +311,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the ManagedDatabaseInner object itself. */ @@ -271,7 +326,7 @@ public ManagedDatabaseInner withRestorableDroppedDatabaseId(String restorableDro /** * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @return the storageContainerSasToken value. */ public String storageContainerSasToken() { @@ -281,7 +336,7 @@ public String storageContainerSasToken() { /** * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @param storageContainerSasToken the storageContainerSasToken value to set. * @return the ManagedDatabaseInner object itself. */ @@ -296,7 +351,7 @@ public ManagedDatabaseInner withStorageContainerSasToken(String storageContainer /** * Get the failoverGroupId property: Instance Failover Group resource identifier that this managed database belongs * to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -306,7 +361,7 @@ public String failoverGroupId() { /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -316,7 +371,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the ManagedDatabaseInner object itself. */ @@ -331,7 +386,7 @@ public ManagedDatabaseInner withRecoverableDatabaseId(String recoverableDatabase /** * Get the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -341,7 +396,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the ManagedDatabaseInner object itself. */ @@ -355,7 +410,7 @@ public ManagedDatabaseInner withLongTermRetentionBackupResourceId(String longTer /** * Get the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @return the autoCompleteRestore value. */ public Boolean autoCompleteRestore() { @@ -364,7 +419,7 @@ public Boolean autoCompleteRestore() { /** * Set the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @param autoCompleteRestore the autoCompleteRestore value to set. * @return the ManagedDatabaseInner object itself. */ @@ -378,7 +433,7 @@ public ManagedDatabaseInner withAutoCompleteRestore(Boolean autoCompleteRestore) /** * Get the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @return the lastBackupName value. */ public String lastBackupName() { @@ -387,7 +442,7 @@ public String lastBackupName() { /** * Set the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @param lastBackupName the lastBackupName value to set. * @return the ManagedDatabaseInner object itself. */ @@ -401,7 +456,7 @@ public ManagedDatabaseInner withLastBackupName(String lastBackupName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -409,4 +464,54 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedDatabaseInner. + */ + public static ManagedDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseInner deserializedManagedDatabaseInner = new ManagedDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedDatabaseInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedDatabaseInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedDatabaseInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedDatabaseInner.innerProperties = ManagedDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java index 07a1db6edd796..cc9a782a96c0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java @@ -5,56 +5,57 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; import com.azure.resourcemanager.sql.models.ManagedDatabaseStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; -/** The managed database's properties. */ +/** + * The managed database's properties. + */ @Fluent -public final class ManagedDatabaseProperties { +public final class ManagedDatabaseProperties implements JsonSerializable { /* * Collation of the managed database. */ - @JsonProperty(value = "collation") private String collation; /* * Status of the database. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private ManagedDatabaseStatus status; /* * Creation date of the database. */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * Earliest restore point in time for point in time restore. */ - @JsonProperty(value = "earliestRestorePoint", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestorePoint; /* * Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 * format) of the source database that will be restored to create the new database. */ - @JsonProperty(value = "restorePointInTime") private OffsetDateTime restorePointInTime; /* * Geo paired region. */ - @JsonProperty(value = "defaultSecondaryLocation", access = JsonProperty.Access.WRITE_ONLY) private String defaultSecondaryLocation; /* * Collation of the metadata catalog. */ - @JsonProperty(value = "catalogCollation") private CatalogCollationType catalogCollation; /* @@ -66,72 +67,64 @@ public final class ManagedDatabaseProperties { * RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). */ - @JsonProperty(value = "createMode") private ManagedDatabaseCreateMode createMode; /* * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage * container where backups for this restore are stored. */ - @JsonProperty(value = "storageContainerUri") private String storageContainerUri; /* * The resource identifier of the source database associated with create operation of this database. */ - @JsonProperty(value = "sourceDatabaseId") private String sourceDatabaseId; /* * The restorable dropped database resource id to restore when creating this database. */ - @JsonProperty(value = "restorableDroppedDatabaseId") private String restorableDroppedDatabaseId; /* * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas * token. */ - @JsonProperty(value = "storageContainerSasToken") private String storageContainerSasToken; /* * Instance Failover Group resource identifier that this managed database belongs to. */ - @JsonProperty(value = "failoverGroupId", access = JsonProperty.Access.WRITE_ONLY) private String failoverGroupId; /* * The resource identifier of the recoverable database associated with create operation of this database. */ - @JsonProperty(value = "recoverableDatabaseId") private String recoverableDatabaseId; /* * The name of the Long Term Retention backup to be used for restore of this managed database. */ - @JsonProperty(value = "longTermRetentionBackupResourceId") private String longTermRetentionBackupResourceId; /* * Whether to auto complete restore of this managed database. */ - @JsonProperty(value = "autoCompleteRestore") private Boolean autoCompleteRestore; /* * Last backup file name for restore of this managed database. */ - @JsonProperty(value = "lastBackupName") private String lastBackupName; - /** Creates an instance of ManagedDatabaseProperties class. */ + /** + * Creates an instance of ManagedDatabaseProperties class. + */ public ManagedDatabaseProperties() { } /** * Get the collation property: Collation of the managed database. - * + * * @return the collation value. */ public String collation() { @@ -140,7 +133,7 @@ public String collation() { /** * Set the collation property: Collation of the managed database. - * + * * @param collation the collation value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -151,7 +144,7 @@ public ManagedDatabaseProperties withCollation(String collation) { /** * Get the status property: Status of the database. - * + * * @return the status value. */ public ManagedDatabaseStatus status() { @@ -160,7 +153,7 @@ public ManagedDatabaseStatus status() { /** * Get the creationDate property: Creation date of the database. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -169,7 +162,7 @@ public OffsetDateTime creationDate() { /** * Get the earliestRestorePoint property: Earliest restore point in time for point in time restore. - * + * * @return the earliestRestorePoint value. */ public OffsetDateTime earliestRestorePoint() { @@ -180,7 +173,7 @@ public OffsetDateTime earliestRestorePoint() { * Get the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -191,7 +184,7 @@ public OffsetDateTime restorePointInTime() { * Set the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -202,7 +195,7 @@ public ManagedDatabaseProperties withRestorePointInTime(OffsetDateTime restorePo /** * Get the defaultSecondaryLocation property: Geo paired region. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -211,7 +204,7 @@ public String defaultSecondaryLocation() { /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -220,7 +213,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -237,7 +230,7 @@ public ManagedDatabaseProperties withCatalogCollation(CatalogCollationType catal * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @return the createMode value. */ public ManagedDatabaseCreateMode createMode() { @@ -252,7 +245,7 @@ public ManagedDatabaseCreateMode createMode() { * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @param createMode the createMode value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -264,7 +257,7 @@ public ManagedDatabaseProperties withCreateMode(ManagedDatabaseCreateMode create /** * Get the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @return the storageContainerUri value. */ public String storageContainerUri() { @@ -274,7 +267,7 @@ public String storageContainerUri() { /** * Set the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @param storageContainerUri the storageContainerUri value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -286,7 +279,7 @@ public ManagedDatabaseProperties withStorageContainerUri(String storageContainer /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -296,7 +289,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -308,7 +301,7 @@ public ManagedDatabaseProperties withSourceDatabaseId(String sourceDatabaseId) { /** * Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -318,7 +311,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -330,7 +323,7 @@ public ManagedDatabaseProperties withRestorableDroppedDatabaseId(String restorab /** * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @return the storageContainerSasToken value. */ public String storageContainerSasToken() { @@ -340,7 +333,7 @@ public String storageContainerSasToken() { /** * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @param storageContainerSasToken the storageContainerSasToken value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -352,7 +345,7 @@ public ManagedDatabaseProperties withStorageContainerSasToken(String storageCont /** * Get the failoverGroupId property: Instance Failover Group resource identifier that this managed database belongs * to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -362,7 +355,7 @@ public String failoverGroupId() { /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -372,7 +365,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -384,7 +377,7 @@ public ManagedDatabaseProperties withRecoverableDatabaseId(String recoverableDat /** * Get the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -394,7 +387,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -405,7 +398,7 @@ public ManagedDatabaseProperties withLongTermRetentionBackupResourceId(String lo /** * Get the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @return the autoCompleteRestore value. */ public Boolean autoCompleteRestore() { @@ -414,7 +407,7 @@ public Boolean autoCompleteRestore() { /** * Set the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @param autoCompleteRestore the autoCompleteRestore value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -425,7 +418,7 @@ public ManagedDatabaseProperties withAutoCompleteRestore(Boolean autoCompleteRes /** * Get the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @return the lastBackupName value. */ public String lastBackupName() { @@ -434,7 +427,7 @@ public String lastBackupName() { /** * Set the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @param lastBackupName the lastBackupName value to set. * @return the ManagedDatabaseProperties object itself. */ @@ -445,9 +438,98 @@ public ManagedDatabaseProperties withLastBackupName(String lastBackupName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("collation", this.collation); + jsonWriter.writeStringField("restorePointInTime", + this.restorePointInTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.restorePointInTime)); + jsonWriter.writeStringField("catalogCollation", + this.catalogCollation == null ? null : this.catalogCollation.toString()); + jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString()); + jsonWriter.writeStringField("storageContainerUri", this.storageContainerUri); + jsonWriter.writeStringField("sourceDatabaseId", this.sourceDatabaseId); + jsonWriter.writeStringField("restorableDroppedDatabaseId", this.restorableDroppedDatabaseId); + jsonWriter.writeStringField("storageContainerSasToken", this.storageContainerSasToken); + jsonWriter.writeStringField("recoverableDatabaseId", this.recoverableDatabaseId); + jsonWriter.writeStringField("longTermRetentionBackupResourceId", this.longTermRetentionBackupResourceId); + jsonWriter.writeBooleanField("autoCompleteRestore", this.autoCompleteRestore); + jsonWriter.writeStringField("lastBackupName", this.lastBackupName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedDatabaseProperties. + */ + public static ManagedDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseProperties deserializedManagedDatabaseProperties = new ManagedDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("collation".equals(fieldName)) { + deserializedManagedDatabaseProperties.collation = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedManagedDatabaseProperties.status = ManagedDatabaseStatus.fromString(reader.getString()); + } else if ("creationDate".equals(fieldName)) { + deserializedManagedDatabaseProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("earliestRestorePoint".equals(fieldName)) { + deserializedManagedDatabaseProperties.earliestRestorePoint = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("restorePointInTime".equals(fieldName)) { + deserializedManagedDatabaseProperties.restorePointInTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("defaultSecondaryLocation".equals(fieldName)) { + deserializedManagedDatabaseProperties.defaultSecondaryLocation = reader.getString(); + } else if ("catalogCollation".equals(fieldName)) { + deserializedManagedDatabaseProperties.catalogCollation + = CatalogCollationType.fromString(reader.getString()); + } else if ("createMode".equals(fieldName)) { + deserializedManagedDatabaseProperties.createMode + = ManagedDatabaseCreateMode.fromString(reader.getString()); + } else if ("storageContainerUri".equals(fieldName)) { + deserializedManagedDatabaseProperties.storageContainerUri = reader.getString(); + } else if ("sourceDatabaseId".equals(fieldName)) { + deserializedManagedDatabaseProperties.sourceDatabaseId = reader.getString(); + } else if ("restorableDroppedDatabaseId".equals(fieldName)) { + deserializedManagedDatabaseProperties.restorableDroppedDatabaseId = reader.getString(); + } else if ("storageContainerSasToken".equals(fieldName)) { + deserializedManagedDatabaseProperties.storageContainerSasToken = reader.getString(); + } else if ("failoverGroupId".equals(fieldName)) { + deserializedManagedDatabaseProperties.failoverGroupId = reader.getString(); + } else if ("recoverableDatabaseId".equals(fieldName)) { + deserializedManagedDatabaseProperties.recoverableDatabaseId = reader.getString(); + } else if ("longTermRetentionBackupResourceId".equals(fieldName)) { + deserializedManagedDatabaseProperties.longTermRetentionBackupResourceId = reader.getString(); + } else if ("autoCompleteRestore".equals(fieldName)) { + deserializedManagedDatabaseProperties.autoCompleteRestore + = reader.getNullable(JsonReader::getBoolean); + } else if ("lastBackupName".equals(fieldName)) { + deserializedManagedDatabaseProperties.lastBackupName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsProperties.java index 2f69b22d10dff..6459d847d35f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsProperties.java @@ -5,80 +5,80 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** The managed database's restore details properties. */ +/** + * The managed database's restore details properties. + */ @Immutable -public final class ManagedDatabaseRestoreDetailsProperties { +public final class ManagedDatabaseRestoreDetailsProperties + implements JsonSerializable { /* * Restore status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; /* * Current restoring file name. */ - @JsonProperty(value = "currentRestoringFileName", access = JsonProperty.Access.WRITE_ONLY) private String currentRestoringFileName; /* * Last restored file name. */ - @JsonProperty(value = "lastRestoredFileName", access = JsonProperty.Access.WRITE_ONLY) private String lastRestoredFileName; /* * Last restored file time. */ - @JsonProperty(value = "lastRestoredFileTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastRestoredFileTime; /* * Percent completed. */ - @JsonProperty(value = "percentCompleted", access = JsonProperty.Access.WRITE_ONLY) private Double percentCompleted; /* * List of unrestorable files. */ - @JsonProperty(value = "unrestorableFiles", access = JsonProperty.Access.WRITE_ONLY) private List unrestorableFiles; /* * Number of files detected. */ - @JsonProperty(value = "numberOfFilesDetected", access = JsonProperty.Access.WRITE_ONLY) private Long numberOfFilesDetected; /* * Last uploaded file name. */ - @JsonProperty(value = "lastUploadedFileName", access = JsonProperty.Access.WRITE_ONLY) private String lastUploadedFileName; /* * Last uploaded file time. */ - @JsonProperty(value = "lastUploadedFileTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastUploadedFileTime; /* * The reason why restore is in Blocked state. */ - @JsonProperty(value = "blockReason", access = JsonProperty.Access.WRITE_ONLY) private String blockReason; - /** Creates an instance of ManagedDatabaseRestoreDetailsProperties class. */ + /** + * Creates an instance of ManagedDatabaseRestoreDetailsProperties class. + */ public ManagedDatabaseRestoreDetailsProperties() { } /** * Get the status property: Restore status. - * + * * @return the status value. */ public String status() { @@ -87,7 +87,7 @@ public String status() { /** * Get the currentRestoringFileName property: Current restoring file name. - * + * * @return the currentRestoringFileName value. */ public String currentRestoringFileName() { @@ -96,7 +96,7 @@ public String currentRestoringFileName() { /** * Get the lastRestoredFileName property: Last restored file name. - * + * * @return the lastRestoredFileName value. */ public String lastRestoredFileName() { @@ -105,7 +105,7 @@ public String lastRestoredFileName() { /** * Get the lastRestoredFileTime property: Last restored file time. - * + * * @return the lastRestoredFileTime value. */ public OffsetDateTime lastRestoredFileTime() { @@ -114,7 +114,7 @@ public OffsetDateTime lastRestoredFileTime() { /** * Get the percentCompleted property: Percent completed. - * + * * @return the percentCompleted value. */ public Double percentCompleted() { @@ -123,7 +123,7 @@ public Double percentCompleted() { /** * Get the unrestorableFiles property: List of unrestorable files. - * + * * @return the unrestorableFiles value. */ public List unrestorableFiles() { @@ -132,7 +132,7 @@ public List unrestorableFiles() { /** * Get the numberOfFilesDetected property: Number of files detected. - * + * * @return the numberOfFilesDetected value. */ public Long numberOfFilesDetected() { @@ -141,7 +141,7 @@ public Long numberOfFilesDetected() { /** * Get the lastUploadedFileName property: Last uploaded file name. - * + * * @return the lastUploadedFileName value. */ public String lastUploadedFileName() { @@ -150,7 +150,7 @@ public String lastUploadedFileName() { /** * Get the lastUploadedFileTime property: Last uploaded file time. - * + * * @return the lastUploadedFileTime value. */ public OffsetDateTime lastUploadedFileTime() { @@ -159,7 +159,7 @@ public OffsetDateTime lastUploadedFileTime() { /** * Get the blockReason property: The reason why restore is in Blocked state. - * + * * @return the blockReason value. */ public String blockReason() { @@ -168,9 +168,68 @@ public String blockReason() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseRestoreDetailsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseRestoreDetailsProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedDatabaseRestoreDetailsProperties. + */ + public static ManagedDatabaseRestoreDetailsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseRestoreDetailsProperties deserializedManagedDatabaseRestoreDetailsProperties + = new ManagedDatabaseRestoreDetailsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.status = reader.getString(); + } else if ("currentRestoringFileName".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.currentRestoringFileName = reader.getString(); + } else if ("lastRestoredFileName".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastRestoredFileName = reader.getString(); + } else if ("lastRestoredFileTime".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastRestoredFileTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("percentCompleted".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.percentCompleted + = reader.getNullable(JsonReader::getDouble); + } else if ("unrestorableFiles".equals(fieldName)) { + List unrestorableFiles = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedDatabaseRestoreDetailsProperties.unrestorableFiles = unrestorableFiles; + } else if ("numberOfFilesDetected".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesDetected + = reader.getNullable(JsonReader::getLong); + } else if ("lastUploadedFileName".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileName = reader.getString(); + } else if ("lastUploadedFileTime".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blockReason".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.blockReason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseRestoreDetailsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java index 8e3086bc91ec6..6d61c3ea316ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A managed database restore details. */ +/** + * A managed database restore details. + */ @Immutable public final class ManagedDatabaseRestoreDetailsResultInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedDatabaseRestoreDetailsProperties innerProperties; - /** Creates an instance of ManagedDatabaseRestoreDetailsResultInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedDatabaseRestoreDetailsResultInner class. + */ public ManagedDatabaseRestoreDetailsResultInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedDatabaseRestoreDetailsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the status property: Restore status. - * + * * @return the status value. */ public String status() { @@ -43,7 +94,7 @@ public String status() { /** * Get the currentRestoringFileName property: Current restoring file name. - * + * * @return the currentRestoringFileName value. */ public String currentRestoringFileName() { @@ -52,7 +103,7 @@ public String currentRestoringFileName() { /** * Get the lastRestoredFileName property: Last restored file name. - * + * * @return the lastRestoredFileName value. */ public String lastRestoredFileName() { @@ -61,7 +112,7 @@ public String lastRestoredFileName() { /** * Get the lastRestoredFileTime property: Last restored file time. - * + * * @return the lastRestoredFileTime value. */ public OffsetDateTime lastRestoredFileTime() { @@ -70,7 +121,7 @@ public OffsetDateTime lastRestoredFileTime() { /** * Get the percentCompleted property: Percent completed. - * + * * @return the percentCompleted value. */ public Double percentCompleted() { @@ -79,7 +130,7 @@ public Double percentCompleted() { /** * Get the unrestorableFiles property: List of unrestorable files. - * + * * @return the unrestorableFiles value. */ public List unrestorableFiles() { @@ -88,7 +139,7 @@ public List unrestorableFiles() { /** * Get the numberOfFilesDetected property: Number of files detected. - * + * * @return the numberOfFilesDetected value. */ public Long numberOfFilesDetected() { @@ -97,7 +148,7 @@ public Long numberOfFilesDetected() { /** * Get the lastUploadedFileName property: Last uploaded file name. - * + * * @return the lastUploadedFileName value. */ public String lastUploadedFileName() { @@ -106,7 +157,7 @@ public String lastUploadedFileName() { /** * Get the lastUploadedFileTime property: Last uploaded file time. - * + * * @return the lastUploadedFileTime value. */ public OffsetDateTime lastUploadedFileTime() { @@ -115,7 +166,7 @@ public OffsetDateTime lastUploadedFileTime() { /** * Get the blockReason property: The reason why restore is in Blocked state. - * + * * @return the blockReason value. */ public String blockReason() { @@ -124,7 +175,7 @@ public String blockReason() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -132,4 +183,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseRestoreDetailsResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseRestoreDetailsResultInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedDatabaseRestoreDetailsResultInner. + */ + public static ManagedDatabaseRestoreDetailsResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseRestoreDetailsResultInner deserializedManagedDatabaseRestoreDetailsResultInner + = new ManagedDatabaseRestoreDetailsResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsResultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsResultInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsResultInner.innerProperties + = ManagedDatabaseRestoreDetailsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseRestoreDetailsResultInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java index de1e9b83aa00e..f71b8257229f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A managed database security alert policy. */ +/** + * A managed database security alert policy. + */ @Fluent public final class ManagedDatabaseSecurityAlertPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SecurityAlertPolicyProperties innerProperties; - /** Creates an instance of ManagedDatabaseSecurityAlertPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedDatabaseSecurityAlertPolicyInner class. + */ public ManagedDatabaseSecurityAlertPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SecurityAlertPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -46,7 +97,7 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -61,7 +112,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withState(SecurityAlertPolicyStat /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -71,7 +122,7 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -85,7 +136,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withDisabledAlerts(List d /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -94,7 +145,7 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -108,7 +159,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withEmailAddresses(List e /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -117,7 +168,7 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -132,7 +183,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withEmailAccountAdmins(Boolean em /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -142,7 +193,7 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -157,7 +208,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withStorageEndpoint(String storag /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -167,7 +218,7 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -181,7 +232,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withStorageAccountAccessKey(Strin /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -190,7 +241,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the ManagedDatabaseSecurityAlertPolicyInner object itself. */ @@ -204,7 +255,7 @@ public ManagedDatabaseSecurityAlertPolicyInner withRetentionDays(Integer retenti /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -213,7 +264,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -221,4 +272,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseSecurityAlertPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseSecurityAlertPolicyInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedDatabaseSecurityAlertPolicyInner. + */ + public static ManagedDatabaseSecurityAlertPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseSecurityAlertPolicyInner deserializedManagedDatabaseSecurityAlertPolicyInner + = new ManagedDatabaseSecurityAlertPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedDatabaseSecurityAlertPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedDatabaseSecurityAlertPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedDatabaseSecurityAlertPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedDatabaseSecurityAlertPolicyInner.innerProperties + = SecurityAlertPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseSecurityAlertPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java index 7b9ac357e332b..8c275d11ffed2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** An Azure SQL managed instance administrator. */ +/** + * An Azure SQL managed instance administrator. + */ @Fluent public final class ManagedInstanceAdministratorInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceAdministratorProperties innerProperties; - /** Creates an instance of ManagedInstanceAdministratorInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceAdministratorInner class. + */ public ManagedInstanceAdministratorInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceAdministratorProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the administratorType property: Type of the managed instance administrator. - * + * * @return the administratorType value. */ public ManagedInstanceAdministratorType administratorType() { @@ -43,7 +94,7 @@ public ManagedInstanceAdministratorType administratorType() { /** * Set the administratorType property: Type of the managed instance administrator. - * + * * @param administratorType the administratorType value to set. * @return the ManagedInstanceAdministratorInner object itself. */ @@ -57,7 +108,7 @@ public ManagedInstanceAdministratorInner withAdministratorType(ManagedInstanceAd /** * Get the login property: Login name of the managed instance administrator. - * + * * @return the login value. */ public String login() { @@ -66,7 +117,7 @@ public String login() { /** * Set the login property: Login name of the managed instance administrator. - * + * * @param login the login value to set. * @return the ManagedInstanceAdministratorInner object itself. */ @@ -80,7 +131,7 @@ public ManagedInstanceAdministratorInner withLogin(String login) { /** * Get the sid property: SID (object ID) of the managed instance administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -89,7 +140,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the managed instance administrator. - * + * * @param sid the sid value to set. * @return the ManagedInstanceAdministratorInner object itself. */ @@ -103,7 +154,7 @@ public ManagedInstanceAdministratorInner withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the managed instance administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -112,7 +163,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the managed instance administrator. - * + * * @param tenantId the tenantId value to set. * @return the ManagedInstanceAdministratorInner object itself. */ @@ -126,7 +177,7 @@ public ManagedInstanceAdministratorInner withTenantId(UUID tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -134,4 +185,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAdministratorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAdministratorInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceAdministratorInner. + */ + public static ManagedInstanceAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAdministratorInner deserializedManagedInstanceAdministratorInner + = new ManagedInstanceAdministratorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceAdministratorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceAdministratorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceAdministratorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceAdministratorInner.innerProperties + = ManagedInstanceAdministratorProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAdministratorInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java index 6c248796d8e90..887daa1e2c797 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java @@ -6,44 +6,50 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** The properties of a managed instance administrator. */ +/** + * The properties of a managed instance administrator. + */ @Fluent -public final class ManagedInstanceAdministratorProperties { +public final class ManagedInstanceAdministratorProperties + implements JsonSerializable { /* * Type of the managed instance administrator. */ - @JsonProperty(value = "administratorType", required = true) private ManagedInstanceAdministratorType administratorType; /* * Login name of the managed instance administrator. */ - @JsonProperty(value = "login", required = true) private String login; /* * SID (object ID) of the managed instance administrator. */ - @JsonProperty(value = "sid", required = true) private UUID sid; /* * Tenant ID of the managed instance administrator. */ - @JsonProperty(value = "tenantId") private UUID tenantId; - /** Creates an instance of ManagedInstanceAdministratorProperties class. */ + /** + * Creates an instance of ManagedInstanceAdministratorProperties class. + */ public ManagedInstanceAdministratorProperties() { } /** * Get the administratorType property: Type of the managed instance administrator. - * + * * @return the administratorType value. */ public ManagedInstanceAdministratorType administratorType() { @@ -52,19 +58,19 @@ public ManagedInstanceAdministratorType administratorType() { /** * Set the administratorType property: Type of the managed instance administrator. - * + * * @param administratorType the administratorType value to set. * @return the ManagedInstanceAdministratorProperties object itself. */ - public ManagedInstanceAdministratorProperties withAdministratorType( - ManagedInstanceAdministratorType administratorType) { + public ManagedInstanceAdministratorProperties + withAdministratorType(ManagedInstanceAdministratorType administratorType) { this.administratorType = administratorType; return this; } /** * Get the login property: Login name of the managed instance administrator. - * + * * @return the login value. */ public String login() { @@ -73,7 +79,7 @@ public String login() { /** * Set the login property: Login name of the managed instance administrator. - * + * * @param login the login value to set. * @return the ManagedInstanceAdministratorProperties object itself. */ @@ -84,7 +90,7 @@ public ManagedInstanceAdministratorProperties withLogin(String login) { /** * Get the sid property: SID (object ID) of the managed instance administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -93,7 +99,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the managed instance administrator. - * + * * @param sid the sid value to set. * @return the ManagedInstanceAdministratorProperties object itself. */ @@ -104,7 +110,7 @@ public ManagedInstanceAdministratorProperties withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the managed instance administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -113,7 +119,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the managed instance administrator. - * + * * @param tenantId the tenantId value to set. * @return the ManagedInstanceAdministratorProperties object itself. */ @@ -124,29 +130,77 @@ public ManagedInstanceAdministratorProperties withTenantId(UUID tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (administratorType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorType in model ManagedInstanceAdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorType in model ManagedInstanceAdministratorProperties")); } if (login() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property login in model ManagedInstanceAdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property login in model ManagedInstanceAdministratorProperties")); } if (sid() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sid in model ManagedInstanceAdministratorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sid in model ManagedInstanceAdministratorProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceAdministratorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("administratorType", + this.administratorType == null ? null : this.administratorType.toString()); + jsonWriter.writeStringField("login", this.login); + jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAdministratorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAdministratorProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceAdministratorProperties. + */ + public static ManagedInstanceAdministratorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAdministratorProperties deserializedManagedInstanceAdministratorProperties + = new ManagedInstanceAdministratorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administratorType".equals(fieldName)) { + deserializedManagedInstanceAdministratorProperties.administratorType + = ManagedInstanceAdministratorType.fromString(reader.getString()); + } else if ("login".equals(fieldName)) { + deserializedManagedInstanceAdministratorProperties.login = reader.getString(); + } else if ("sid".equals(fieldName)) { + deserializedManagedInstanceAdministratorProperties.sid + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedInstanceAdministratorProperties.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAdministratorProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java index 93fb5d11435ab..58ae0212f563f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java @@ -5,24 +5,32 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a active directory only authentication for Managed Instance. */ +/** + * Properties of a active directory only authentication for Managed Instance. + */ @Fluent -public final class ManagedInstanceAzureADOnlyAuthProperties { +public final class ManagedInstanceAzureADOnlyAuthProperties + implements JsonSerializable { /* * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "azureADOnlyAuthentication", required = true) private boolean azureADOnlyAuthentication; - /** Creates an instance of ManagedInstanceAzureADOnlyAuthProperties class. */ + /** + * Creates an instance of ManagedInstanceAzureADOnlyAuthProperties class. + */ public ManagedInstanceAzureADOnlyAuthProperties() { } /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public boolean azureADOnlyAuthentication() { @@ -31,7 +39,7 @@ public boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the ManagedInstanceAzureADOnlyAuthProperties object itself. */ @@ -42,9 +50,48 @@ public ManagedInstanceAzureADOnlyAuthProperties withAzureADOnlyAuthentication(bo /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("azureADOnlyAuthentication", this.azureADOnlyAuthentication); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAzureADOnlyAuthProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAzureADOnlyAuthProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceAzureADOnlyAuthProperties. + */ + public static ManagedInstanceAzureADOnlyAuthProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAzureADOnlyAuthProperties deserializedManagedInstanceAzureADOnlyAuthProperties + = new ManagedInstanceAzureADOnlyAuthProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureADOnlyAuthentication".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthProperties.azureADOnlyAuthentication + = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAzureADOnlyAuthProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java index 2cc19b8dec211..f5be5d3957c74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Azure Active Directory only authentication. */ +/** + * Azure Active Directory only authentication. + */ @Fluent public final class ManagedInstanceAzureADOnlyAuthenticationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceAzureADOnlyAuthProperties innerProperties; - /** Creates an instance of ManagedInstanceAzureADOnlyAuthenticationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceAzureADOnlyAuthenticationInner class. + */ public ManagedInstanceAzureADOnlyAuthenticationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceAzureADOnlyAuthProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -41,12 +92,12 @@ public Boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the ManagedInstanceAzureADOnlyAuthenticationInner object itself. */ - public ManagedInstanceAzureADOnlyAuthenticationInner withAzureADOnlyAuthentication( - Boolean azureADOnlyAuthentication) { + public ManagedInstanceAzureADOnlyAuthenticationInner + withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { if (this.innerProperties() == null) { this.innerProperties = new ManagedInstanceAzureADOnlyAuthProperties(); } @@ -56,7 +107,7 @@ public ManagedInstanceAzureADOnlyAuthenticationInner withAzureADOnlyAuthenticati /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -64,4 +115,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAzureADOnlyAuthenticationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAzureADOnlyAuthenticationInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceAzureADOnlyAuthenticationInner. + */ + public static ManagedInstanceAzureADOnlyAuthenticationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAzureADOnlyAuthenticationInner deserializedManagedInstanceAzureADOnlyAuthenticationInner + = new ManagedInstanceAzureADOnlyAuthenticationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthenticationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthenticationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthenticationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthenticationInner.innerProperties + = ManagedInstanceAzureADOnlyAuthProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAzureADOnlyAuthenticationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java index 2f9772edb484f..39324b65e7c69 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java @@ -6,31 +6,51 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The managed instance encryption protector. */ +/** + * The managed instance encryption protector. + */ @Fluent public final class ManagedInstanceEncryptionProtectorInner extends ProxyResource { /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceEncryptionProtectorProperties innerProperties; - /** Creates an instance of ManagedInstanceEncryptionProtectorInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceEncryptionProtectorInner class. + */ public ManagedInstanceEncryptionProtectorInner() { } /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -39,16 +59,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceEncryptionProtectorProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the serverKeyName property: The name of the managed instance key. - * + * * @return the serverKeyName value. */ public String serverKeyName() { @@ -57,7 +107,7 @@ public String serverKeyName() { /** * Set the serverKeyName property: The name of the managed instance key. - * + * * @param serverKeyName the serverKeyName value to set. * @return the ManagedInstanceEncryptionProtectorInner object itself. */ @@ -71,7 +121,7 @@ public ManagedInstanceEncryptionProtectorInner withServerKeyName(String serverKe /** * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -80,7 +130,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ManagedInstanceEncryptionProtectorInner object itself. */ @@ -94,7 +144,7 @@ public ManagedInstanceEncryptionProtectorInner withServerKeyType(ServerKeyType s /** * Get the uri property: The URI of the server key. - * + * * @return the uri value. */ public String uri() { @@ -103,7 +153,7 @@ public String uri() { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -112,7 +162,7 @@ public String thumbprint() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -121,7 +171,7 @@ public Boolean autoRotationEnabled() { /** * Set the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @param autoRotationEnabled the autoRotationEnabled value to set. * @return the ManagedInstanceEncryptionProtectorInner object itself. */ @@ -135,7 +185,7 @@ public ManagedInstanceEncryptionProtectorInner withAutoRotationEnabled(Boolean a /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -143,4 +193,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceEncryptionProtectorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceEncryptionProtectorInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceEncryptionProtectorInner. + */ + public static ManagedInstanceEncryptionProtectorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceEncryptionProtectorInner deserializedManagedInstanceEncryptionProtectorInner + = new ManagedInstanceEncryptionProtectorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.innerProperties + = ManagedInstanceEncryptionProtectorProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceEncryptionProtectorInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java index 12afd3deca54d..153b2ffd9360c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java @@ -6,49 +6,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties for an encryption protector execution. */ +/** + * Properties for an encryption protector execution. + */ @Fluent -public final class ManagedInstanceEncryptionProtectorProperties { +public final class ManagedInstanceEncryptionProtectorProperties + implements JsonSerializable { /* * The name of the managed instance key. */ - @JsonProperty(value = "serverKeyName") private String serverKeyName; /* * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ - @JsonProperty(value = "serverKeyType", required = true) private ServerKeyType serverKeyType; /* * The URI of the server key. */ - @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) private String uri; /* * Thumbprint of the server key. */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) private String thumbprint; /* * Key auto rotation opt-in flag. Either true or false. */ - @JsonProperty(value = "autoRotationEnabled") private Boolean autoRotationEnabled; - /** Creates an instance of ManagedInstanceEncryptionProtectorProperties class. */ + /** + * Creates an instance of ManagedInstanceEncryptionProtectorProperties class. + */ public ManagedInstanceEncryptionProtectorProperties() { } /** * Get the serverKeyName property: The name of the managed instance key. - * + * * @return the serverKeyName value. */ public String serverKeyName() { @@ -57,7 +61,7 @@ public String serverKeyName() { /** * Set the serverKeyName property: The name of the managed instance key. - * + * * @param serverKeyName the serverKeyName value to set. * @return the ManagedInstanceEncryptionProtectorProperties object itself. */ @@ -68,7 +72,7 @@ public ManagedInstanceEncryptionProtectorProperties withServerKeyName(String ser /** * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -77,7 +81,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ManagedInstanceEncryptionProtectorProperties object itself. */ @@ -88,7 +92,7 @@ public ManagedInstanceEncryptionProtectorProperties withServerKeyType(ServerKeyT /** * Get the uri property: The URI of the server key. - * + * * @return the uri value. */ public String uri() { @@ -97,7 +101,7 @@ public String uri() { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -106,7 +110,7 @@ public String thumbprint() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -115,7 +119,7 @@ public Boolean autoRotationEnabled() { /** * Set the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @param autoRotationEnabled the autoRotationEnabled value to set. * @return the ManagedInstanceEncryptionProtectorProperties object itself. */ @@ -126,18 +130,66 @@ public ManagedInstanceEncryptionProtectorProperties withAutoRotationEnabled(Bool /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model" - + " ManagedInstanceEncryptionProtectorProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serverKeyType in model ManagedInstanceEncryptionProtectorProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceEncryptionProtectorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverKeyType", this.serverKeyType == null ? null : this.serverKeyType.toString()); + jsonWriter.writeStringField("serverKeyName", this.serverKeyName); + jsonWriter.writeBooleanField("autoRotationEnabled", this.autoRotationEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceEncryptionProtectorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceEncryptionProtectorProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceEncryptionProtectorProperties. + */ + public static ManagedInstanceEncryptionProtectorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceEncryptionProtectorProperties deserializedManagedInstanceEncryptionProtectorProperties + = new ManagedInstanceEncryptionProtectorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverKeyType".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorProperties.serverKeyType + = ServerKeyType.fromString(reader.getString()); + } else if ("serverKeyName".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorProperties.serverKeyName = reader.getString(); + } else if ("uri".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorProperties.uri = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorProperties.thumbprint = reader.getString(); + } else if ("autoRotationEnabled".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorProperties.autoRotationEnabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceEncryptionProtectorProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java index 57d1cac8d40cc..da558177ac285 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java @@ -6,6 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; @@ -16,39 +19,55 @@ import com.azure.resourcemanager.sql.models.ResourceIdentity; import com.azure.resourcemanager.sql.models.ServicePrincipal; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** An Azure SQL managed instance. */ +/** + * An Azure SQL managed instance. + */ @Fluent public final class ManagedInstanceInner extends Resource { /* * The Azure Active Directory identity of the managed instance. */ - @JsonProperty(value = "identity") private ResourceIdentity identity; /* * Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceProperties innerProperties; - /** Creates an instance of ManagedInstanceInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceInner class. + */ public ManagedInstanceInner() { } /** * Get the identity property: The Azure Active Directory identity of the managed instance. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -57,7 +76,7 @@ public ResourceIdentity identity() { /** * Set the identity property: The Azure Active Directory identity of the managed instance. - * + * * @param identity the identity value to set. * @return the ManagedInstanceInner object itself. */ @@ -69,7 +88,7 @@ public ManagedInstanceInner withIdentity(ResourceIdentity identity) { /** * Get the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, * BC_G8IM, BC_G8IH. - * + * * @return the sku value. */ public Sku sku() { @@ -79,7 +98,7 @@ public Sku sku() { /** * Set the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, * BC_G8IM, BC_G8IH. - * + * * @param sku the sku value to set. * @return the ManagedInstanceInner object itself. */ @@ -90,21 +109,55 @@ public ManagedInstanceInner withSku(Sku sku) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public ManagedInstanceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedInstanceInner withTags(Map tags) { super.withTags(tags); @@ -113,7 +166,7 @@ public ManagedInstanceInner withTags(Map tags) { /** * Get the provisioningState property: The provisioningState property. - * + * * @return the provisioningState value. */ public ManagedInstancePropertiesProvisioningState provisioningState() { @@ -122,12 +175,12 @@ public ManagedInstancePropertiesProvisioningState provisioningState() { /** * Get the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @return the managedInstanceCreateMode value. */ public ManagedServerCreateMode managedInstanceCreateMode() { @@ -136,12 +189,12 @@ public ManagedServerCreateMode managedInstanceCreateMode() { /** * Set the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @param managedInstanceCreateMode the managedInstanceCreateMode value to set. * @return the ManagedInstanceInner object itself. */ @@ -155,7 +208,7 @@ public ManagedInstanceInner withManagedInstanceCreateMode(ManagedServerCreateMod /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the managed instance. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -165,7 +218,7 @@ public String fullyQualifiedDomainName() { /** * Get the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -175,7 +228,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @param administratorLogin the administratorLogin value to set. * @return the ManagedInstanceInner object itself. */ @@ -190,7 +243,7 @@ public ManagedInstanceInner withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -200,7 +253,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ManagedInstanceInner object itself. */ @@ -214,7 +267,7 @@ public ManagedInstanceInner withAdministratorLoginPassword(String administratorL /** * Get the subnetId property: Subnet resource ID for the managed instance. - * + * * @return the subnetId value. */ public String subnetId() { @@ -223,7 +276,7 @@ public String subnetId() { /** * Set the subnetId property: Subnet resource ID for the managed instance. - * + * * @param subnetId the subnetId value to set. * @return the ManagedInstanceInner object itself. */ @@ -237,7 +290,7 @@ public ManagedInstanceInner withSubnetId(String subnetId) { /** * Get the state property: The state of the managed instance. - * + * * @return the state value. */ public String state() { @@ -247,7 +300,7 @@ public String state() { /** * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @return the licenseType value. */ public ManagedInstanceLicenseType licenseType() { @@ -257,7 +310,7 @@ public ManagedInstanceLicenseType licenseType() { /** * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @param licenseType the licenseType value to set. * @return the ManagedInstanceInner object itself. */ @@ -271,7 +324,7 @@ public ManagedInstanceInner withLicenseType(ManagedInstanceLicenseType licenseTy /** * Get the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @return the vCores value. */ public Integer vCores() { @@ -280,7 +333,7 @@ public Integer vCores() { /** * Set the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @param vCores the vCores value to set. * @return the ManagedInstanceInner object itself. */ @@ -295,7 +348,7 @@ public ManagedInstanceInner withVCores(Integer vCores) { /** * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @return the storageSizeInGB value. */ public Integer storageSizeInGB() { @@ -305,7 +358,7 @@ public Integer storageSizeInGB() { /** * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @param storageSizeInGB the storageSizeInGB value to set. * @return the ManagedInstanceInner object itself. */ @@ -319,7 +372,7 @@ public ManagedInstanceInner withStorageSizeInGB(Integer storageSizeInGB) { /** * Get the collation property: Collation of the managed instance. - * + * * @return the collation value. */ public String collation() { @@ -328,7 +381,7 @@ public String collation() { /** * Set the collation property: Collation of the managed instance. - * + * * @param collation the collation value to set. * @return the ManagedInstanceInner object itself. */ @@ -342,7 +395,7 @@ public ManagedInstanceInner withCollation(String collation) { /** * Get the dnsZone property: The Dns Zone that the managed instance is in. - * + * * @return the dnsZone value. */ public String dnsZone() { @@ -352,7 +405,7 @@ public String dnsZone() { /** * Get the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @return the dnsZonePartner value. */ public String dnsZonePartner() { @@ -362,7 +415,7 @@ public String dnsZonePartner() { /** * Set the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @param dnsZonePartner the dnsZonePartner value to set. * @return the ManagedInstanceInner object itself. */ @@ -376,7 +429,7 @@ public ManagedInstanceInner withDnsZonePartner(String dnsZonePartner) { /** * Get the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @return the publicDataEndpointEnabled value. */ public Boolean publicDataEndpointEnabled() { @@ -385,7 +438,7 @@ public Boolean publicDataEndpointEnabled() { /** * Set the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @param publicDataEndpointEnabled the publicDataEndpointEnabled value to set. * @return the ManagedInstanceInner object itself. */ @@ -400,7 +453,7 @@ public ManagedInstanceInner withPublicDataEndpointEnabled(Boolean publicDataEndp /** * Get the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @return the sourceManagedInstanceId value. */ public String sourceManagedInstanceId() { @@ -410,7 +463,7 @@ public String sourceManagedInstanceId() { /** * Set the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @param sourceManagedInstanceId the sourceManagedInstanceId value to set. * @return the ManagedInstanceInner object itself. */ @@ -425,7 +478,7 @@ public ManagedInstanceInner withSourceManagedInstanceId(String sourceManagedInst /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -435,7 +488,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedInstanceInner object itself. */ @@ -449,7 +502,7 @@ public ManagedInstanceInner withRestorePointInTime(OffsetDateTime restorePointIn /** * Get the proxyOverride property: Connection type used for connecting to the instance. - * + * * @return the proxyOverride value. */ public ManagedInstanceProxyOverride proxyOverride() { @@ -458,7 +511,7 @@ public ManagedInstanceProxyOverride proxyOverride() { /** * Set the proxyOverride property: Connection type used for connecting to the instance. - * + * * @param proxyOverride the proxyOverride value to set. * @return the ManagedInstanceInner object itself. */ @@ -471,13 +524,13 @@ public ManagedInstanceInner withProxyOverride(ManagedInstanceProxyOverride proxy } /** - * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @return the timezoneId value. */ public String timezoneId() { @@ -485,13 +538,13 @@ public String timezoneId() { } /** - * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @param timezoneId the timezoneId value to set. * @return the ManagedInstanceInner object itself. */ @@ -505,7 +558,7 @@ public ManagedInstanceInner withTimezoneId(String timezoneId) { /** * Get the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @return the instancePoolId value. */ public String instancePoolId() { @@ -514,7 +567,7 @@ public String instancePoolId() { /** * Set the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @param instancePoolId the instancePoolId value to set. * @return the ManagedInstanceInner object itself. */ @@ -529,7 +582,7 @@ public ManagedInstanceInner withInstancePoolId(String instancePoolId) { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -539,7 +592,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ManagedInstanceInner object itself. */ @@ -553,7 +606,7 @@ public ManagedInstanceInner withMaintenanceConfigurationId(String maintenanceCon /** * Get the privateEndpointConnections property: List of private endpoint connections on a managed instance. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -562,7 +615,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -571,7 +624,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ManagedInstanceInner object itself. */ @@ -587,7 +640,7 @@ public ManagedInstanceInner withMinimalTlsVersion(String minimalTlsVersion) { * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -598,7 +651,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -609,12 +662,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the ManagedInstanceInner object itself. */ - public ManagedInstanceInner withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public ManagedInstanceInner + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new ManagedInstanceProperties(); } @@ -624,7 +677,7 @@ public ManagedInstanceInner withRequestedBackupStorageRedundancy( /** * Get the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -633,7 +686,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedInstanceInner object itself. */ @@ -648,7 +701,7 @@ public ManagedInstanceInner withZoneRedundant(Boolean zoneRedundant) { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -658,7 +711,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ManagedInstanceInner object itself. */ @@ -672,7 +725,7 @@ public ManagedInstanceInner withPrimaryUserAssignedIdentityId(String primaryUser /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -681,7 +734,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ManagedInstanceInner object itself. */ @@ -695,7 +748,7 @@ public ManagedInstanceInner withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ManagedInstanceExternalAdministrator administrators() { @@ -704,7 +757,7 @@ public ManagedInstanceExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ManagedInstanceInner object itself. */ @@ -718,7 +771,7 @@ public ManagedInstanceInner withAdministrators(ManagedInstanceExternalAdministra /** * Get the servicePrincipal property: The managed instance's service principal. - * + * * @return the servicePrincipal value. */ public ServicePrincipal servicePrincipal() { @@ -727,7 +780,7 @@ public ServicePrincipal servicePrincipal() { /** * Set the servicePrincipal property: The managed instance's service principal. - * + * * @param servicePrincipal the servicePrincipal value to set. * @return the ManagedInstanceInner object itself. */ @@ -741,7 +794,7 @@ public ManagedInstanceInner withServicePrincipal(ServicePrincipal servicePrincip /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -755,4 +808,60 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceInner. + */ + public static ManagedInstanceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceInner deserializedManagedInstanceInner = new ManagedInstanceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedInstanceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedInstanceInner.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedManagedInstanceInner.identity = ResourceIdentity.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedManagedInstanceInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceInner.innerProperties = ManagedInstanceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java index 9b9ffccb6ba4d..fa75cd056c02d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java @@ -6,32 +6,52 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A managed instance key. */ +/** + * A managed instance key. + */ @Fluent public final class ManagedInstanceKeyInner extends ProxyResource { /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceKeyProperties innerProperties; - /** Creates an instance of ManagedInstanceKeyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceKeyInner class. + */ public ManagedInstanceKeyInner() { } /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -40,16 +60,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceKeyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the serverKeyType property: The key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -58,7 +108,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ManagedInstanceKeyInner object itself. */ @@ -72,7 +122,7 @@ public ManagedInstanceKeyInner withServerKeyType(ServerKeyType serverKeyType) { /** * Get the uri property: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. - * + * * @return the uri value. */ public String uri() { @@ -81,7 +131,7 @@ public String uri() { /** * Set the uri property: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. - * + * * @param uri the uri value to set. * @return the ManagedInstanceKeyInner object itself. */ @@ -95,7 +145,7 @@ public ManagedInstanceKeyInner withUri(String uri) { /** * Get the thumbprint property: Thumbprint of the key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -104,7 +154,7 @@ public String thumbprint() { /** * Get the creationDate property: The key creation date. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -113,7 +163,7 @@ public OffsetDateTime creationDate() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -122,7 +172,7 @@ public Boolean autoRotationEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -130,4 +180,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceKeyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceKeyInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceKeyInner. + */ + public static ManagedInstanceKeyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceKeyInner deserializedManagedInstanceKeyInner = new ManagedInstanceKeyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceKeyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceKeyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceKeyInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedManagedInstanceKeyInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceKeyInner.innerProperties = ManagedInstanceKeyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceKeyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java index a4fcc7a03c85f..7454889ab962b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java @@ -5,51 +5,55 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties for a key execution. */ +/** + * Properties for a key execution. + */ @Fluent -public final class ManagedInstanceKeyProperties { +public final class ManagedInstanceKeyProperties implements JsonSerializable { /* * The key type like 'ServiceManaged', 'AzureKeyVault'. */ - @JsonProperty(value = "serverKeyType", required = true) private ServerKeyType serverKeyType; /* * The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. */ - @JsonProperty(value = "uri") private String uri; /* * Thumbprint of the key. */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) private String thumbprint; /* * The key creation date. */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * Key auto rotation opt-in flag. Either true or false. */ - @JsonProperty(value = "autoRotationEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean autoRotationEnabled; - /** Creates an instance of ManagedInstanceKeyProperties class. */ + /** + * Creates an instance of ManagedInstanceKeyProperties class. + */ public ManagedInstanceKeyProperties() { } /** * Get the serverKeyType property: The key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -58,7 +62,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ManagedInstanceKeyProperties object itself. */ @@ -69,7 +73,7 @@ public ManagedInstanceKeyProperties withServerKeyType(ServerKeyType serverKeyTyp /** * Get the uri property: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. - * + * * @return the uri value. */ public String uri() { @@ -78,7 +82,7 @@ public String uri() { /** * Set the uri property: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. - * + * * @param uri the uri value to set. * @return the ManagedInstanceKeyProperties object itself. */ @@ -89,7 +93,7 @@ public ManagedInstanceKeyProperties withUri(String uri) { /** * Get the thumbprint property: Thumbprint of the key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -98,7 +102,7 @@ public String thumbprint() { /** * Get the creationDate property: The key creation date. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -107,7 +111,7 @@ public OffsetDateTime creationDate() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -116,17 +120,65 @@ public Boolean autoRotationEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model ManagedInstanceKeyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serverKeyType in model ManagedInstanceKeyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceKeyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverKeyType", this.serverKeyType == null ? null : this.serverKeyType.toString()); + jsonWriter.writeStringField("uri", this.uri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceKeyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceKeyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceKeyProperties. + */ + public static ManagedInstanceKeyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceKeyProperties deserializedManagedInstanceKeyProperties = new ManagedInstanceKeyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverKeyType".equals(fieldName)) { + deserializedManagedInstanceKeyProperties.serverKeyType + = ServerKeyType.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedManagedInstanceKeyProperties.uri = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedManagedInstanceKeyProperties.thumbprint = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedManagedInstanceKeyProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("autoRotationEnabled".equals(fieldName)) { + deserializedManagedInstanceKeyProperties.autoRotationEnabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceKeyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java index b9351d6d2c586..1ec6b8b18f801 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A long term retention backup for a managed database. */ +/** + * A long term retention backup for a managed database. + */ @Immutable public final class ManagedInstanceLongTermRetentionBackupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceLongTermRetentionBackupProperties innerProperties; - /** Creates an instance of ManagedInstanceLongTermRetentionBackupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceLongTermRetentionBackupInner class. + */ public ManagedInstanceLongTermRetentionBackupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceLongTermRetentionBackupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the managedInstanceName property: The managed instance that the backup database belongs to. - * + * * @return the managedInstanceName value. */ public String managedInstanceName() { @@ -43,7 +94,7 @@ public String managedInstanceName() { /** * Get the managedInstanceCreateTime property: The create time of the instance. - * + * * @return the managedInstanceCreateTime value. */ public OffsetDateTime managedInstanceCreateTime() { @@ -52,7 +103,7 @@ public OffsetDateTime managedInstanceCreateTime() { /** * Get the databaseName property: The name of the database the backup belong to. - * + * * @return the databaseName value. */ public String databaseName() { @@ -61,7 +112,7 @@ public String databaseName() { /** * Get the databaseDeletionTime property: The delete time of the database. - * + * * @return the databaseDeletionTime value. */ public OffsetDateTime databaseDeletionTime() { @@ -70,7 +121,7 @@ public OffsetDateTime databaseDeletionTime() { /** * Get the backupTime property: The time the backup was taken. - * + * * @return the backupTime value. */ public OffsetDateTime backupTime() { @@ -79,7 +130,7 @@ public OffsetDateTime backupTime() { /** * Get the backupExpirationTime property: The time the long term retention backup will expire. - * + * * @return the backupExpirationTime value. */ public OffsetDateTime backupExpirationTime() { @@ -88,7 +139,7 @@ public OffsetDateTime backupExpirationTime() { /** * Get the backupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -97,7 +148,7 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -105,4 +156,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceLongTermRetentionBackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceLongTermRetentionBackupInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceLongTermRetentionBackupInner. + */ + public static ManagedInstanceLongTermRetentionBackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceLongTermRetentionBackupInner deserializedManagedInstanceLongTermRetentionBackupInner + = new ManagedInstanceLongTermRetentionBackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupInner.innerProperties + = ManagedInstanceLongTermRetentionBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceLongTermRetentionBackupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java index 0ce402cffb3ba..d428f811b4453 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java @@ -5,62 +5,65 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of a long term retention backup. */ +/** + * Properties of a long term retention backup. + */ @Immutable -public final class ManagedInstanceLongTermRetentionBackupProperties { +public final class ManagedInstanceLongTermRetentionBackupProperties + implements JsonSerializable { /* * The managed instance that the backup database belongs to. */ - @JsonProperty(value = "managedInstanceName", access = JsonProperty.Access.WRITE_ONLY) private String managedInstanceName; /* * The create time of the instance. */ - @JsonProperty(value = "managedInstanceCreateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime managedInstanceCreateTime; /* * The name of the database the backup belong to */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * The delete time of the database */ - @JsonProperty(value = "databaseDeletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime databaseDeletionTime; /* * The time the backup was taken */ - @JsonProperty(value = "backupTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime backupTime; /* * The time the long term retention backup will expire. */ - @JsonProperty(value = "backupExpirationTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime backupExpirationTime; /* * The storage redundancy type of the backup */ - @JsonProperty(value = "backupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy backupStorageRedundancy; - /** Creates an instance of ManagedInstanceLongTermRetentionBackupProperties class. */ + /** + * Creates an instance of ManagedInstanceLongTermRetentionBackupProperties class. + */ public ManagedInstanceLongTermRetentionBackupProperties() { } /** * Get the managedInstanceName property: The managed instance that the backup database belongs to. - * + * * @return the managedInstanceName value. */ public String managedInstanceName() { @@ -69,7 +72,7 @@ public String managedInstanceName() { /** * Get the managedInstanceCreateTime property: The create time of the instance. - * + * * @return the managedInstanceCreateTime value. */ public OffsetDateTime managedInstanceCreateTime() { @@ -78,7 +81,7 @@ public OffsetDateTime managedInstanceCreateTime() { /** * Get the databaseName property: The name of the database the backup belong to. - * + * * @return the databaseName value. */ public String databaseName() { @@ -87,7 +90,7 @@ public String databaseName() { /** * Get the databaseDeletionTime property: The delete time of the database. - * + * * @return the databaseDeletionTime value. */ public OffsetDateTime databaseDeletionTime() { @@ -96,7 +99,7 @@ public OffsetDateTime databaseDeletionTime() { /** * Get the backupTime property: The time the backup was taken. - * + * * @return the backupTime value. */ public OffsetDateTime backupTime() { @@ -105,7 +108,7 @@ public OffsetDateTime backupTime() { /** * Get the backupExpirationTime property: The time the long term retention backup will expire. - * + * * @return the backupExpirationTime value. */ public OffsetDateTime backupExpirationTime() { @@ -114,7 +117,7 @@ public OffsetDateTime backupExpirationTime() { /** * Get the backupStorageRedundancy property: The storage redundancy type of the backup. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -123,9 +126,63 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceLongTermRetentionBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceLongTermRetentionBackupProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceLongTermRetentionBackupProperties. + */ + public static ManagedInstanceLongTermRetentionBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceLongTermRetentionBackupProperties deserializedManagedInstanceLongTermRetentionBackupProperties + = new ManagedInstanceLongTermRetentionBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedInstanceName".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.managedInstanceName + = reader.getString(); + } else if ("managedInstanceCreateTime".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.managedInstanceCreateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("databaseName".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.databaseName = reader.getString(); + } else if ("databaseDeletionTime".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.databaseDeletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupTime".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.backupTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupExpirationTime".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.backupExpirationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupStorageRedundancy".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupProperties.backupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceLongTermRetentionBackupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java index 6eab2688dd0f3..2c20d585a6ef2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A long term retention policy. */ +/** + * A long term retention policy. + */ @Fluent public final class ManagedInstanceLongTermRetentionPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private BaseLongTermRetentionPolicyProperties innerProperties; - /** Creates an instance of ManagedInstanceLongTermRetentionPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceLongTermRetentionPolicyInner class. + */ public ManagedInstanceLongTermRetentionPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private BaseLongTermRetentionPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the weeklyRetention value. */ public String weeklyRetention() { @@ -41,7 +92,7 @@ public String weeklyRetention() { /** * Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param weeklyRetention the weeklyRetention value to set. * @return the ManagedInstanceLongTermRetentionPolicyInner object itself. */ @@ -55,7 +106,7 @@ public ManagedInstanceLongTermRetentionPolicyInner withWeeklyRetention(String we /** * Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the monthlyRetention value. */ public String monthlyRetention() { @@ -64,7 +115,7 @@ public String monthlyRetention() { /** * Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param monthlyRetention the monthlyRetention value to set. * @return the ManagedInstanceLongTermRetentionPolicyInner object itself. */ @@ -78,7 +129,7 @@ public ManagedInstanceLongTermRetentionPolicyInner withMonthlyRetention(String m /** * Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @return the yearlyRetention value. */ public String yearlyRetention() { @@ -87,7 +138,7 @@ public String yearlyRetention() { /** * Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * + * * @param yearlyRetention the yearlyRetention value to set. * @return the ManagedInstanceLongTermRetentionPolicyInner object itself. */ @@ -101,7 +152,7 @@ public ManagedInstanceLongTermRetentionPolicyInner withYearlyRetention(String ye /** * Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @return the weekOfYear value. */ public Integer weekOfYear() { @@ -110,7 +161,7 @@ public Integer weekOfYear() { /** * Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * + * * @param weekOfYear the weekOfYear value to set. * @return the ManagedInstanceLongTermRetentionPolicyInner object itself. */ @@ -124,7 +175,7 @@ public ManagedInstanceLongTermRetentionPolicyInner withWeekOfYear(Integer weekOf /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -132,4 +183,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceLongTermRetentionPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceLongTermRetentionPolicyInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceLongTermRetentionPolicyInner. + */ + public static ManagedInstanceLongTermRetentionPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceLongTermRetentionPolicyInner deserializedManagedInstanceLongTermRetentionPolicyInner + = new ManagedInstanceLongTermRetentionPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionPolicyInner.innerProperties + = BaseLongTermRetentionPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceLongTermRetentionPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java index 667e0d4ff4662..556edd5a78993 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstanceOperationParametersPair; import com.azure.resourcemanager.sql.models.ManagedInstanceOperationSteps; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A managed instance operation. */ +/** + * A managed instance operation. + */ @Immutable public final class ManagedInstanceOperationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceOperationProperties innerProperties; - /** Creates an instance of ManagedInstanceOperationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceOperationInner class. + */ public ManagedInstanceOperationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceOperationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the managedInstanceName property: The name of the managed instance the operation is being performed on. - * + * * @return the managedInstanceName value. */ public String managedInstanceName() { @@ -45,7 +96,7 @@ public String managedInstanceName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -54,7 +105,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -63,7 +114,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -72,7 +123,7 @@ public Integer percentComplete() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -81,7 +132,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -90,7 +141,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -99,7 +150,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -108,7 +159,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -117,7 +168,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -126,7 +177,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -135,7 +186,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -144,7 +195,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -153,7 +204,7 @@ public Boolean isCancellable() { /** * Get the operationParameters property: The operation parameters. - * + * * @return the operationParameters value. */ public ManagedInstanceOperationParametersPair operationParameters() { @@ -162,7 +213,7 @@ public ManagedInstanceOperationParametersPair operationParameters() { /** * Get the operationSteps property: The operation steps. - * + * * @return the operationSteps value. */ public ManagedInstanceOperationSteps operationSteps() { @@ -171,7 +222,7 @@ public ManagedInstanceOperationSteps operationSteps() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -179,4 +230,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceOperationInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceOperationInner. + */ + public static ManagedInstanceOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceOperationInner deserializedManagedInstanceOperationInner + = new ManagedInstanceOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceOperationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceOperationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceOperationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceOperationInner.innerProperties + = ManagedInstanceOperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java index fcc0539b96fe2..150cbc0ec79c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java @@ -5,112 +5,106 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstanceOperationParametersPair; import com.azure.resourcemanager.sql.models.ManagedInstanceOperationSteps; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a managed instance operation. */ +/** + * The properties of a managed instance operation. + */ @Immutable -public final class ManagedInstanceOperationProperties { +public final class ManagedInstanceOperationProperties implements JsonSerializable { /* * The name of the managed instance the operation is being performed on. */ - @JsonProperty(value = "managedInstanceName", access = JsonProperty.Access.WRITE_ONLY) private String managedInstanceName; /* * The name of operation. */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The friendly name of operation. */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) private String operationFriendlyName; /* * The percentage of the operation completed. */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) private Integer percentComplete; /* * The operation start time. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The operation state. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private ManagementOperationState state; /* * The operation error code. */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private Integer errorCode; /* * The operation error description. */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) private String errorDescription; /* * The operation error severity. */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) private Integer errorSeverity; /* * Whether or not the error is a user error. */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) private Boolean isUserError; /* * The estimated completion time of the operation. */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime estimatedCompletionTime; /* * The operation description. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Whether the operation can be cancelled. */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) private Boolean isCancellable; /* * The operation parameters. */ - @JsonProperty(value = "operationParameters", access = JsonProperty.Access.WRITE_ONLY) private ManagedInstanceOperationParametersPair operationParameters; /* * The operation steps. */ - @JsonProperty(value = "operationSteps", access = JsonProperty.Access.WRITE_ONLY) private ManagedInstanceOperationSteps operationSteps; - /** Creates an instance of ManagedInstanceOperationProperties class. */ + /** + * Creates an instance of ManagedInstanceOperationProperties class. + */ public ManagedInstanceOperationProperties() { } /** * Get the managedInstanceName property: The name of the managed instance the operation is being performed on. - * + * * @return the managedInstanceName value. */ public String managedInstanceName() { @@ -119,7 +113,7 @@ public String managedInstanceName() { /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -128,7 +122,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -137,7 +131,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -146,7 +140,7 @@ public Integer percentComplete() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -155,7 +149,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -164,7 +158,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -173,7 +167,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -182,7 +176,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -191,7 +185,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -200,7 +194,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -209,7 +203,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -218,7 +212,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -227,7 +221,7 @@ public Boolean isCancellable() { /** * Get the operationParameters property: The operation parameters. - * + * * @return the operationParameters value. */ public ManagedInstanceOperationParametersPair operationParameters() { @@ -236,7 +230,7 @@ public ManagedInstanceOperationParametersPair operationParameters() { /** * Get the operationSteps property: The operation steps. - * + * * @return the operationSteps value. */ public ManagedInstanceOperationSteps operationSteps() { @@ -245,7 +239,7 @@ public ManagedInstanceOperationSteps operationSteps() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -256,4 +250,77 @@ public void validate() { operationSteps().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceOperationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceOperationProperties. + */ + public static ManagedInstanceOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceOperationProperties deserializedManagedInstanceOperationProperties + = new ManagedInstanceOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedInstanceName".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.managedInstanceName = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.operation = reader.getString(); + } else if ("operationFriendlyName".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.operationFriendlyName = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.percentComplete + = reader.getNullable(JsonReader::getInt); + } else if ("startTime".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.state + = ManagementOperationState.fromString(reader.getString()); + } else if ("errorCode".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.errorCode = reader.getNullable(JsonReader::getInt); + } else if ("errorDescription".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.errorDescription = reader.getString(); + } else if ("errorSeverity".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.errorSeverity + = reader.getNullable(JsonReader::getInt); + } else if ("isUserError".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.isUserError + = reader.getNullable(JsonReader::getBoolean); + } else if ("estimatedCompletionTime".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.estimatedCompletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("description".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.description = reader.getString(); + } else if ("isCancellable".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.isCancellable + = reader.getNullable(JsonReader::getBoolean); + } else if ("operationParameters".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.operationParameters + = ManagedInstanceOperationParametersPair.fromJson(reader); + } else if ("operationSteps".equals(fieldName)) { + deserializedManagedInstanceOperationProperties.operationSteps + = ManagedInstanceOperationSteps.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java index 46302f53d7cea..e1d5e95d1064a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateEndpointProperty; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A private endpoint connection. */ +/** + * A private endpoint connection. + */ @Fluent public final class ManagedInstancePrivateEndpointConnectionInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstancePrivateEndpointConnectionProperties innerProperties; - /** Creates an instance of ManagedInstancePrivateEndpointConnectionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstancePrivateEndpointConnectionInner class. + */ public ManagedInstancePrivateEndpointConnectionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstancePrivateEndpointConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public ManagedInstancePrivateEndpointProperty privateEndpoint() { @@ -43,12 +94,12 @@ public ManagedInstancePrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the ManagedInstancePrivateEndpointConnectionInner object itself. */ - public ManagedInstancePrivateEndpointConnectionInner withPrivateEndpoint( - ManagedInstancePrivateEndpointProperty privateEndpoint) { + public ManagedInstancePrivateEndpointConnectionInner + withPrivateEndpoint(ManagedInstancePrivateEndpointProperty privateEndpoint) { if (this.innerProperties() == null) { this.innerProperties = new ManagedInstancePrivateEndpointConnectionProperties(); } @@ -58,7 +109,7 @@ public ManagedInstancePrivateEndpointConnectionInner withPrivateEndpoint( /** * Get the privateLinkServiceConnectionState property: Connection State of the Private Endpoint Connection. - * + * * @return the privateLinkServiceConnectionState value. */ public ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { @@ -67,7 +118,7 @@ public ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServi /** * Set the privateLinkServiceConnectionState property: Connection State of the Private Endpoint Connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the ManagedInstancePrivateEndpointConnectionInner object itself. */ @@ -82,7 +133,7 @@ public ManagedInstancePrivateEndpointConnectionInner withPrivateLinkServiceConne /** * Get the provisioningState property: State of the Private Endpoint Connection. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -91,7 +142,7 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -99,4 +150,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateEndpointConnectionInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateEndpointConnectionInner. + */ + public static ManagedInstancePrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateEndpointConnectionInner deserializedManagedInstancePrivateEndpointConnectionInner + = new ManagedInstancePrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionInner.innerProperties + = ManagedInstancePrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateEndpointConnectionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java index d33063ddce86c..1ccf99918cd50 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java @@ -5,38 +5,44 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateEndpointProperty; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a private endpoint connection. */ +/** + * Properties of a private endpoint connection. + */ @Fluent -public final class ManagedInstancePrivateEndpointConnectionProperties { +public final class ManagedInstancePrivateEndpointConnectionProperties + implements JsonSerializable { /* * Private endpoint which the connection belongs to. */ - @JsonProperty(value = "privateEndpoint") private ManagedInstancePrivateEndpointProperty privateEndpoint; /* * Connection State of the Private Endpoint Connection. */ - @JsonProperty(value = "privateLinkServiceConnectionState") private ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState; /* * State of the Private Endpoint Connection. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; - /** Creates an instance of ManagedInstancePrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of ManagedInstancePrivateEndpointConnectionProperties class. + */ public ManagedInstancePrivateEndpointConnectionProperties() { } /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public ManagedInstancePrivateEndpointProperty privateEndpoint() { @@ -45,19 +51,19 @@ public ManagedInstancePrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the ManagedInstancePrivateEndpointConnectionProperties object itself. */ - public ManagedInstancePrivateEndpointConnectionProperties withPrivateEndpoint( - ManagedInstancePrivateEndpointProperty privateEndpoint) { + public ManagedInstancePrivateEndpointConnectionProperties + withPrivateEndpoint(ManagedInstancePrivateEndpointProperty privateEndpoint) { this.privateEndpoint = privateEndpoint; return this; } /** * Get the privateLinkServiceConnectionState property: Connection State of the Private Endpoint Connection. - * + * * @return the privateLinkServiceConnectionState value. */ public ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { @@ -66,7 +72,7 @@ public ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServi /** * Set the privateLinkServiceConnectionState property: Connection State of the Private Endpoint Connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the ManagedInstancePrivateEndpointConnectionProperties object itself. */ @@ -78,7 +84,7 @@ public ManagedInstancePrivateEndpointConnectionProperties withPrivateLinkService /** * Get the provisioningState property: State of the Private Endpoint Connection. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -87,7 +93,7 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -98,4 +104,50 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateEndpointConnectionProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateEndpointConnectionProperties. + */ + public static ManagedInstancePrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateEndpointConnectionProperties deserializedManagedInstancePrivateEndpointConnectionProperties + = new ManagedInstancePrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpoint".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionProperties.privateEndpoint + = ManagedInstancePrivateEndpointProperty.fromJson(reader); + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = ManagedInstancePrivateLinkServiceConnectionStateProperty.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionProperties.provisioningState + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateEndpointConnectionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java index 787901164e3db..3e93b998bf339 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A private link resource. */ +/** + * A private link resource. + */ @Immutable public final class ManagedInstancePrivateLinkInner extends ProxyResource { /* * The private link resource group id. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private ManagedInstancePrivateLinkProperties properties; - /** Creates an instance of ManagedInstancePrivateLinkInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstancePrivateLinkInner class. + */ public ManagedInstancePrivateLinkInner() { } /** * Get the properties property: The private link resource group id. - * + * * @return the properties value. */ public ManagedInstancePrivateLinkProperties properties() { return this.properties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -41,4 +92,48 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateLinkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateLinkInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateLinkInner. + */ + public static ManagedInstancePrivateLinkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateLinkInner deserializedManagedInstancePrivateLinkInner + = new ManagedInstancePrivateLinkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstancePrivateLinkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstancePrivateLinkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstancePrivateLinkInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstancePrivateLinkInner.properties + = ManagedInstancePrivateLinkProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateLinkInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java index 3020f1393a9f4..dd2914542dc1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java @@ -5,6 +5,11 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; @@ -13,122 +18,108 @@ import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; import com.azure.resourcemanager.sql.models.ManagedServerCreateMode; import com.azure.resourcemanager.sql.models.ServicePrincipal; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; -/** The properties of a managed instance. */ +/** + * The properties of a managed instance. + */ @Fluent -public final class ManagedInstanceProperties { +public final class ManagedInstanceProperties implements JsonSerializable { /* * The provisioningState property. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ManagedInstancePropertiesProvisioningState provisioningState; /* * Specifies the mode of database creation. - * + * * Default: Regular instance creation. - * + * * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. */ - @JsonProperty(value = "managedInstanceCreateMode") private ManagedServerCreateMode managedInstanceCreateMode; /* * The fully qualified domain name of the managed instance. */ - @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY) private String fullyQualifiedDomainName; /* - * Administrator username for the managed instance. Can only be specified when the managed instance is being - * created (and is required for creation). + * Administrator username for the managed instance. Can only be specified when the managed instance is being created + * (and is required for creation). */ - @JsonProperty(value = "administratorLogin") private String administratorLogin; /* * The administrator login password (required for managed instance creation). */ - @JsonProperty(value = "administratorLoginPassword") private String administratorLoginPassword; /* * Subnet resource ID for the managed instance. */ - @JsonProperty(value = "subnetId") private String subnetId; /* * The state of the managed instance. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; /* * The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and * 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ - @JsonProperty(value = "licenseType") private ManagedInstanceLicenseType licenseType; /* * The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ - @JsonProperty(value = "vCores") private Integer vCores; /* * Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value * depends on the selected hardware family and number of vCores. */ - @JsonProperty(value = "storageSizeInGB") private Integer storageSizeInGB; /* * Collation of the managed instance. */ - @JsonProperty(value = "collation") private String collation; /* * The Dns Zone that the managed instance is in. */ - @JsonProperty(value = "dnsZone", access = JsonProperty.Access.WRITE_ONLY) private String dnsZone; /* * The resource id of another managed instance whose DNS zone this managed instance will share after creation. */ - @JsonProperty(value = "dnsZonePartner") private String dnsZonePartner; /* * Whether or not the public data endpoint is enabled. */ - @JsonProperty(value = "publicDataEndpointEnabled") private Boolean publicDataEndpointEnabled; /* * The resource identifier of the source managed instance associated with create operation of this instance. */ - @JsonProperty(value = "sourceManagedInstanceId") private String sourceManagedInstanceId; /* * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. */ - @JsonProperty(value = "restorePointInTime") private OffsetDateTime restorePointInTime; /* * Connection type used for connecting to the instance. */ - @JsonProperty(value = "proxyOverride") private ManagedInstanceProxyOverride proxyOverride; /* @@ -139,31 +130,26 @@ public final class ManagedInstanceProperties { * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". */ - @JsonProperty(value = "timezoneId") private String timezoneId; /* * The Id of the instance pool this managed server belongs to. */ - @JsonProperty(value = "instancePoolId") private String instancePoolId; /* * Specifies maintenance configuration id to apply to this managed instance. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; /* * List of private endpoint connections on a managed instance. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' */ - @JsonProperty(value = "minimalTlsVersion") private String minimalTlsVersion; /* @@ -171,7 +157,6 @@ public final class ManagedInstanceProperties { * (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and * GeoZone(GeoZoneRedundantStorage) */ - @JsonProperty(value = "currentBackupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy currentBackupStorageRedundancy; /* @@ -179,46 +164,42 @@ public final class ManagedInstanceProperties { * (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and * GeoZone(GeoZoneRedundantStorage) */ - @JsonProperty(value = "requestedBackupStorageRedundancy") private BackupStorageRedundancy requestedBackupStorageRedundancy; /* * Whether or not the multi-az is enabled. */ - @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; /* * The resource id of a user assigned identity to be used by default. */ - @JsonProperty(value = "primaryUserAssignedIdentityId") private String primaryUserAssignedIdentityId; /* * A CMK URI of the key to use for encryption. */ - @JsonProperty(value = "keyId") private String keyId; /* * The Azure Active Directory administrator of the server. */ - @JsonProperty(value = "administrators") private ManagedInstanceExternalAdministrator administrators; /* * The managed instance's service principal. */ - @JsonProperty(value = "servicePrincipal") private ServicePrincipal servicePrincipal; - /** Creates an instance of ManagedInstanceProperties class. */ + /** + * Creates an instance of ManagedInstanceProperties class. + */ public ManagedInstanceProperties() { } /** * Get the provisioningState property: The provisioningState property. - * + * * @return the provisioningState value. */ public ManagedInstancePropertiesProvisioningState provisioningState() { @@ -227,12 +208,12 @@ public ManagedInstancePropertiesProvisioningState provisioningState() { /** * Get the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @return the managedInstanceCreateMode value. */ public ManagedServerCreateMode managedInstanceCreateMode() { @@ -241,12 +222,12 @@ public ManagedServerCreateMode managedInstanceCreateMode() { /** * Set the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @param managedInstanceCreateMode the managedInstanceCreateMode value to set. * @return the ManagedInstanceProperties object itself. */ @@ -257,7 +238,7 @@ public ManagedInstanceProperties withManagedInstanceCreateMode(ManagedServerCrea /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the managed instance. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -267,7 +248,7 @@ public String fullyQualifiedDomainName() { /** * Get the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -277,7 +258,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @param administratorLogin the administratorLogin value to set. * @return the ManagedInstanceProperties object itself. */ @@ -289,7 +270,7 @@ public ManagedInstanceProperties withAdministratorLogin(String administratorLogi /** * Get the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -299,7 +280,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ManagedInstanceProperties object itself. */ @@ -310,7 +291,7 @@ public ManagedInstanceProperties withAdministratorLoginPassword(String administr /** * Get the subnetId property: Subnet resource ID for the managed instance. - * + * * @return the subnetId value. */ public String subnetId() { @@ -319,7 +300,7 @@ public String subnetId() { /** * Set the subnetId property: Subnet resource ID for the managed instance. - * + * * @param subnetId the subnetId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -330,7 +311,7 @@ public ManagedInstanceProperties withSubnetId(String subnetId) { /** * Get the state property: The state of the managed instance. - * + * * @return the state value. */ public String state() { @@ -340,7 +321,7 @@ public String state() { /** * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @return the licenseType value. */ public ManagedInstanceLicenseType licenseType() { @@ -350,7 +331,7 @@ public ManagedInstanceLicenseType licenseType() { /** * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @param licenseType the licenseType value to set. * @return the ManagedInstanceProperties object itself. */ @@ -361,7 +342,7 @@ public ManagedInstanceProperties withLicenseType(ManagedInstanceLicenseType lice /** * Get the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @return the vCores value. */ public Integer vCores() { @@ -370,7 +351,7 @@ public Integer vCores() { /** * Set the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @param vCores the vCores value to set. * @return the ManagedInstanceProperties object itself. */ @@ -382,7 +363,7 @@ public ManagedInstanceProperties withVCores(Integer vCores) { /** * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @return the storageSizeInGB value. */ public Integer storageSizeInGB() { @@ -392,7 +373,7 @@ public Integer storageSizeInGB() { /** * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @param storageSizeInGB the storageSizeInGB value to set. * @return the ManagedInstanceProperties object itself. */ @@ -403,7 +384,7 @@ public ManagedInstanceProperties withStorageSizeInGB(Integer storageSizeInGB) { /** * Get the collation property: Collation of the managed instance. - * + * * @return the collation value. */ public String collation() { @@ -412,7 +393,7 @@ public String collation() { /** * Set the collation property: Collation of the managed instance. - * + * * @param collation the collation value to set. * @return the ManagedInstanceProperties object itself. */ @@ -423,7 +404,7 @@ public ManagedInstanceProperties withCollation(String collation) { /** * Get the dnsZone property: The Dns Zone that the managed instance is in. - * + * * @return the dnsZone value. */ public String dnsZone() { @@ -433,7 +414,7 @@ public String dnsZone() { /** * Get the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @return the dnsZonePartner value. */ public String dnsZonePartner() { @@ -443,7 +424,7 @@ public String dnsZonePartner() { /** * Set the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @param dnsZonePartner the dnsZonePartner value to set. * @return the ManagedInstanceProperties object itself. */ @@ -454,7 +435,7 @@ public ManagedInstanceProperties withDnsZonePartner(String dnsZonePartner) { /** * Get the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @return the publicDataEndpointEnabled value. */ public Boolean publicDataEndpointEnabled() { @@ -463,7 +444,7 @@ public Boolean publicDataEndpointEnabled() { /** * Set the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @param publicDataEndpointEnabled the publicDataEndpointEnabled value to set. * @return the ManagedInstanceProperties object itself. */ @@ -475,7 +456,7 @@ public ManagedInstanceProperties withPublicDataEndpointEnabled(Boolean publicDat /** * Get the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @return the sourceManagedInstanceId value. */ public String sourceManagedInstanceId() { @@ -485,7 +466,7 @@ public String sourceManagedInstanceId() { /** * Set the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @param sourceManagedInstanceId the sourceManagedInstanceId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -497,7 +478,7 @@ public ManagedInstanceProperties withSourceManagedInstanceId(String sourceManage /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -507,7 +488,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedInstanceProperties object itself. */ @@ -518,7 +499,7 @@ public ManagedInstanceProperties withRestorePointInTime(OffsetDateTime restorePo /** * Get the proxyOverride property: Connection type used for connecting to the instance. - * + * * @return the proxyOverride value. */ public ManagedInstanceProxyOverride proxyOverride() { @@ -527,7 +508,7 @@ public ManagedInstanceProxyOverride proxyOverride() { /** * Set the proxyOverride property: Connection type used for connecting to the instance. - * + * * @param proxyOverride the proxyOverride value to set. * @return the ManagedInstanceProperties object itself. */ @@ -537,13 +518,13 @@ public ManagedInstanceProperties withProxyOverride(ManagedInstanceProxyOverride } /** - * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @return the timezoneId value. */ public String timezoneId() { @@ -551,13 +532,13 @@ public String timezoneId() { } /** - * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @param timezoneId the timezoneId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -568,7 +549,7 @@ public ManagedInstanceProperties withTimezoneId(String timezoneId) { /** * Get the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @return the instancePoolId value. */ public String instancePoolId() { @@ -577,7 +558,7 @@ public String instancePoolId() { /** * Set the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @param instancePoolId the instancePoolId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -589,7 +570,7 @@ public ManagedInstanceProperties withInstancePoolId(String instancePoolId) { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -599,7 +580,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -610,7 +591,7 @@ public ManagedInstanceProperties withMaintenanceConfigurationId(String maintenan /** * Get the privateEndpointConnections property: List of private endpoint connections on a managed instance. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -619,7 +600,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -628,7 +609,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ManagedInstanceProperties object itself. */ @@ -641,7 +622,7 @@ public ManagedInstanceProperties withMinimalTlsVersion(String minimalTlsVersion) * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -652,7 +633,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -663,19 +644,19 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the ManagedInstanceProperties object itself. */ - public ManagedInstanceProperties withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public ManagedInstanceProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; return this; } /** * Get the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -684,7 +665,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedInstanceProperties object itself. */ @@ -696,7 +677,7 @@ public ManagedInstanceProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -706,7 +687,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -717,7 +698,7 @@ public ManagedInstanceProperties withPrimaryUserAssignedIdentityId(String primar /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -726,7 +707,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ManagedInstanceProperties object itself. */ @@ -737,7 +718,7 @@ public ManagedInstanceProperties withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ManagedInstanceExternalAdministrator administrators() { @@ -746,7 +727,7 @@ public ManagedInstanceExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ManagedInstanceProperties object itself. */ @@ -757,7 +738,7 @@ public ManagedInstanceProperties withAdministrators(ManagedInstanceExternalAdmin /** * Get the servicePrincipal property: The managed instance's service principal. - * + * * @return the servicePrincipal value. */ public ServicePrincipal servicePrincipal() { @@ -766,7 +747,7 @@ public ServicePrincipal servicePrincipal() { /** * Set the servicePrincipal property: The managed instance's service principal. - * + * * @param servicePrincipal the servicePrincipal value to set. * @return the ManagedInstanceProperties object itself. */ @@ -777,7 +758,7 @@ public ManagedInstanceProperties withServicePrincipal(ServicePrincipal servicePr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -791,4 +772,134 @@ public void validate() { servicePrincipal().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managedInstanceCreateMode", + this.managedInstanceCreateMode == null ? null : this.managedInstanceCreateMode.toString()); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeStringField("licenseType", this.licenseType == null ? null : this.licenseType.toString()); + jsonWriter.writeNumberField("vCores", this.vCores); + jsonWriter.writeNumberField("storageSizeInGB", this.storageSizeInGB); + jsonWriter.writeStringField("collation", this.collation); + jsonWriter.writeStringField("dnsZonePartner", this.dnsZonePartner); + jsonWriter.writeBooleanField("publicDataEndpointEnabled", this.publicDataEndpointEnabled); + jsonWriter.writeStringField("sourceManagedInstanceId", this.sourceManagedInstanceId); + jsonWriter.writeStringField("restorePointInTime", + this.restorePointInTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.restorePointInTime)); + jsonWriter.writeStringField("proxyOverride", this.proxyOverride == null ? null : this.proxyOverride.toString()); + jsonWriter.writeStringField("timezoneId", this.timezoneId); + jsonWriter.writeStringField("instancePoolId", this.instancePoolId); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + jsonWriter.writeStringField("minimalTlsVersion", this.minimalTlsVersion); + jsonWriter.writeStringField("requestedBackupStorageRedundancy", + this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); + jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); + jsonWriter.writeStringField("primaryUserAssignedIdentityId", this.primaryUserAssignedIdentityId); + jsonWriter.writeStringField("keyId", this.keyId); + jsonWriter.writeJsonField("administrators", this.administrators); + jsonWriter.writeJsonField("servicePrincipal", this.servicePrincipal); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceProperties. + */ + public static ManagedInstanceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceProperties deserializedManagedInstanceProperties = new ManagedInstanceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedManagedInstanceProperties.provisioningState + = ManagedInstancePropertiesProvisioningState.fromString(reader.getString()); + } else if ("managedInstanceCreateMode".equals(fieldName)) { + deserializedManagedInstanceProperties.managedInstanceCreateMode + = ManagedServerCreateMode.fromString(reader.getString()); + } else if ("fullyQualifiedDomainName".equals(fieldName)) { + deserializedManagedInstanceProperties.fullyQualifiedDomainName = reader.getString(); + } else if ("administratorLogin".equals(fieldName)) { + deserializedManagedInstanceProperties.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedManagedInstanceProperties.administratorLoginPassword = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedManagedInstanceProperties.subnetId = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedManagedInstanceProperties.state = reader.getString(); + } else if ("licenseType".equals(fieldName)) { + deserializedManagedInstanceProperties.licenseType + = ManagedInstanceLicenseType.fromString(reader.getString()); + } else if ("vCores".equals(fieldName)) { + deserializedManagedInstanceProperties.vCores = reader.getNullable(JsonReader::getInt); + } else if ("storageSizeInGB".equals(fieldName)) { + deserializedManagedInstanceProperties.storageSizeInGB = reader.getNullable(JsonReader::getInt); + } else if ("collation".equals(fieldName)) { + deserializedManagedInstanceProperties.collation = reader.getString(); + } else if ("dnsZone".equals(fieldName)) { + deserializedManagedInstanceProperties.dnsZone = reader.getString(); + } else if ("dnsZonePartner".equals(fieldName)) { + deserializedManagedInstanceProperties.dnsZonePartner = reader.getString(); + } else if ("publicDataEndpointEnabled".equals(fieldName)) { + deserializedManagedInstanceProperties.publicDataEndpointEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("sourceManagedInstanceId".equals(fieldName)) { + deserializedManagedInstanceProperties.sourceManagedInstanceId = reader.getString(); + } else if ("restorePointInTime".equals(fieldName)) { + deserializedManagedInstanceProperties.restorePointInTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("proxyOverride".equals(fieldName)) { + deserializedManagedInstanceProperties.proxyOverride + = ManagedInstanceProxyOverride.fromString(reader.getString()); + } else if ("timezoneId".equals(fieldName)) { + deserializedManagedInstanceProperties.timezoneId = reader.getString(); + } else if ("instancePoolId".equals(fieldName)) { + deserializedManagedInstanceProperties.instancePoolId = reader.getString(); + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedManagedInstanceProperties.maintenanceConfigurationId = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> ManagedInstancePecProperty.fromJson(reader1)); + deserializedManagedInstanceProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("minimalTlsVersion".equals(fieldName)) { + deserializedManagedInstanceProperties.minimalTlsVersion = reader.getString(); + } else if ("currentBackupStorageRedundancy".equals(fieldName)) { + deserializedManagedInstanceProperties.currentBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("requestedBackupStorageRedundancy".equals(fieldName)) { + deserializedManagedInstanceProperties.requestedBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedManagedInstanceProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("primaryUserAssignedIdentityId".equals(fieldName)) { + deserializedManagedInstanceProperties.primaryUserAssignedIdentityId = reader.getString(); + } else if ("keyId".equals(fieldName)) { + deserializedManagedInstanceProperties.keyId = reader.getString(); + } else if ("administrators".equals(fieldName)) { + deserializedManagedInstanceProperties.administrators + = ManagedInstanceExternalAdministrator.fromJson(reader); + } else if ("servicePrincipal".equals(fieldName)) { + deserializedManagedInstanceProperties.servicePrincipal = ServicePrincipal.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java index 271a1ff9e83f4..c0c86ca3b834c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Database query. */ +/** + * Database query. + */ @Fluent public final class ManagedInstanceQueryInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private QueryProperties innerProperties; - /** Creates an instance of ManagedInstanceQueryInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceQueryInner class. + */ public ManagedInstanceQueryInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private QueryProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the queryText property: Query text. - * + * * @return the queryText value. */ public String queryText() { @@ -41,7 +92,7 @@ public String queryText() { /** * Set the queryText property: Query text. - * + * * @param queryText the queryText value to set. * @return the ManagedInstanceQueryInner object itself. */ @@ -55,7 +106,7 @@ public ManagedInstanceQueryInner withQueryText(String queryText) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -63,4 +114,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceQueryInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceQueryInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceQueryInner. + */ + public static ManagedInstanceQueryInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceQueryInner deserializedManagedInstanceQueryInner = new ManagedInstanceQueryInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceQueryInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceQueryInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceQueryInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceQueryInner.innerProperties = QueryProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceQueryInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java index 0a159b906e202..cb0c03feae06d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A managed instance vulnerability assessment. */ +/** + * A managed instance vulnerability assessment. + */ @Fluent public final class ManagedInstanceVulnerabilityAssessmentInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceVulnerabilityAssessmentProperties innerProperties; - /** Creates an instance of ManagedInstanceVulnerabilityAssessmentInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedInstanceVulnerabilityAssessmentInner class. + */ public ManagedInstanceVulnerabilityAssessmentInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceVulnerabilityAssessmentProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -44,7 +95,7 @@ public String storageContainerPath() { /** * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the ManagedInstanceVulnerabilityAssessmentInner object itself. */ @@ -60,7 +111,7 @@ public ManagedInstanceVulnerabilityAssessmentInner withStorageContainerPath(Stri * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -71,7 +122,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the ManagedInstanceVulnerabilityAssessmentInner object itself. */ @@ -87,7 +138,7 @@ public ManagedInstanceVulnerabilityAssessmentInner withStorageContainerSasKey(St * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -98,7 +149,7 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ManagedInstanceVulnerabilityAssessmentInner object itself. */ @@ -112,7 +163,7 @@ public ManagedInstanceVulnerabilityAssessmentInner withStorageAccountAccessKey(S /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -121,12 +172,12 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the ManagedInstanceVulnerabilityAssessmentInner object itself. */ - public ManagedInstanceVulnerabilityAssessmentInner withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public ManagedInstanceVulnerabilityAssessmentInner + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { if (this.innerProperties() == null) { this.innerProperties = new ManagedInstanceVulnerabilityAssessmentProperties(); } @@ -136,7 +187,7 @@ public ManagedInstanceVulnerabilityAssessmentInner withRecurringScans( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -144,4 +195,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceVulnerabilityAssessmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceVulnerabilityAssessmentInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceVulnerabilityAssessmentInner. + */ + public static ManagedInstanceVulnerabilityAssessmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceVulnerabilityAssessmentInner deserializedManagedInstanceVulnerabilityAssessmentInner + = new ManagedInstanceVulnerabilityAssessmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentInner.innerProperties + = ManagedInstanceVulnerabilityAssessmentProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceVulnerabilityAssessmentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java index b3a2f45be4376..45697d849cf6a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java @@ -6,16 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a managed instance vulnerability assessment. */ +/** + * Properties of a managed instance vulnerability assessment. + */ @Fluent -public final class ManagedInstanceVulnerabilityAssessmentProperties { +public final class ManagedInstanceVulnerabilityAssessmentProperties + implements JsonSerializable { /* * A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ - @JsonProperty(value = "storageContainerPath", required = true) private String storageContainerPath; /* @@ -23,7 +29,6 @@ public final class ManagedInstanceVulnerabilityAssessmentProperties { * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is * required. Applies only if the storage account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageContainerSasKey") private String storageContainerSasKey; /* @@ -31,23 +36,23 @@ public final class ManagedInstanceVulnerabilityAssessmentProperties { * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage * account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * The recurring scans settings */ - @JsonProperty(value = "recurringScans") private VulnerabilityAssessmentRecurringScansProperties recurringScans; - /** Creates an instance of ManagedInstanceVulnerabilityAssessmentProperties class. */ + /** + * Creates an instance of ManagedInstanceVulnerabilityAssessmentProperties class. + */ public ManagedInstanceVulnerabilityAssessmentProperties() { } /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -57,7 +62,7 @@ public String storageContainerPath() { /** * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the ManagedInstanceVulnerabilityAssessmentProperties object itself. */ @@ -70,7 +75,7 @@ public ManagedInstanceVulnerabilityAssessmentProperties withStorageContainerPath * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -81,7 +86,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the ManagedInstanceVulnerabilityAssessmentProperties object itself. */ @@ -94,7 +99,7 @@ public ManagedInstanceVulnerabilityAssessmentProperties withStorageContainerSasK * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -105,19 +110,19 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ManagedInstanceVulnerabilityAssessmentProperties object itself. */ - public ManagedInstanceVulnerabilityAssessmentProperties withStorageAccountAccessKey( - String storageAccountAccessKey) { + public ManagedInstanceVulnerabilityAssessmentProperties + withStorageAccountAccessKey(String storageAccountAccessKey) { this.storageAccountAccessKey = storageAccountAccessKey; return this; } /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -126,28 +131,26 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the ManagedInstanceVulnerabilityAssessmentProperties object itself. */ - public ManagedInstanceVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public ManagedInstanceVulnerabilityAssessmentProperties + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.recurringScans = recurringScans; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageContainerPath() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageContainerPath in model" - + " ManagedInstanceVulnerabilityAssessmentProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageContainerPath in model ManagedInstanceVulnerabilityAssessmentProperties")); } if (recurringScans() != null) { recurringScans().validate(); @@ -155,4 +158,55 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceVulnerabilityAssessmentProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageContainerPath", this.storageContainerPath); + jsonWriter.writeStringField("storageContainerSasKey", this.storageContainerSasKey); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeJsonField("recurringScans", this.recurringScans); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceVulnerabilityAssessmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceVulnerabilityAssessmentProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedInstanceVulnerabilityAssessmentProperties. + */ + public static ManagedInstanceVulnerabilityAssessmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceVulnerabilityAssessmentProperties deserializedManagedInstanceVulnerabilityAssessmentProperties + = new ManagedInstanceVulnerabilityAssessmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageContainerPath".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentProperties.storageContainerPath + = reader.getString(); + } else if ("storageContainerSasKey".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentProperties.storageContainerSasKey + = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentProperties.storageAccountAccessKey + = reader.getString(); + } else if ("recurringScans".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentProperties.recurringScans + = VulnerabilityAssessmentRecurringScansProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceVulnerabilityAssessmentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java index b4c03a8dabdb5..bb82b7597de52 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A managed server DNS alias. */ +/** + * A managed server DNS alias. + */ @Immutable public final class ManagedServerDnsAliasInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedServerDnsAliasProperties innerProperties; - /** Creates an instance of ManagedServerDnsAliasInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedServerDnsAliasInner class. + */ public ManagedServerDnsAliasInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedServerDnsAliasProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the azureDnsRecord property: The fully qualified DNS record for managed server alias. - * + * * @return the azureDnsRecord value. */ public String azureDnsRecord() { @@ -41,7 +92,7 @@ public String azureDnsRecord() { /** * Get the publicAzureDnsRecord property: The fully qualified public DNS record for managed server alias. - * + * * @return the publicAzureDnsRecord value. */ public String publicAzureDnsRecord() { @@ -50,7 +101,7 @@ public String publicAzureDnsRecord() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -58,4 +109,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerDnsAliasInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerDnsAliasInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServerDnsAliasInner. + */ + public static ManagedServerDnsAliasInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerDnsAliasInner deserializedManagedServerDnsAliasInner = new ManagedServerDnsAliasInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedServerDnsAliasInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedServerDnsAliasInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedServerDnsAliasInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedServerDnsAliasInner.innerProperties + = ManagedServerDnsAliasProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerDnsAliasInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java index 5b61a8c9ef4b7..4383a1e0d260e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a managed server DNS alias. */ +/** + * Properties of a managed server DNS alias. + */ @Immutable -public final class ManagedServerDnsAliasProperties { +public final class ManagedServerDnsAliasProperties implements JsonSerializable { /* * The fully qualified DNS record for managed server alias */ - @JsonProperty(value = "azureDnsRecord", access = JsonProperty.Access.WRITE_ONLY) private String azureDnsRecord; /* * The fully qualified public DNS record for managed server alias */ - @JsonProperty(value = "publicAzureDnsRecord", access = JsonProperty.Access.WRITE_ONLY) private String publicAzureDnsRecord; - /** Creates an instance of ManagedServerDnsAliasProperties class. */ + /** + * Creates an instance of ManagedServerDnsAliasProperties class. + */ public ManagedServerDnsAliasProperties() { } /** * Get the azureDnsRecord property: The fully qualified DNS record for managed server alias. - * + * * @return the azureDnsRecord value. */ public String azureDnsRecord() { @@ -37,7 +43,7 @@ public String azureDnsRecord() { /** * Get the publicAzureDnsRecord property: The fully qualified public DNS record for managed server alias. - * + * * @return the publicAzureDnsRecord value. */ public String publicAzureDnsRecord() { @@ -46,9 +52,47 @@ public String publicAzureDnsRecord() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerDnsAliasProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerDnsAliasProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServerDnsAliasProperties. + */ + public static ManagedServerDnsAliasProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerDnsAliasProperties deserializedManagedServerDnsAliasProperties + = new ManagedServerDnsAliasProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureDnsRecord".equals(fieldName)) { + deserializedManagedServerDnsAliasProperties.azureDnsRecord = reader.getString(); + } else if ("publicAzureDnsRecord".equals(fieldName)) { + deserializedManagedServerDnsAliasProperties.publicAzureDnsRecord = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerDnsAliasProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerSecurityAlertPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerSecurityAlertPolicyInner.java index 1f12df317832f..efa761199c606 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerSecurityAlertPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerSecurityAlertPolicyInner.java @@ -7,33 +7,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A managed server security alert policy. */ +/** + * A managed server security alert policy. + */ @Fluent public final class ManagedServerSecurityAlertPolicyInner extends ProxyResource { /* * SystemData of SecurityAlertPolicyResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") - private SecurityAlertsPolicyProperties innerProperties; + private SecurityAlertsPolicyPropertiesAutoGenerated innerProperties; - /** Creates an instance of ManagedServerSecurityAlertPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedServerSecurityAlertPolicyInner class. + */ public ManagedServerSecurityAlertPolicyInner() { } /** * Get the systemData property: SystemData of SecurityAlertPolicyResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -42,17 +62,47 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ - private SecurityAlertsPolicyProperties innerProperties() { + private SecurityAlertsPolicyPropertiesAutoGenerated innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -62,13 +112,13 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withState(state); return this; @@ -77,7 +127,7 @@ public ManagedServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -87,13 +137,13 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withDisabledAlerts(disabledAlerts); return this; @@ -101,7 +151,7 @@ public ManagedServerSecurityAlertPolicyInner withDisabledAlerts(List dis /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -110,13 +160,13 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withEmailAddresses(emailAddresses); return this; @@ -124,7 +174,7 @@ public ManagedServerSecurityAlertPolicyInner withEmailAddresses(List ema /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -133,13 +183,13 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); return this; @@ -148,7 +198,7 @@ public ManagedServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emai /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -158,13 +208,13 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withStorageEndpoint(storageEndpoint); return this; @@ -173,7 +223,7 @@ public ManagedServerSecurityAlertPolicyInner withStorageEndpoint(String storageE /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -183,13 +233,13 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); return this; @@ -197,7 +247,7 @@ public ManagedServerSecurityAlertPolicyInner withStorageAccountAccessKey(String /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -206,13 +256,13 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the ManagedServerSecurityAlertPolicyInner object itself. */ public ManagedServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withRetentionDays(retentionDays); return this; @@ -220,7 +270,7 @@ public ManagedServerSecurityAlertPolicyInner withRetentionDays(Integer retention /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -229,7 +279,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -237,4 +287,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerSecurityAlertPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerSecurityAlertPolicyInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServerSecurityAlertPolicyInner. + */ + public static ManagedServerSecurityAlertPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerSecurityAlertPolicyInner deserializedManagedServerSecurityAlertPolicyInner + = new ManagedServerSecurityAlertPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.innerProperties + = SecurityAlertsPolicyPropertiesAutoGenerated.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerSecurityAlertPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java index ad9c46bfd1a69..f2cebb1fa9a6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A managed database transparent data encryption state. */ +/** + * A managed database transparent data encryption state. + */ @Fluent public final class ManagedTransparentDataEncryptionInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedTransparentDataEncryptionProperties innerProperties; - /** Creates an instance of ManagedTransparentDataEncryptionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedTransparentDataEncryptionInner class. + */ public ManagedTransparentDataEncryptionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedTransparentDataEncryptionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the transparent data encryption. - * + * * @return the state value. */ public TransparentDataEncryptionState state() { @@ -42,7 +93,7 @@ public TransparentDataEncryptionState state() { /** * Set the state property: Specifies the state of the transparent data encryption. - * + * * @param state the state value to set. * @return the ManagedTransparentDataEncryptionInner object itself. */ @@ -56,7 +107,7 @@ public ManagedTransparentDataEncryptionInner withState(TransparentDataEncryption /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -64,4 +115,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedTransparentDataEncryptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedTransparentDataEncryptionInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedTransparentDataEncryptionInner. + */ + public static ManagedTransparentDataEncryptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedTransparentDataEncryptionInner deserializedManagedTransparentDataEncryptionInner + = new ManagedTransparentDataEncryptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionInner.innerProperties + = ManagedTransparentDataEncryptionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedTransparentDataEncryptionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java index c30f42cde1c66..77198d2fac9ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java @@ -6,25 +6,33 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a transparent data encryption. */ +/** + * Properties of a transparent data encryption. + */ @Fluent -public final class ManagedTransparentDataEncryptionProperties { +public final class ManagedTransparentDataEncryptionProperties + implements JsonSerializable { /* * Specifies the state of the transparent data encryption. */ - @JsonProperty(value = "state", required = true) private TransparentDataEncryptionState state; - /** Creates an instance of ManagedTransparentDataEncryptionProperties class. */ + /** + * Creates an instance of ManagedTransparentDataEncryptionProperties class. + */ public ManagedTransparentDataEncryptionProperties() { } /** * Get the state property: Specifies the state of the transparent data encryption. - * + * * @return the state value. */ public TransparentDataEncryptionState state() { @@ -33,7 +41,7 @@ public TransparentDataEncryptionState state() { /** * Set the state property: Specifies the state of the transparent data encryption. - * + * * @param state the state value to set. * @return the ManagedTransparentDataEncryptionProperties object itself. */ @@ -44,17 +52,55 @@ public ManagedTransparentDataEncryptionProperties withState(TransparentDataEncry /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ManagedTransparentDataEncryptionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model ManagedTransparentDataEncryptionProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedTransparentDataEncryptionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedTransparentDataEncryptionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedTransparentDataEncryptionProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedTransparentDataEncryptionProperties. + */ + public static ManagedTransparentDataEncryptionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedTransparentDataEncryptionProperties deserializedManagedTransparentDataEncryptionProperties + = new ManagedTransparentDataEncryptionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionProperties.state + = TransparentDataEncryptionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedTransparentDataEncryptionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java index 8962aa89fb7e7..0434e07817536 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java @@ -5,47 +5,49 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.OperationDisplay; import com.azure.resourcemanager.sql.models.OperationOrigin; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** SQL REST API operation definition. */ +/** + * SQL REST API operation definition. + */ @Immutable -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * The name of the operation being performed on this particular object. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The localized display information for this particular operation / action. */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) private OperationDisplay display; /* * The intended executor of the operation. */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private OperationOrigin origin; /* * Additional descriptions for the operation. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation being performed on this particular object. - * + * * @return the name value. */ public String name() { @@ -54,7 +56,7 @@ public String name() { /** * Get the display property: The localized display information for this particular operation / action. - * + * * @return the display value. */ public OperationDisplay display() { @@ -63,7 +65,7 @@ public OperationDisplay display() { /** * Get the origin property: The intended executor of the operation. - * + * * @return the origin value. */ public OperationOrigin origin() { @@ -72,7 +74,7 @@ public OperationOrigin origin() { /** * Get the properties property: Additional descriptions for the operation. - * + * * @return the properties value. */ public Map properties() { @@ -81,7 +83,7 @@ public Map properties() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -89,4 +91,46 @@ public void validate() { display().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = OperationOrigin.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedOperationInner.properties = properties; + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java index 342eb5ec6f8be..584ca7320698d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java @@ -5,33 +5,39 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.EndpointDependency; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** An endpoint that the managed instance service requires outbound network access to. */ +/** + * An endpoint that the managed instance service requires outbound network access to. + */ @Immutable -public final class OutboundEnvironmentEndpointInner { +public final class OutboundEnvironmentEndpointInner implements JsonSerializable { /* * The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. */ - @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) private String category; /* * The endpoints that the managed instance service communicates with in order to function correctly. */ - @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) private List endpoints; - /** Creates an instance of OutboundEnvironmentEndpointInner class. */ + /** + * Creates an instance of OutboundEnvironmentEndpointInner class. + */ public OutboundEnvironmentEndpointInner() { } /** * Get the category property: The type of service accessed by the managed instance service, e.g., Azure Storage, * Azure Active Directory, etc. - * + * * @return the category value. */ public String category() { @@ -41,7 +47,7 @@ public String category() { /** * Get the endpoints property: The endpoints that the managed instance service communicates with in order to * function correctly. - * + * * @return the endpoints value. */ public List endpoints() { @@ -50,7 +56,7 @@ public List endpoints() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -58,4 +64,44 @@ public void validate() { endpoints().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundEnvironmentEndpointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundEnvironmentEndpointInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OutboundEnvironmentEndpointInner. + */ + public static OutboundEnvironmentEndpointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundEnvironmentEndpointInner deserializedOutboundEnvironmentEndpointInner + = new OutboundEnvironmentEndpointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("category".equals(fieldName)) { + deserializedOutboundEnvironmentEndpointInner.category = reader.getString(); + } else if ("endpoints".equals(fieldName)) { + List endpoints + = reader.readArray(reader1 -> EndpointDependency.fromJson(reader1)); + deserializedOutboundEnvironmentEndpointInner.endpoints = endpoints; + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundEnvironmentEndpointInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java index 479843f428acb..10ce0739b92af 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** An Azure SQL DB Server Outbound Firewall Rule. */ +/** + * An Azure SQL DB Server Outbound Firewall Rule. + */ @Immutable public final class OutboundFirewallRuleInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private OutboundFirewallRuleProperties innerProperties; - /** Creates an instance of OutboundFirewallRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of OutboundFirewallRuleInner class. + */ public OutboundFirewallRuleInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private OutboundFirewallRuleProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the provisioningState property: The state of the outbound rule. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -41,7 +92,7 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -49,4 +100,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundFirewallRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundFirewallRuleInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OutboundFirewallRuleInner. + */ + public static OutboundFirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundFirewallRuleInner deserializedOutboundFirewallRuleInner = new OutboundFirewallRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOutboundFirewallRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOutboundFirewallRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOutboundFirewallRuleInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedOutboundFirewallRuleInner.innerProperties + = OutboundFirewallRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundFirewallRuleInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java index e74508f1e8a57..8fa9f8e437dc6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of an outbound firewall rule. */ +/** + * The properties of an outbound firewall rule. + */ @Immutable -public final class OutboundFirewallRuleProperties { +public final class OutboundFirewallRuleProperties implements JsonSerializable { /* * The state of the outbound rule. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; - /** Creates an instance of OutboundFirewallRuleProperties class. */ + /** + * Creates an instance of OutboundFirewallRuleProperties class. + */ public OutboundFirewallRuleProperties() { } /** * Get the provisioningState property: The state of the outbound rule. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -31,9 +38,45 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundFirewallRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundFirewallRuleProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OutboundFirewallRuleProperties. + */ + public static OutboundFirewallRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundFirewallRuleProperties deserializedOutboundFirewallRuleProperties + = new OutboundFirewallRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedOutboundFirewallRuleProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundFirewallRuleProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionInner.java index e7c91c4544c34..3d3269baca79a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointProperty; import com.azure.resourcemanager.sql.models.PrivateEndpointProvisioningState; import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A private endpoint connection. */ +/** + * A private endpoint connection. + */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; - /** Creates an instance of PrivateEndpointConnectionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ public PrivateEndpointConnectionInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private PrivateEndpointConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { @@ -45,7 +96,7 @@ public PrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -59,7 +110,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointPropert /** * Get the groupIds property: Group IDs. - * + * * @return the groupIds value. */ public List groupIds() { @@ -68,7 +119,7 @@ public List groupIds() { /** * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { @@ -77,7 +128,7 @@ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionSta /** * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -92,7 +143,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( /** * Get the provisioningState property: State of the private endpoint connection. - * + * * @return the provisioningState value. */ public PrivateEndpointProvisioningState provisioningState() { @@ -101,7 +152,7 @@ public PrivateEndpointProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -109,4 +160,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionProperties.java index b98713b8df3ad..61c0f4e247649 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionProperties.java @@ -5,46 +5,51 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateEndpointProperty; import com.azure.resourcemanager.sql.models.PrivateEndpointProvisioningState; import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a private endpoint connection. */ +/** + * Properties of a private endpoint connection. + */ @Fluent -public final class PrivateEndpointConnectionProperties { +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { /* * Private endpoint which the connection belongs to. */ - @JsonProperty(value = "privateEndpoint") private PrivateEndpointProperty privateEndpoint; /* * Group IDs. */ - @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY) private List groupIds; /* * Connection state of the private endpoint connection. */ - @JsonProperty(value = "privateLinkServiceConnectionState") private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState; /* * State of the private endpoint connection. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointProvisioningState provisioningState; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { @@ -53,7 +58,7 @@ public PrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -64,7 +69,7 @@ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointPr /** * Get the groupIds property: Group IDs. - * + * * @return the groupIds value. */ public List groupIds() { @@ -73,7 +78,7 @@ public List groupIds() { /** * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { @@ -82,7 +87,7 @@ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionSta /** * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -94,7 +99,7 @@ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState /** * Get the provisioningState property: State of the private endpoint connection. - * + * * @return the provisioningState value. */ public PrivateEndpointProvisioningState provisioningState() { @@ -103,7 +108,7 @@ public PrivateEndpointProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,4 +119,52 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint + = PrivateEndpointProperty.fromJson(reader); + } else if ("groupIds".equals(fieldName)) { + List groupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionStateProperty.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = PrivateEndpointProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateLinkResourceInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateLinkResourceInner.java index 244567a738fc8..de2822b13b3fd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateLinkResourceInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.PrivateLinkResourceProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A private link resource. */ +/** + * A private link resource. + */ @Immutable public final class PrivateLinkResourceInner extends ProxyResource { /* * The private link resource group id. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private PrivateLinkResourceProperties properties; - /** Creates an instance of PrivateLinkResourceInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ public PrivateLinkResourceInner() { } /** * Get the properties property: The private link resource group id. - * + * * @return the properties value. */ public PrivateLinkResourceProperties properties() { return this.properties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -41,4 +92,46 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryProperties.java index 22861003e8581..4be0536760694 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryProperties.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a database query. */ +/** + * Properties of a database query. + */ @Fluent -public final class QueryProperties { +public final class QueryProperties implements JsonSerializable { /* * Query text. */ - @JsonProperty(value = "queryText") private String queryText; - /** Creates an instance of QueryProperties class. */ + /** + * Creates an instance of QueryProperties class. + */ public QueryProperties() { } /** * Get the queryText property: Query text. - * + * * @return the queryText value. */ public String queryText() { @@ -31,7 +38,7 @@ public String queryText() { /** * Set the queryText property: Query text. - * + * * @param queryText the queryText value to set. * @return the QueryProperties object itself. */ @@ -42,9 +49,45 @@ public QueryProperties withQueryText(String queryText) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("queryText", this.queryText); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QueryProperties. + */ + public static QueryProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryProperties deserializedQueryProperties = new QueryProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("queryText".equals(fieldName)) { + deserializedQueryProperties.queryText = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedQueryProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java index 82149cc9450a8..2c755a1634975 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.QueryMetricInterval; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The QueryStatistics model. */ +/** + * The QueryStatistics model. + */ @Fluent public final class QueryStatisticsInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private QueryStatisticsProperties innerProperties; - /** Creates an instance of QueryStatisticsInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of QueryStatisticsInner class. + */ public QueryStatisticsInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private QueryStatisticsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the databaseName property: Database name of the database in which this query was executed. - * + * * @return the databaseName value. */ public String databaseName() { @@ -43,7 +94,7 @@ public String databaseName() { /** * Get the queryId property: Unique query id (unique within one database). - * + * * @return the queryId value. */ public String queryId() { @@ -52,7 +103,7 @@ public String queryId() { /** * Get the startTime property: The start time for the metric (ISO-8601 format). - * + * * @return the startTime value. */ public String startTime() { @@ -61,7 +112,7 @@ public String startTime() { /** * Get the endTime property: The end time for the metric (ISO-8601 format). - * + * * @return the endTime value. */ public String endTime() { @@ -70,7 +121,7 @@ public String endTime() { /** * Get the intervals property: List of intervals with appropriate metric data. - * + * * @return the intervals value. */ public List intervals() { @@ -79,7 +130,7 @@ public List intervals() { /** * Set the intervals property: List of intervals with appropriate metric data. - * + * * @param intervals the intervals value to set. * @return the QueryStatisticsInner object itself. */ @@ -93,7 +144,7 @@ public QueryStatisticsInner withIntervals(List intervals) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -101,4 +152,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryStatisticsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryStatisticsInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the QueryStatisticsInner. + */ + public static QueryStatisticsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryStatisticsInner deserializedQueryStatisticsInner = new QueryStatisticsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedQueryStatisticsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedQueryStatisticsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedQueryStatisticsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedQueryStatisticsInner.innerProperties = QueryStatisticsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedQueryStatisticsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java index 8c7fa08554e57..f31923b9896f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java @@ -5,50 +5,53 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.QueryMetricInterval; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a query execution statistics. */ +/** + * Properties of a query execution statistics. + */ @Fluent -public final class QueryStatisticsProperties { +public final class QueryStatisticsProperties implements JsonSerializable { /* * Database name of the database in which this query was executed. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * Unique query id (unique within one database). */ - @JsonProperty(value = "queryId", access = JsonProperty.Access.WRITE_ONLY) private String queryId; /* * The start time for the metric (ISO-8601 format). */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private String startTime; /* * The end time for the metric (ISO-8601 format). */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) private String endTime; /* * List of intervals with appropriate metric data */ - @JsonProperty(value = "intervals") private List intervals; - /** Creates an instance of QueryStatisticsProperties class. */ + /** + * Creates an instance of QueryStatisticsProperties class. + */ public QueryStatisticsProperties() { } /** * Get the databaseName property: Database name of the database in which this query was executed. - * + * * @return the databaseName value. */ public String databaseName() { @@ -57,7 +60,7 @@ public String databaseName() { /** * Get the queryId property: Unique query id (unique within one database). - * + * * @return the queryId value. */ public String queryId() { @@ -66,7 +69,7 @@ public String queryId() { /** * Get the startTime property: The start time for the metric (ISO-8601 format). - * + * * @return the startTime value. */ public String startTime() { @@ -75,7 +78,7 @@ public String startTime() { /** * Get the endTime property: The end time for the metric (ISO-8601 format). - * + * * @return the endTime value. */ public String endTime() { @@ -84,7 +87,7 @@ public String endTime() { /** * Get the intervals property: List of intervals with appropriate metric data. - * + * * @return the intervals value. */ public List intervals() { @@ -93,7 +96,7 @@ public List intervals() { /** * Set the intervals property: List of intervals with appropriate metric data. - * + * * @param intervals the intervals value to set. * @return the QueryStatisticsProperties object itself. */ @@ -104,7 +107,7 @@ public QueryStatisticsProperties withIntervals(List interva /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -112,4 +115,50 @@ public void validate() { intervals().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("intervals", this.intervals, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryStatisticsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryStatisticsProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the QueryStatisticsProperties. + */ + public static QueryStatisticsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryStatisticsProperties deserializedQueryStatisticsProperties = new QueryStatisticsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseName".equals(fieldName)) { + deserializedQueryStatisticsProperties.databaseName = reader.getString(); + } else if ("queryId".equals(fieldName)) { + deserializedQueryStatisticsProperties.queryId = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedQueryStatisticsProperties.startTime = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedQueryStatisticsProperties.endTime = reader.getString(); + } else if ("intervals".equals(fieldName)) { + List intervals + = reader.readArray(reader1 -> QueryMetricInterval.fromJson(reader1)); + deserializedQueryStatisticsProperties.intervals = intervals; + } else { + reader.skipChildren(); + } + } + + return deserializedQueryStatisticsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java index 20e2ffd1e2cbe..58f3bd8af812a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java @@ -6,46 +6,65 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.RecommendedActionErrorInfo; import com.azure.resourcemanager.sql.models.RecommendedActionImpactRecord; import com.azure.resourcemanager.sql.models.RecommendedActionImplementationInfo; import com.azure.resourcemanager.sql.models.RecommendedActionInitiatedBy; import com.azure.resourcemanager.sql.models.RecommendedActionMetricInfo; import com.azure.resourcemanager.sql.models.RecommendedActionStateInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** Database, Server or Elastic Pool Recommended Action. */ +/** + * Database, Server or Elastic Pool Recommended Action. + */ @Fluent public final class RecommendedActionInner extends ProxyResource { /* * Resource kind. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource properties. */ - @JsonProperty(value = "properties") private RecommendedActionProperties innerProperties; - /** Creates an instance of RecommendedActionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RecommendedActionInner class. + */ public RecommendedActionInner() { } /** * Get the kind property: Resource kind. - * + * * @return the kind value. */ public String kind() { @@ -54,7 +73,7 @@ public String kind() { /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -63,16 +82,46 @@ public String location() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RecommendedActionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the recommendationReason property: Gets the reason for recommending this action. e.g., DuplicateIndex. - * + * * @return the recommendationReason value. */ public String recommendationReason() { @@ -81,7 +130,7 @@ public String recommendationReason() { /** * Get the validSince property: Gets the time since when this recommended action is valid. - * + * * @return the validSince value. */ public OffsetDateTime validSince() { @@ -90,7 +139,7 @@ public OffsetDateTime validSince() { /** * Get the lastRefresh property: Gets time when this recommended action was last refreshed. - * + * * @return the lastRefresh value. */ public OffsetDateTime lastRefresh() { @@ -99,7 +148,7 @@ public OffsetDateTime lastRefresh() { /** * Get the state property: Gets the info of the current state the recommended action is in. - * + * * @return the state value. */ public RecommendedActionStateInfo state() { @@ -108,7 +157,7 @@ public RecommendedActionStateInfo state() { /** * Set the state property: Gets the info of the current state the recommended action is in. - * + * * @param state the state value to set. * @return the RecommendedActionInner object itself. */ @@ -122,7 +171,7 @@ public RecommendedActionInner withState(RecommendedActionStateInfo state) { /** * Get the isExecutableAction property: Gets if this recommended action is actionable by user. - * + * * @return the isExecutableAction value. */ public Boolean isExecutableAction() { @@ -131,7 +180,7 @@ public Boolean isExecutableAction() { /** * Get the isRevertableAction property: Gets if changes applied by this recommended action can be reverted by user. - * + * * @return the isRevertableAction value. */ public Boolean isRevertableAction() { @@ -141,7 +190,7 @@ public Boolean isRevertableAction() { /** * Get the isArchivedAction property: Gets if this recommended action was suggested some time ago but user chose to * ignore this and system added a new recommended action again. - * + * * @return the isArchivedAction value. */ public Boolean isArchivedAction() { @@ -151,7 +200,7 @@ public Boolean isArchivedAction() { /** * Get the executeActionStartTime property: Gets the time when system started applying this recommended action on * the user resource. e.g., index creation start time. - * + * * @return the executeActionStartTime value. */ public OffsetDateTime executeActionStartTime() { @@ -161,7 +210,7 @@ public OffsetDateTime executeActionStartTime() { /** * Get the executeActionDuration property: Gets the time taken for applying this recommended action on user * resource. e.g., time taken for index creation. - * + * * @return the executeActionDuration value. */ public Duration executeActionDuration() { @@ -171,7 +220,7 @@ public Duration executeActionDuration() { /** * Get the revertActionStartTime property: Gets the time when system started reverting changes of this recommended * action on user resource. e.g., time when index drop is executed. - * + * * @return the revertActionStartTime value. */ public OffsetDateTime revertActionStartTime() { @@ -181,7 +230,7 @@ public OffsetDateTime revertActionStartTime() { /** * Get the revertActionDuration property: Gets the time taken for reverting changes of this recommended action on * user resource. e.g., time taken for dropping the created index. - * + * * @return the revertActionDuration value. */ public Duration revertActionDuration() { @@ -191,7 +240,7 @@ public Duration revertActionDuration() { /** * Get the executeActionInitiatedBy property: Gets if approval for applying this recommended action was given by * user/system. - * + * * @return the executeActionInitiatedBy value. */ public RecommendedActionInitiatedBy executeActionInitiatedBy() { @@ -201,7 +250,7 @@ public RecommendedActionInitiatedBy executeActionInitiatedBy() { /** * Get the executeActionInitiatedTime property: Gets the time when this recommended action was approved for * execution. - * + * * @return the executeActionInitiatedTime value. */ public OffsetDateTime executeActionInitiatedTime() { @@ -211,7 +260,7 @@ public OffsetDateTime executeActionInitiatedTime() { /** * Get the revertActionInitiatedBy property: Gets if approval for reverting this recommended action was given by * user/system. - * + * * @return the revertActionInitiatedBy value. */ public RecommendedActionInitiatedBy revertActionInitiatedBy() { @@ -220,7 +269,7 @@ public RecommendedActionInitiatedBy revertActionInitiatedBy() { /** * Get the revertActionInitiatedTime property: Gets the time when this recommended action was approved for revert. - * + * * @return the revertActionInitiatedTime value. */ public OffsetDateTime revertActionInitiatedTime() { @@ -230,7 +279,7 @@ public OffsetDateTime revertActionInitiatedTime() { /** * Get the score property: Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - * Medium Impact and 3 - High Impact. - * + * * @return the score value. */ public Integer score() { @@ -240,7 +289,7 @@ public Integer score() { /** * Get the implementationDetails property: Gets the implementation details of this recommended action for user to * apply it manually. - * + * * @return the implementationDetails value. */ public RecommendedActionImplementationInfo implementationDetails() { @@ -249,7 +298,7 @@ public RecommendedActionImplementationInfo implementationDetails() { /** * Get the errorDetails property: Gets the error details if and why this recommended action is put to error state. - * + * * @return the errorDetails value. */ public RecommendedActionErrorInfo errorDetails() { @@ -259,7 +308,7 @@ public RecommendedActionErrorInfo errorDetails() { /** * Get the estimatedImpact property: Gets the estimated impact info for this recommended action e.g., Estimated CPU * gain, Estimated Disk Space change. - * + * * @return the estimatedImpact value. */ public List estimatedImpact() { @@ -269,7 +318,7 @@ public List estimatedImpact() { /** * Get the observedImpact property: Gets the observed/actual impact info for this recommended action e.g., Actual * CPU gain, Actual Disk Space change. - * + * * @return the observedImpact value. */ public List observedImpact() { @@ -279,7 +328,7 @@ public List observedImpact() { /** * Get the timeSeries property: Gets the time series info of metrics for this recommended action e.g., CPU * consumption time series. - * + * * @return the timeSeries value. */ public List timeSeries() { @@ -288,7 +337,7 @@ public List timeSeries() { /** * Get the linkedObjects property: Gets the linked objects, if any. - * + * * @return the linkedObjects value. */ public List linkedObjects() { @@ -297,7 +346,7 @@ public List linkedObjects() { /** * Get the details property: Gets additional details specific to this recommended action. - * + * * @return the details value. */ public Map details() { @@ -306,7 +355,7 @@ public Map details() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -314,4 +363,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecommendedActionInner. + */ + public static RecommendedActionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionInner deserializedRecommendedActionInner = new RecommendedActionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRecommendedActionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRecommendedActionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRecommendedActionInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedRecommendedActionInner.kind = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedRecommendedActionInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRecommendedActionInner.innerProperties = RecommendedActionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java index ad7e650cb5b05..f7c3481ac6339 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java @@ -5,174 +5,158 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.RecommendedActionErrorInfo; import com.azure.resourcemanager.sql.models.RecommendedActionImpactRecord; import com.azure.resourcemanager.sql.models.RecommendedActionImplementationInfo; import com.azure.resourcemanager.sql.models.RecommendedActionInitiatedBy; import com.azure.resourcemanager.sql.models.RecommendedActionMetricInfo; import com.azure.resourcemanager.sql.models.RecommendedActionStateInfo; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.Duration; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** Properties for a Database, Server or Elastic Pool Recommended Action. */ +/** + * Properties for a Database, Server or Elastic Pool Recommended Action. + */ @Fluent -public final class RecommendedActionProperties { +public final class RecommendedActionProperties implements JsonSerializable { /* * Gets the reason for recommending this action. e.g., DuplicateIndex */ - @JsonProperty(value = "recommendationReason", access = JsonProperty.Access.WRITE_ONLY) private String recommendationReason; /* * Gets the time since when this recommended action is valid. */ - @JsonProperty(value = "validSince", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime validSince; /* * Gets time when this recommended action was last refreshed. */ - @JsonProperty(value = "lastRefresh", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastRefresh; /* * Gets the info of the current state the recommended action is in. */ - @JsonProperty(value = "state", required = true) private RecommendedActionStateInfo state; /* * Gets if this recommended action is actionable by user */ - @JsonProperty(value = "isExecutableAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isExecutableAction; /* * Gets if changes applied by this recommended action can be reverted by user */ - @JsonProperty(value = "isRevertableAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isRevertableAction; /* * Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new * recommended action again. */ - @JsonProperty(value = "isArchivedAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isArchivedAction; /* * Gets the time when system started applying this recommended action on the user resource. e.g., index creation * start time */ - @JsonProperty(value = "executeActionStartTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime executeActionStartTime; /* * Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation */ - @JsonProperty(value = "executeActionDuration", access = JsonProperty.Access.WRITE_ONLY) private Duration executeActionDuration; /* * Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when * index drop is executed. */ - @JsonProperty(value = "revertActionStartTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime revertActionStartTime; /* * Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for * dropping the created index. */ - @JsonProperty(value = "revertActionDuration", access = JsonProperty.Access.WRITE_ONLY) private Duration revertActionDuration; /* * Gets if approval for applying this recommended action was given by user/system. */ - @JsonProperty(value = "executeActionInitiatedBy", access = JsonProperty.Access.WRITE_ONLY) private RecommendedActionInitiatedBy executeActionInitiatedBy; /* * Gets the time when this recommended action was approved for execution. */ - @JsonProperty(value = "executeActionInitiatedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime executeActionInitiatedTime; /* * Gets if approval for reverting this recommended action was given by user/system. */ - @JsonProperty(value = "revertActionInitiatedBy", access = JsonProperty.Access.WRITE_ONLY) private RecommendedActionInitiatedBy revertActionInitiatedBy; /* * Gets the time when this recommended action was approved for revert. */ - @JsonProperty(value = "revertActionInitiatedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime revertActionInitiatedTime; /* * Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High * Impact */ - @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) private Integer score; /* * Gets the implementation details of this recommended action for user to apply it manually. */ - @JsonProperty(value = "implementationDetails", access = JsonProperty.Access.WRITE_ONLY) private RecommendedActionImplementationInfo implementationDetails; /* * Gets the error details if and why this recommended action is put to error state. */ - @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) private RecommendedActionErrorInfo errorDetails; /* * Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change */ - @JsonProperty(value = "estimatedImpact", access = JsonProperty.Access.WRITE_ONLY) private List estimatedImpact; /* * Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change */ - @JsonProperty(value = "observedImpact", access = JsonProperty.Access.WRITE_ONLY) private List observedImpact; /* * Gets the time series info of metrics for this recommended action e.g., CPU consumption time series */ - @JsonProperty(value = "timeSeries", access = JsonProperty.Access.WRITE_ONLY) private List timeSeries; /* * Gets the linked objects, if any. */ - @JsonProperty(value = "linkedObjects", access = JsonProperty.Access.WRITE_ONLY) private List linkedObjects; /* * Gets additional details specific to this recommended action. */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map details; - /** Creates an instance of RecommendedActionProperties class. */ + /** + * Creates an instance of RecommendedActionProperties class. + */ public RecommendedActionProperties() { } /** * Get the recommendationReason property: Gets the reason for recommending this action. e.g., DuplicateIndex. - * + * * @return the recommendationReason value. */ public String recommendationReason() { @@ -181,7 +165,7 @@ public String recommendationReason() { /** * Get the validSince property: Gets the time since when this recommended action is valid. - * + * * @return the validSince value. */ public OffsetDateTime validSince() { @@ -190,7 +174,7 @@ public OffsetDateTime validSince() { /** * Get the lastRefresh property: Gets time when this recommended action was last refreshed. - * + * * @return the lastRefresh value. */ public OffsetDateTime lastRefresh() { @@ -199,7 +183,7 @@ public OffsetDateTime lastRefresh() { /** * Get the state property: Gets the info of the current state the recommended action is in. - * + * * @return the state value. */ public RecommendedActionStateInfo state() { @@ -208,7 +192,7 @@ public RecommendedActionStateInfo state() { /** * Set the state property: Gets the info of the current state the recommended action is in. - * + * * @param state the state value to set. * @return the RecommendedActionProperties object itself. */ @@ -219,7 +203,7 @@ public RecommendedActionProperties withState(RecommendedActionStateInfo state) { /** * Get the isExecutableAction property: Gets if this recommended action is actionable by user. - * + * * @return the isExecutableAction value. */ public Boolean isExecutableAction() { @@ -228,7 +212,7 @@ public Boolean isExecutableAction() { /** * Get the isRevertableAction property: Gets if changes applied by this recommended action can be reverted by user. - * + * * @return the isRevertableAction value. */ public Boolean isRevertableAction() { @@ -238,7 +222,7 @@ public Boolean isRevertableAction() { /** * Get the isArchivedAction property: Gets if this recommended action was suggested some time ago but user chose to * ignore this and system added a new recommended action again. - * + * * @return the isArchivedAction value. */ public Boolean isArchivedAction() { @@ -248,7 +232,7 @@ public Boolean isArchivedAction() { /** * Get the executeActionStartTime property: Gets the time when system started applying this recommended action on * the user resource. e.g., index creation start time. - * + * * @return the executeActionStartTime value. */ public OffsetDateTime executeActionStartTime() { @@ -258,7 +242,7 @@ public OffsetDateTime executeActionStartTime() { /** * Get the executeActionDuration property: Gets the time taken for applying this recommended action on user * resource. e.g., time taken for index creation. - * + * * @return the executeActionDuration value. */ public Duration executeActionDuration() { @@ -268,7 +252,7 @@ public Duration executeActionDuration() { /** * Get the revertActionStartTime property: Gets the time when system started reverting changes of this recommended * action on user resource. e.g., time when index drop is executed. - * + * * @return the revertActionStartTime value. */ public OffsetDateTime revertActionStartTime() { @@ -278,7 +262,7 @@ public OffsetDateTime revertActionStartTime() { /** * Get the revertActionDuration property: Gets the time taken for reverting changes of this recommended action on * user resource. e.g., time taken for dropping the created index. - * + * * @return the revertActionDuration value. */ public Duration revertActionDuration() { @@ -288,7 +272,7 @@ public Duration revertActionDuration() { /** * Get the executeActionInitiatedBy property: Gets if approval for applying this recommended action was given by * user/system. - * + * * @return the executeActionInitiatedBy value. */ public RecommendedActionInitiatedBy executeActionInitiatedBy() { @@ -298,7 +282,7 @@ public RecommendedActionInitiatedBy executeActionInitiatedBy() { /** * Get the executeActionInitiatedTime property: Gets the time when this recommended action was approved for * execution. - * + * * @return the executeActionInitiatedTime value. */ public OffsetDateTime executeActionInitiatedTime() { @@ -308,7 +292,7 @@ public OffsetDateTime executeActionInitiatedTime() { /** * Get the revertActionInitiatedBy property: Gets if approval for reverting this recommended action was given by * user/system. - * + * * @return the revertActionInitiatedBy value. */ public RecommendedActionInitiatedBy revertActionInitiatedBy() { @@ -317,7 +301,7 @@ public RecommendedActionInitiatedBy revertActionInitiatedBy() { /** * Get the revertActionInitiatedTime property: Gets the time when this recommended action was approved for revert. - * + * * @return the revertActionInitiatedTime value. */ public OffsetDateTime revertActionInitiatedTime() { @@ -327,7 +311,7 @@ public OffsetDateTime revertActionInitiatedTime() { /** * Get the score property: Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - * Medium Impact and 3 - High Impact. - * + * * @return the score value. */ public Integer score() { @@ -337,7 +321,7 @@ public Integer score() { /** * Get the implementationDetails property: Gets the implementation details of this recommended action for user to * apply it manually. - * + * * @return the implementationDetails value. */ public RecommendedActionImplementationInfo implementationDetails() { @@ -346,7 +330,7 @@ public RecommendedActionImplementationInfo implementationDetails() { /** * Get the errorDetails property: Gets the error details if and why this recommended action is put to error state. - * + * * @return the errorDetails value. */ public RecommendedActionErrorInfo errorDetails() { @@ -356,7 +340,7 @@ public RecommendedActionErrorInfo errorDetails() { /** * Get the estimatedImpact property: Gets the estimated impact info for this recommended action e.g., Estimated CPU * gain, Estimated Disk Space change. - * + * * @return the estimatedImpact value. */ public List estimatedImpact() { @@ -366,7 +350,7 @@ public List estimatedImpact() { /** * Get the observedImpact property: Gets the observed/actual impact info for this recommended action e.g., Actual * CPU gain, Actual Disk Space change. - * + * * @return the observedImpact value. */ public List observedImpact() { @@ -376,7 +360,7 @@ public List observedImpact() { /** * Get the timeSeries property: Gets the time series info of metrics for this recommended action e.g., CPU * consumption time series. - * + * * @return the timeSeries value. */ public List timeSeries() { @@ -385,7 +369,7 @@ public List timeSeries() { /** * Get the linkedObjects property: Gets the linked objects, if any. - * + * * @return the linkedObjects value. */ public List linkedObjects() { @@ -394,7 +378,7 @@ public List linkedObjects() { /** * Get the details property: Gets additional details specific to this recommended action. - * + * * @return the details value. */ public Map details() { @@ -403,15 +387,14 @@ public Map details() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model RecommendedActionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model RecommendedActionProperties")); } else { state().validate(); } @@ -433,4 +416,107 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(RecommendedActionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("state", this.state); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecommendedActionProperties. + */ + public static RecommendedActionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionProperties deserializedRecommendedActionProperties = new RecommendedActionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedRecommendedActionProperties.state = RecommendedActionStateInfo.fromJson(reader); + } else if ("recommendationReason".equals(fieldName)) { + deserializedRecommendedActionProperties.recommendationReason = reader.getString(); + } else if ("validSince".equals(fieldName)) { + deserializedRecommendedActionProperties.validSince = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastRefresh".equals(fieldName)) { + deserializedRecommendedActionProperties.lastRefresh = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("isExecutableAction".equals(fieldName)) { + deserializedRecommendedActionProperties.isExecutableAction + = reader.getNullable(JsonReader::getBoolean); + } else if ("isRevertableAction".equals(fieldName)) { + deserializedRecommendedActionProperties.isRevertableAction + = reader.getNullable(JsonReader::getBoolean); + } else if ("isArchivedAction".equals(fieldName)) { + deserializedRecommendedActionProperties.isArchivedAction + = reader.getNullable(JsonReader::getBoolean); + } else if ("executeActionStartTime".equals(fieldName)) { + deserializedRecommendedActionProperties.executeActionStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("executeActionDuration".equals(fieldName)) { + deserializedRecommendedActionProperties.executeActionDuration + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("revertActionStartTime".equals(fieldName)) { + deserializedRecommendedActionProperties.revertActionStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("revertActionDuration".equals(fieldName)) { + deserializedRecommendedActionProperties.revertActionDuration + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("executeActionInitiatedBy".equals(fieldName)) { + deserializedRecommendedActionProperties.executeActionInitiatedBy + = RecommendedActionInitiatedBy.fromString(reader.getString()); + } else if ("executeActionInitiatedTime".equals(fieldName)) { + deserializedRecommendedActionProperties.executeActionInitiatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("revertActionInitiatedBy".equals(fieldName)) { + deserializedRecommendedActionProperties.revertActionInitiatedBy + = RecommendedActionInitiatedBy.fromString(reader.getString()); + } else if ("revertActionInitiatedTime".equals(fieldName)) { + deserializedRecommendedActionProperties.revertActionInitiatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("score".equals(fieldName)) { + deserializedRecommendedActionProperties.score = reader.getNullable(JsonReader::getInt); + } else if ("implementationDetails".equals(fieldName)) { + deserializedRecommendedActionProperties.implementationDetails + = RecommendedActionImplementationInfo.fromJson(reader); + } else if ("errorDetails".equals(fieldName)) { + deserializedRecommendedActionProperties.errorDetails = RecommendedActionErrorInfo.fromJson(reader); + } else if ("estimatedImpact".equals(fieldName)) { + List estimatedImpact + = reader.readArray(reader1 -> RecommendedActionImpactRecord.fromJson(reader1)); + deserializedRecommendedActionProperties.estimatedImpact = estimatedImpact; + } else if ("observedImpact".equals(fieldName)) { + List observedImpact + = reader.readArray(reader1 -> RecommendedActionImpactRecord.fromJson(reader1)); + deserializedRecommendedActionProperties.observedImpact = observedImpact; + } else if ("timeSeries".equals(fieldName)) { + List timeSeries + = reader.readArray(reader1 -> RecommendedActionMetricInfo.fromJson(reader1)); + deserializedRecommendedActionProperties.timeSeries = timeSeries; + } else if ("linkedObjects".equals(fieldName)) { + List linkedObjects = reader.readArray(reader1 -> reader1.getString()); + deserializedRecommendedActionProperties.linkedObjects = linkedObjects; + } else if ("details".equals(fieldName)) { + Map details = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedRecommendedActionProperties.details = details; + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java index 4bb79e564e38e..ad27198f4ee20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java @@ -6,43 +6,48 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of an operation executed on a recommended sensitivity label. */ +/** + * Properties of an operation executed on a recommended sensitivity label. + */ @Fluent -public final class RecommendedSensitivityLabelUpdateProperties { +public final class RecommendedSensitivityLabelUpdateProperties + implements JsonSerializable { /* * The op property. */ - @JsonProperty(value = "op", required = true) private RecommendedSensitivityLabelUpdateKind op; /* * Schema name of the column to update. */ - @JsonProperty(value = "schema", required = true) private String schema; /* * Table name of the column to update. */ - @JsonProperty(value = "table", required = true) private String table; /* * Column name to update. */ - @JsonProperty(value = "column", required = true) private String column; - /** Creates an instance of RecommendedSensitivityLabelUpdateProperties class. */ + /** + * Creates an instance of RecommendedSensitivityLabelUpdateProperties class. + */ public RecommendedSensitivityLabelUpdateProperties() { } /** * Get the op property: The op property. - * + * * @return the op value. */ public RecommendedSensitivityLabelUpdateKind op() { @@ -51,7 +56,7 @@ public RecommendedSensitivityLabelUpdateKind op() { /** * Set the op property: The op property. - * + * * @param op the op value to set. * @return the RecommendedSensitivityLabelUpdateProperties object itself. */ @@ -62,7 +67,7 @@ public RecommendedSensitivityLabelUpdateProperties withOp(RecommendedSensitivity /** * Get the schema property: Schema name of the column to update. - * + * * @return the schema value. */ public String schema() { @@ -71,7 +76,7 @@ public String schema() { /** * Set the schema property: Schema name of the column to update. - * + * * @param schema the schema value to set. * @return the RecommendedSensitivityLabelUpdateProperties object itself. */ @@ -82,7 +87,7 @@ public RecommendedSensitivityLabelUpdateProperties withSchema(String schema) { /** * Get the table property: Table name of the column to update. - * + * * @return the table value. */ public String table() { @@ -91,7 +96,7 @@ public String table() { /** * Set the table property: Table name of the column to update. - * + * * @param table the table value to set. * @return the RecommendedSensitivityLabelUpdateProperties object itself. */ @@ -102,7 +107,7 @@ public RecommendedSensitivityLabelUpdateProperties withTable(String table) { /** * Get the column property: Column name to update. - * + * * @return the column value. */ public String column() { @@ -111,7 +116,7 @@ public String column() { /** * Set the column property: Column name to update. - * + * * @param column the column value to set. * @return the RecommendedSensitivityLabelUpdateProperties object itself. */ @@ -122,35 +127,79 @@ public RecommendedSensitivityLabelUpdateProperties withColumn(String column) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (op() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model RecommendedSensitivityLabelUpdateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property op in model RecommendedSensitivityLabelUpdateProperties")); } if (schema() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model RecommendedSensitivityLabelUpdateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property schema in model RecommendedSensitivityLabelUpdateProperties")); } if (table() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model RecommendedSensitivityLabelUpdateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property table in model RecommendedSensitivityLabelUpdateProperties")); } if (column() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model RecommendedSensitivityLabelUpdateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property column in model RecommendedSensitivityLabelUpdateProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(RecommendedSensitivityLabelUpdateProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("op", this.op == null ? null : this.op.toString()); + jsonWriter.writeStringField("schema", this.schema); + jsonWriter.writeStringField("table", this.table); + jsonWriter.writeStringField("column", this.column); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedSensitivityLabelUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedSensitivityLabelUpdateProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecommendedSensitivityLabelUpdateProperties. + */ + public static RecommendedSensitivityLabelUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedSensitivityLabelUpdateProperties deserializedRecommendedSensitivityLabelUpdateProperties + = new RecommendedSensitivityLabelUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("op".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdateProperties.op + = RecommendedSensitivityLabelUpdateKind.fromString(reader.getString()); + } else if ("schema".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdateProperties.schema = reader.getString(); + } else if ("table".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdateProperties.table = reader.getString(); + } else if ("column".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdateProperties.column = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedSensitivityLabelUpdateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java index 84db507f9a205..005d3245d334a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** A recoverable database resource. */ +/** + * A recoverable database resource. + */ @Immutable public final class RecoverableDatabaseInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private RecoverableDatabaseProperties innerProperties; - /** Creates an instance of RecoverableDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RecoverableDatabaseInner class. + */ public RecoverableDatabaseInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RecoverableDatabaseProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the edition property: The edition of the database. - * + * * @return the edition value. */ public String edition() { @@ -42,7 +93,7 @@ public String edition() { /** * Get the serviceLevelObjective property: The service level objective name of the database. - * + * * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { @@ -51,7 +102,7 @@ public String serviceLevelObjective() { /** * Get the elasticPoolName property: The elastic pool name of the database. - * + * * @return the elasticPoolName value. */ public String elasticPoolName() { @@ -60,7 +111,7 @@ public String elasticPoolName() { /** * Get the lastAvailableBackupDate property: The last available backup date. - * + * * @return the lastAvailableBackupDate value. */ public OffsetDateTime lastAvailableBackupDate() { @@ -69,7 +120,7 @@ public OffsetDateTime lastAvailableBackupDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -77,4 +128,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableDatabaseInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecoverableDatabaseInner. + */ + public static RecoverableDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableDatabaseInner deserializedRecoverableDatabaseInner = new RecoverableDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRecoverableDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRecoverableDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRecoverableDatabaseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRecoverableDatabaseInner.innerProperties + = RecoverableDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java index ae0e55fda9da1..5aa31804e2a10 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java @@ -5,43 +5,48 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** The recoverable database's properties. */ +/** + * The recoverable database's properties. + */ @Immutable -public final class RecoverableDatabaseProperties { +public final class RecoverableDatabaseProperties implements JsonSerializable { /* * The edition of the database. */ - @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) private String edition; /* * The service level objective name of the database. */ - @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) private String serviceLevelObjective; /* * The elastic pool name of the database */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) private String elasticPoolName; /* * The last available backup date. */ - @JsonProperty(value = "lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastAvailableBackupDate; - /** Creates an instance of RecoverableDatabaseProperties class. */ + /** + * Creates an instance of RecoverableDatabaseProperties class. + */ public RecoverableDatabaseProperties() { } /** * Get the edition property: The edition of the database. - * + * * @return the edition value. */ public String edition() { @@ -50,7 +55,7 @@ public String edition() { /** * Get the serviceLevelObjective property: The service level objective name of the database. - * + * * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { @@ -59,7 +64,7 @@ public String serviceLevelObjective() { /** * Get the elasticPoolName property: The elastic pool name of the database. - * + * * @return the elasticPoolName value. */ public String elasticPoolName() { @@ -68,7 +73,7 @@ public String elasticPoolName() { /** * Get the lastAvailableBackupDate property: The last available backup date. - * + * * @return the lastAvailableBackupDate value. */ public OffsetDateTime lastAvailableBackupDate() { @@ -77,9 +82,52 @@ public OffsetDateTime lastAvailableBackupDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableDatabaseProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecoverableDatabaseProperties. + */ + public static RecoverableDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableDatabaseProperties deserializedRecoverableDatabaseProperties + = new RecoverableDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("edition".equals(fieldName)) { + deserializedRecoverableDatabaseProperties.edition = reader.getString(); + } else if ("serviceLevelObjective".equals(fieldName)) { + deserializedRecoverableDatabaseProperties.serviceLevelObjective = reader.getString(); + } else if ("elasticPoolName".equals(fieldName)) { + deserializedRecoverableDatabaseProperties.elasticPoolName = reader.getString(); + } else if ("lastAvailableBackupDate".equals(fieldName)) { + deserializedRecoverableDatabaseProperties.lastAvailableBackupDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java index 0ee7f518b827e..4ca9129d186c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A recoverable managed database resource. */ +/** + * A recoverable managed database resource. + */ @Immutable public final class RecoverableManagedDatabaseInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private RecoverableManagedDatabaseProperties innerProperties; - /** Creates an instance of RecoverableManagedDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RecoverableManagedDatabaseInner class. + */ public RecoverableManagedDatabaseInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RecoverableManagedDatabaseProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the lastAvailableBackupDate property: The last available backup date. - * + * * @return the lastAvailableBackupDate value. */ public String lastAvailableBackupDate() { @@ -41,7 +92,7 @@ public String lastAvailableBackupDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -49,4 +100,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableManagedDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableManagedDatabaseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecoverableManagedDatabaseInner. + */ + public static RecoverableManagedDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableManagedDatabaseInner deserializedRecoverableManagedDatabaseInner + = new RecoverableManagedDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRecoverableManagedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRecoverableManagedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRecoverableManagedDatabaseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRecoverableManagedDatabaseInner.innerProperties + = RecoverableManagedDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableManagedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java index 823c2771d3b5b..eddc039a126b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java @@ -5,24 +5,32 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The recoverable managed database's properties. */ +/** + * The recoverable managed database's properties. + */ @Immutable -public final class RecoverableManagedDatabaseProperties { +public final class RecoverableManagedDatabaseProperties + implements JsonSerializable { /* * The last available backup date. */ - @JsonProperty(value = "lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) private String lastAvailableBackupDate; - /** Creates an instance of RecoverableManagedDatabaseProperties class. */ + /** + * Creates an instance of RecoverableManagedDatabaseProperties class. + */ public RecoverableManagedDatabaseProperties() { } /** * Get the lastAvailableBackupDate property: The last available backup date. - * + * * @return the lastAvailableBackupDate value. */ public String lastAvailableBackupDate() { @@ -31,9 +39,45 @@ public String lastAvailableBackupDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableManagedDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableManagedDatabaseProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecoverableManagedDatabaseProperties. + */ + public static RecoverableManagedDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableManagedDatabaseProperties deserializedRecoverableManagedDatabaseProperties + = new RecoverableManagedDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastAvailableBackupDate".equals(fieldName)) { + deserializedRecoverableManagedDatabaseProperties.lastAvailableBackupDate = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableManagedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java index e145885766d90..7c7bd295c447d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ReplicationLinkType; import com.azure.resourcemanager.sql.models.ReplicationRole; import com.azure.resourcemanager.sql.models.ReplicationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A replication link. */ +/** + * A replication link. + */ @Immutable public final class ReplicationLinkInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ReplicationLinkProperties innerProperties; - /** Creates an instance of ReplicationLinkInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ReplicationLinkInner class. + */ public ReplicationLinkInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ReplicationLinkProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the partnerServer property: Resource partner server. - * + * * @return the partnerServer value. */ public String partnerServer() { @@ -45,7 +96,7 @@ public String partnerServer() { /** * Get the partnerDatabase property: Resource partner database. - * + * * @return the partnerDatabase value. */ public String partnerDatabase() { @@ -54,7 +105,7 @@ public String partnerDatabase() { /** * Get the partnerLocation property: Resource partner location. - * + * * @return the partnerLocation value. */ public String partnerLocation() { @@ -63,7 +114,7 @@ public String partnerLocation() { /** * Get the role property: Local replication role. - * + * * @return the role value. */ public ReplicationRole role() { @@ -72,7 +123,7 @@ public ReplicationRole role() { /** * Get the partnerRole property: Partner replication role. - * + * * @return the partnerRole value. */ public ReplicationRole partnerRole() { @@ -81,7 +132,7 @@ public ReplicationRole partnerRole() { /** * Get the replicationMode property: Replication mode. - * + * * @return the replicationMode value. */ public String replicationMode() { @@ -90,7 +141,7 @@ public String replicationMode() { /** * Get the startTime property: Time at which the link was created. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -99,7 +150,7 @@ public OffsetDateTime startTime() { /** * Get the percentComplete property: Seeding completion percentage for the link. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -108,7 +159,7 @@ public Integer percentComplete() { /** * Get the replicationState property: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - * + * * @return the replicationState value. */ public ReplicationState replicationState() { @@ -117,7 +168,7 @@ public ReplicationState replicationState() { /** * Get the isTerminationAllowed property: Whether the user is currently allowed to terminate the link. - * + * * @return the isTerminationAllowed value. */ public Boolean isTerminationAllowed() { @@ -126,7 +177,7 @@ public Boolean isTerminationAllowed() { /** * Get the linkType property: Link type (GEO, NAMED, STANDBY). - * + * * @return the linkType value. */ public ReplicationLinkType linkType() { @@ -135,7 +186,7 @@ public ReplicationLinkType linkType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -143,4 +194,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationLinkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationLinkInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReplicationLinkInner. + */ + public static ReplicationLinkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationLinkInner deserializedReplicationLinkInner = new ReplicationLinkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedReplicationLinkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedReplicationLinkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedReplicationLinkInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedReplicationLinkInner.innerProperties = ReplicationLinkProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationLinkInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java index fe71176b13eb3..50f9990cc6c20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java @@ -5,88 +5,86 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ReplicationLinkType; import com.azure.resourcemanager.sql.models.ReplicationRole; import com.azure.resourcemanager.sql.models.ReplicationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of a replication link. */ +/** + * Properties of a replication link. + */ @Immutable -public final class ReplicationLinkProperties { +public final class ReplicationLinkProperties implements JsonSerializable { /* * Resource partner server. */ - @JsonProperty(value = "partnerServer", access = JsonProperty.Access.WRITE_ONLY) private String partnerServer; /* * Resource partner database. */ - @JsonProperty(value = "partnerDatabase", access = JsonProperty.Access.WRITE_ONLY) private String partnerDatabase; /* * Resource partner location. */ - @JsonProperty(value = "partnerLocation", access = JsonProperty.Access.WRITE_ONLY) private String partnerLocation; /* * Local replication role. */ - @JsonProperty(value = "role", access = JsonProperty.Access.WRITE_ONLY) private ReplicationRole role; /* * Partner replication role. */ - @JsonProperty(value = "partnerRole", access = JsonProperty.Access.WRITE_ONLY) private ReplicationRole partnerRole; /* * Replication mode. */ - @JsonProperty(value = "replicationMode", access = JsonProperty.Access.WRITE_ONLY) private String replicationMode; /* * Time at which the link was created. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * Seeding completion percentage for the link. */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) private Integer percentComplete; /* * Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). */ - @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY) private ReplicationState replicationState; /* * Whether the user is currently allowed to terminate the link. */ - @JsonProperty(value = "isTerminationAllowed", access = JsonProperty.Access.WRITE_ONLY) private Boolean isTerminationAllowed; /* * Link type (GEO, NAMED, STANDBY). */ - @JsonProperty(value = "linkType", access = JsonProperty.Access.WRITE_ONLY) private ReplicationLinkType linkType; - /** Creates an instance of ReplicationLinkProperties class. */ + /** + * Creates an instance of ReplicationLinkProperties class. + */ public ReplicationLinkProperties() { } /** * Get the partnerServer property: Resource partner server. - * + * * @return the partnerServer value. */ public String partnerServer() { @@ -95,7 +93,7 @@ public String partnerServer() { /** * Get the partnerDatabase property: Resource partner database. - * + * * @return the partnerDatabase value. */ public String partnerDatabase() { @@ -104,7 +102,7 @@ public String partnerDatabase() { /** * Get the partnerLocation property: Resource partner location. - * + * * @return the partnerLocation value. */ public String partnerLocation() { @@ -113,7 +111,7 @@ public String partnerLocation() { /** * Get the role property: Local replication role. - * + * * @return the role value. */ public ReplicationRole role() { @@ -122,7 +120,7 @@ public ReplicationRole role() { /** * Get the partnerRole property: Partner replication role. - * + * * @return the partnerRole value. */ public ReplicationRole partnerRole() { @@ -131,7 +129,7 @@ public ReplicationRole partnerRole() { /** * Get the replicationMode property: Replication mode. - * + * * @return the replicationMode value. */ public String replicationMode() { @@ -140,7 +138,7 @@ public String replicationMode() { /** * Get the startTime property: Time at which the link was created. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -149,7 +147,7 @@ public OffsetDateTime startTime() { /** * Get the percentComplete property: Seeding completion percentage for the link. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -158,7 +156,7 @@ public Integer percentComplete() { /** * Get the replicationState property: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - * + * * @return the replicationState value. */ public ReplicationState replicationState() { @@ -167,7 +165,7 @@ public ReplicationState replicationState() { /** * Get the isTerminationAllowed property: Whether the user is currently allowed to terminate the link. - * + * * @return the isTerminationAllowed value. */ public Boolean isTerminationAllowed() { @@ -176,7 +174,7 @@ public Boolean isTerminationAllowed() { /** * Get the linkType property: Link type (GEO, NAMED, STANDBY). - * + * * @return the linkType value. */ public ReplicationLinkType linkType() { @@ -185,9 +183,67 @@ public ReplicationLinkType linkType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationLinkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationLinkProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationLinkProperties. + */ + public static ReplicationLinkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationLinkProperties deserializedReplicationLinkProperties = new ReplicationLinkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partnerServer".equals(fieldName)) { + deserializedReplicationLinkProperties.partnerServer = reader.getString(); + } else if ("partnerDatabase".equals(fieldName)) { + deserializedReplicationLinkProperties.partnerDatabase = reader.getString(); + } else if ("partnerLocation".equals(fieldName)) { + deserializedReplicationLinkProperties.partnerLocation = reader.getString(); + } else if ("role".equals(fieldName)) { + deserializedReplicationLinkProperties.role = ReplicationRole.fromString(reader.getString()); + } else if ("partnerRole".equals(fieldName)) { + deserializedReplicationLinkProperties.partnerRole = ReplicationRole.fromString(reader.getString()); + } else if ("replicationMode".equals(fieldName)) { + deserializedReplicationLinkProperties.replicationMode = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedReplicationLinkProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("percentComplete".equals(fieldName)) { + deserializedReplicationLinkProperties.percentComplete = reader.getNullable(JsonReader::getInt); + } else if ("replicationState".equals(fieldName)) { + deserializedReplicationLinkProperties.replicationState + = ReplicationState.fromString(reader.getString()); + } else if ("isTerminationAllowed".equals(fieldName)) { + deserializedReplicationLinkProperties.isTerminationAllowed + = reader.getNullable(JsonReader::getBoolean); + } else if ("linkType".equals(fieldName)) { + deserializedReplicationLinkProperties.linkType = ReplicationLinkType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationLinkProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java index 3a91cb7dce6ab..8e8e269c2fd4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java @@ -6,48 +6,64 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.Sku; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -/** A restorable dropped database resource. */ +/** + * A restorable dropped database resource. + */ @Fluent public final class RestorableDroppedDatabaseInner extends ProxyResource { /* * The name and tier of the SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource location. */ - @JsonProperty(value = "location") private String location; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Resource properties. */ - @JsonProperty(value = "properties") private RestorableDroppedDatabaseProperties innerProperties; - /** Creates an instance of RestorableDroppedDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RestorableDroppedDatabaseInner class. + */ public RestorableDroppedDatabaseInner() { } /** * Get the sku property: The name and tier of the SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -56,7 +72,7 @@ public Sku sku() { /** * Set the sku property: The name and tier of the SKU. - * + * * @param sku the sku value to set. * @return the RestorableDroppedDatabaseInner object itself. */ @@ -67,7 +83,7 @@ public RestorableDroppedDatabaseInner withSku(Sku sku) { /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -76,7 +92,7 @@ public String location() { /** * Set the location property: Resource location. - * + * * @param location the location value to set. * @return the RestorableDroppedDatabaseInner object itself. */ @@ -87,7 +103,7 @@ public RestorableDroppedDatabaseInner withLocation(String location) { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -96,7 +112,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the RestorableDroppedDatabaseInner object itself. */ @@ -107,16 +123,46 @@ public RestorableDroppedDatabaseInner withTags(Map tags) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RestorableDroppedDatabaseProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the databaseName property: The name of the database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -125,7 +171,7 @@ public String databaseName() { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -134,7 +180,7 @@ public Long maxSizeBytes() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -143,7 +189,7 @@ public OffsetDateTime creationDate() { /** * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * + * * @return the deletionDate value. */ public OffsetDateTime deletionDate() { @@ -152,7 +198,7 @@ public OffsetDateTime deletionDate() { /** * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -161,7 +207,7 @@ public OffsetDateTime earliestRestoreDate() { /** * Get the backupStorageRedundancy property: The storage account type used to store backups for this database. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -170,7 +216,7 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -181,4 +227,59 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedDatabaseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestorableDroppedDatabaseInner. + */ + public static RestorableDroppedDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedDatabaseInner deserializedRestorableDroppedDatabaseInner + = new RestorableDroppedDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.type = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.sku = Sku.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.location = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedRestorableDroppedDatabaseInner.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.innerProperties + = RestorableDroppedDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java index 444d4d1443ba2..4b384080fbb75 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java @@ -5,56 +5,60 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** The restorable dropped database's properties. */ +/** + * The restorable dropped database's properties. + */ @Immutable -public final class RestorableDroppedDatabaseProperties { +public final class RestorableDroppedDatabaseProperties + implements JsonSerializable { /* * The name of the database. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * The max size of the database expressed in bytes. */ - @JsonProperty(value = "maxSizeBytes", access = JsonProperty.Access.WRITE_ONLY) private Long maxSizeBytes; /* * The creation date of the database (ISO8601 format). */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * The deletion date of the database (ISO8601 format). */ - @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime deletionDate; /* * The earliest restore date of the database (ISO8601 format). */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestoreDate; /* * The storage account type used to store backups for this database. */ - @JsonProperty(value = "backupStorageRedundancy", access = JsonProperty.Access.WRITE_ONLY) private BackupStorageRedundancy backupStorageRedundancy; - /** Creates an instance of RestorableDroppedDatabaseProperties class. */ + /** + * Creates an instance of RestorableDroppedDatabaseProperties class. + */ public RestorableDroppedDatabaseProperties() { } /** * Get the databaseName property: The name of the database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -63,7 +67,7 @@ public String databaseName() { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -72,7 +76,7 @@ public Long maxSizeBytes() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -81,7 +85,7 @@ public OffsetDateTime creationDate() { /** * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * + * * @return the deletionDate value. */ public OffsetDateTime deletionDate() { @@ -90,7 +94,7 @@ public OffsetDateTime deletionDate() { /** * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -99,7 +103,7 @@ public OffsetDateTime earliestRestoreDate() { /** * Get the backupStorageRedundancy property: The storage account type used to store backups for this database. - * + * * @return the backupStorageRedundancy value. */ public BackupStorageRedundancy backupStorageRedundancy() { @@ -108,9 +112,60 @@ public BackupStorageRedundancy backupStorageRedundancy() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedDatabaseProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorableDroppedDatabaseProperties. + */ + public static RestorableDroppedDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedDatabaseProperties deserializedRestorableDroppedDatabaseProperties + = new RestorableDroppedDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseName".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.databaseName = reader.getString(); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.maxSizeBytes + = reader.getNullable(JsonReader::getLong); + } else if ("creationDate".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("deletionDate".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.deletionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("backupStorageRedundancy".equals(fieldName)) { + deserializedRestorableDroppedDatabaseProperties.backupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java index fa5430f748093..b91752a4b00d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java @@ -6,40 +6,95 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -/** A restorable dropped managed database resource. */ +/** + * A restorable dropped managed database resource. + */ @Fluent public final class RestorableDroppedManagedDatabaseInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") private RestorableDroppedManagedDatabaseProperties innerProperties; - /** Creates an instance of RestorableDroppedManagedDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RestorableDroppedManagedDatabaseInner class. + */ public RestorableDroppedManagedDatabaseInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RestorableDroppedManagedDatabaseProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public RestorableDroppedManagedDatabaseInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RestorableDroppedManagedDatabaseInner withTags(Map tags) { super.withTags(tags); @@ -48,7 +103,7 @@ public RestorableDroppedManagedDatabaseInner withTags(Map tags) /** * Get the databaseName property: The name of the database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -57,7 +112,7 @@ public String databaseName() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -66,7 +121,7 @@ public OffsetDateTime creationDate() { /** * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * + * * @return the deletionDate value. */ public OffsetDateTime deletionDate() { @@ -75,7 +130,7 @@ public OffsetDateTime deletionDate() { /** * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -84,7 +139,7 @@ public OffsetDateTime earliestRestoreDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -92,4 +147,56 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedManagedDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedManagedDatabaseInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestorableDroppedManagedDatabaseInner. + */ + public static RestorableDroppedManagedDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedManagedDatabaseInner deserializedRestorableDroppedManagedDatabaseInner + = new RestorableDroppedManagedDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedRestorableDroppedManagedDatabaseInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseInner.innerProperties + = RestorableDroppedManagedDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedManagedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java index 2cbabee47f7c5..afdefc70b71b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java @@ -5,43 +5,49 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** The restorable dropped managed database's properties. */ +/** + * The restorable dropped managed database's properties. + */ @Immutable -public final class RestorableDroppedManagedDatabaseProperties { +public final class RestorableDroppedManagedDatabaseProperties + implements JsonSerializable { /* * The name of the database. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * The creation date of the database (ISO8601 format). */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * The deletion date of the database (ISO8601 format). */ - @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime deletionDate; /* * The earliest restore date of the database (ISO8601 format). */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestoreDate; - /** Creates an instance of RestorableDroppedManagedDatabaseProperties class. */ + /** + * Creates an instance of RestorableDroppedManagedDatabaseProperties class. + */ public RestorableDroppedManagedDatabaseProperties() { } /** * Get the databaseName property: The name of the database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -50,7 +56,7 @@ public String databaseName() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -59,7 +65,7 @@ public OffsetDateTime creationDate() { /** * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * + * * @return the deletionDate value. */ public OffsetDateTime deletionDate() { @@ -68,7 +74,7 @@ public OffsetDateTime deletionDate() { /** * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -77,9 +83,54 @@ public OffsetDateTime earliestRestoreDate() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedManagedDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedManagedDatabaseProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorableDroppedManagedDatabaseProperties. + */ + public static RestorableDroppedManagedDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedManagedDatabaseProperties deserializedRestorableDroppedManagedDatabaseProperties + = new RestorableDroppedManagedDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseName".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseProperties.databaseName = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("deletionDate".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseProperties.deletionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseProperties.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedManagedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java index 700c6607745bc..e7bb2113dc1aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java @@ -6,32 +6,52 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.RestorePointType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Database restore points. */ +/** + * Database restore points. + */ @Immutable public final class RestorePointInner extends ProxyResource { /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource properties. */ - @JsonProperty(value = "properties") private RestorePointProperties innerProperties; - /** Creates an instance of RestorePointInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RestorePointInner class. + */ public RestorePointInner() { } /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -40,16 +60,46 @@ public String location() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RestorePointProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the restorePointType property: The type of restore point. - * + * * @return the restorePointType value. */ public RestorePointType restorePointType() { @@ -58,7 +108,7 @@ public RestorePointType restorePointType() { /** * Get the earliestRestoreDate property: The earliest time to which this database can be restored. - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -67,7 +117,7 @@ public OffsetDateTime earliestRestoreDate() { /** * Get the restorePointCreationDate property: The time the backup was taken. - * + * * @return the restorePointCreationDate value. */ public OffsetDateTime restorePointCreationDate() { @@ -76,7 +126,7 @@ public OffsetDateTime restorePointCreationDate() { /** * Get the restorePointLabel property: The label of restore point for backup request by user. - * + * * @return the restorePointLabel value. */ public String restorePointLabel() { @@ -85,7 +135,7 @@ public String restorePointLabel() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -93,4 +143,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorePointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorePointInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestorePointInner. + */ + public static RestorePointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorePointInner deserializedRestorePointInner = new RestorePointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRestorePointInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRestorePointInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRestorePointInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedRestorePointInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRestorePointInner.innerProperties = RestorePointProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorePointInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java index b4eb3f8bd85da..067fcee0cc0f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java @@ -5,44 +5,49 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.RestorePointType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of a database restore point. */ +/** + * Properties of a database restore point. + */ @Immutable -public final class RestorePointProperties { +public final class RestorePointProperties implements JsonSerializable { /* * The type of restore point */ - @JsonProperty(value = "restorePointType", access = JsonProperty.Access.WRITE_ONLY) private RestorePointType restorePointType; /* * The earliest time to which this database can be restored */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime earliestRestoreDate; /* * The time the backup was taken */ - @JsonProperty(value = "restorePointCreationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime restorePointCreationDate; /* * The label of restore point for backup request by user */ - @JsonProperty(value = "restorePointLabel", access = JsonProperty.Access.WRITE_ONLY) private String restorePointLabel; - /** Creates an instance of RestorePointProperties class. */ + /** + * Creates an instance of RestorePointProperties class. + */ public RestorePointProperties() { } /** * Get the restorePointType property: The type of restore point. - * + * * @return the restorePointType value. */ public RestorePointType restorePointType() { @@ -51,7 +56,7 @@ public RestorePointType restorePointType() { /** * Get the earliestRestoreDate property: The earliest time to which this database can be restored. - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -60,7 +65,7 @@ public OffsetDateTime earliestRestoreDate() { /** * Get the restorePointCreationDate property: The time the backup was taken. - * + * * @return the restorePointCreationDate value. */ public OffsetDateTime restorePointCreationDate() { @@ -69,7 +74,7 @@ public OffsetDateTime restorePointCreationDate() { /** * Get the restorePointLabel property: The label of restore point for backup request by user. - * + * * @return the restorePointLabel value. */ public String restorePointLabel() { @@ -78,9 +83,53 @@ public String restorePointLabel() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorePointProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorePointProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorePointProperties. + */ + public static RestorePointProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorePointProperties deserializedRestorePointProperties = new RestorePointProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("restorePointType".equals(fieldName)) { + deserializedRestorePointProperties.restorePointType + = RestorePointType.fromString(reader.getString()); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedRestorePointProperties.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("restorePointCreationDate".equals(fieldName)) { + deserializedRestorePointProperties.restorePointCreationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("restorePointLabel".equals(fieldName)) { + deserializedRestorePointProperties.restorePointLabel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorePointProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertPolicyProperties.java index ab7c55d97a1a9..24d7f6601feb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertPolicyProperties.java @@ -5,74 +5,75 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Properties of a security alert policy. */ +/** + * Properties of a security alert policy. + */ @Fluent -public final class SecurityAlertPolicyProperties { +public final class SecurityAlertPolicyProperties implements JsonSerializable { /* * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the * specific database. */ - @JsonProperty(value = "state", required = true) private SecurityAlertPolicyState state; /* * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, * Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - @JsonProperty(value = "disabledAlerts") private List disabledAlerts; /* * Specifies an array of e-mail addresses to which the alert is sent. */ - @JsonProperty(value = "emailAddresses") private List emailAddresses; /* * Specifies that the alert is sent to the account administrators. */ - @JsonProperty(value = "emailAccountAdmins") private Boolean emailAccountAdmins; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold * all Threat Detection audit logs. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* * Specifies the identifier key of the Threat Detection audit storage account. */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the number of days to keep in the Threat Detection audit logs. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the UTC creation time of the policy. */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationTime; - /** Creates an instance of SecurityAlertPolicyProperties class. */ + /** + * Creates an instance of SecurityAlertPolicyProperties class. + */ public SecurityAlertPolicyProperties() { } /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -82,7 +83,7 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -94,7 +95,7 @@ public SecurityAlertPolicyProperties withState(SecurityAlertPolicyState state) { /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -104,7 +105,7 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -115,7 +116,7 @@ public SecurityAlertPolicyProperties withDisabledAlerts(List disabledAle /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -124,7 +125,7 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -135,7 +136,7 @@ public SecurityAlertPolicyProperties withEmailAddresses(List emailAddres /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -144,7 +145,7 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -156,7 +157,7 @@ public SecurityAlertPolicyProperties withEmailAccountAdmins(Boolean emailAccount /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -166,7 +167,7 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -178,7 +179,7 @@ public SecurityAlertPolicyProperties withStorageEndpoint(String storageEndpoint) /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -188,7 +189,7 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -199,7 +200,7 @@ public SecurityAlertPolicyProperties withStorageAccountAccessKey(String storageA /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -208,7 +209,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the SecurityAlertPolicyProperties object itself. */ @@ -219,7 +220,7 @@ public SecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -228,17 +229,81 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SecurityAlertPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model SecurityAlertPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("disabledAlerts", this.disabledAlerts, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("emailAddresses", this.emailAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("emailAccountAdmins", this.emailAccountAdmins); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityAlertPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityAlertPolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecurityAlertPolicyProperties. + */ + public static SecurityAlertPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityAlertPolicyProperties deserializedSecurityAlertPolicyProperties + = new SecurityAlertPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.state + = SecurityAlertPolicyState.fromString(reader.getString()); + } else if ("disabledAlerts".equals(fieldName)) { + List disabledAlerts = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertPolicyProperties.disabledAlerts = disabledAlerts; + } else if ("emailAddresses".equals(fieldName)) { + List emailAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertPolicyProperties.emailAddresses = emailAddresses; + } else if ("emailAccountAdmins".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.emailAccountAdmins + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.storageAccountAccessKey = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.retentionDays = reader.getNullable(JsonReader::getInt); + } else if ("creationTime".equals(fieldName)) { + deserializedSecurityAlertPolicyProperties.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityAlertPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyProperties.java index 9d1bcaa6f5ddb..6921be12bf065 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyProperties.java @@ -5,74 +5,75 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Properties of a security alert policy. */ +/** + * Properties of a security alert policy. + */ @Fluent -public final class SecurityAlertsPolicyProperties { +public final class SecurityAlertsPolicyProperties implements JsonSerializable { /* * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the * specific database. */ - @JsonProperty(value = "state", required = true) private SecurityAlertPolicyState state; /* * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, * Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - @JsonProperty(value = "disabledAlerts") private List disabledAlerts; /* * Specifies an array of e-mail addresses to which the alert is sent. */ - @JsonProperty(value = "emailAddresses") private List emailAddresses; /* * Specifies that the alert is sent to the account administrators. */ - @JsonProperty(value = "emailAccountAdmins") private Boolean emailAccountAdmins; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold * all Threat Detection audit logs. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* * Specifies the identifier key of the Threat Detection audit storage account. */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the number of days to keep in the Threat Detection audit logs. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the UTC creation time of the policy. */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationTime; - /** Creates an instance of SecurityAlertsPolicyProperties class. */ + /** + * Creates an instance of SecurityAlertsPolicyProperties class. + */ public SecurityAlertsPolicyProperties() { } /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -82,7 +83,7 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -94,7 +95,7 @@ public SecurityAlertsPolicyProperties withState(SecurityAlertPolicyState state) /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -104,7 +105,7 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -115,7 +116,7 @@ public SecurityAlertsPolicyProperties withDisabledAlerts(List disabledAl /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -124,7 +125,7 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -135,7 +136,7 @@ public SecurityAlertsPolicyProperties withEmailAddresses(List emailAddre /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -144,7 +145,7 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -156,7 +157,7 @@ public SecurityAlertsPolicyProperties withEmailAccountAdmins(Boolean emailAccoun /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -166,7 +167,7 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -178,7 +179,7 @@ public SecurityAlertsPolicyProperties withStorageEndpoint(String storageEndpoint /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -188,7 +189,7 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -199,7 +200,7 @@ public SecurityAlertsPolicyProperties withStorageAccountAccessKey(String storage /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -208,7 +209,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the SecurityAlertsPolicyProperties object itself. */ @@ -219,7 +220,7 @@ public SecurityAlertsPolicyProperties withRetentionDays(Integer retentionDays) { /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -228,17 +229,81 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SecurityAlertsPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model SecurityAlertsPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertsPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("disabledAlerts", this.disabledAlerts, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("emailAddresses", this.emailAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("emailAccountAdmins", this.emailAccountAdmins); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityAlertsPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityAlertsPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecurityAlertsPolicyProperties. + */ + public static SecurityAlertsPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityAlertsPolicyProperties deserializedSecurityAlertsPolicyProperties + = new SecurityAlertsPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.state + = SecurityAlertPolicyState.fromString(reader.getString()); + } else if ("disabledAlerts".equals(fieldName)) { + List disabledAlerts = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyProperties.disabledAlerts = disabledAlerts; + } else if ("emailAddresses".equals(fieldName)) { + List emailAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyProperties.emailAddresses = emailAddresses; + } else if ("emailAccountAdmins".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.emailAccountAdmins + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.storageAccountAccessKey = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.retentionDays = reader.getNullable(JsonReader::getInt); + } else if ("creationTime".equals(fieldName)) { + deserializedSecurityAlertsPolicyProperties.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityAlertsPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyPropertiesAutoGenerated.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyPropertiesAutoGenerated.java new file mode 100644 index 0000000000000..44b7a38aba212 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyPropertiesAutoGenerated.java @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Properties of a security alert policy. + */ +@Fluent +public final class SecurityAlertsPolicyPropertiesAutoGenerated + implements JsonSerializable { + /* + * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the + * specific database. + */ + private SecurityAlertPolicyState state; + + /* + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force + */ + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage account. + */ + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + private OffsetDateTime creationTime; + + /** + * Creates an instance of SecurityAlertsPolicyPropertiesAutoGenerated class. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated() { + } + + /** + * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not + * been applied yet on the specific database. + * + * @return the state value. + */ + public SecurityAlertPolicyState state() { + return this.state; + } + + /** + * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not + * been applied yet on the specific database. + * + * @param state the state value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withState(SecurityAlertPolicyState state) { + this.state = state; + return this; + } + + /** + * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. + * + * @return the disabledAlerts value. + */ + public List disabledAlerts() { + return this.disabledAlerts; + } + + /** + * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. + * + * @param disabledAlerts the disabledAlerts value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withDisabledAlerts(List disabledAlerts) { + this.disabledAlerts = disabledAlerts; + return this; + } + + /** + * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. + * + * @return the emailAddresses value. + */ + public List emailAddresses() { + return this.emailAddresses; + } + + /** + * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. + * + * @param emailAddresses the emailAddresses value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withEmailAddresses(List emailAddresses) { + this.emailAddresses = emailAddresses; + return this; + } + + /** + * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. + * + * @return the emailAccountAdmins value. + */ + public Boolean emailAccountAdmins() { + return this.emailAccountAdmins; + } + + /** + * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. + * + * @param emailAccountAdmins the emailAccountAdmins value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withEmailAccountAdmins(Boolean emailAccountAdmins) { + this.emailAccountAdmins = emailAccountAdmins; + return this; + } + + /** + * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + * + * @return the storageEndpoint value. + */ + public String storageEndpoint() { + return this.storageEndpoint; + } + + /** + * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + * + * @param storageEndpoint the storageEndpoint value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withStorageEndpoint(String storageEndpoint) { + this.storageEndpoint = storageEndpoint; + return this; + } + + /** + * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage + * account. + * + * @return the storageAccountAccessKey value. + */ + public String storageAccountAccessKey() { + return this.storageAccountAccessKey; + } + + /** + * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage + * account. + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withStorageAccountAccessKey(String storageAccountAccessKey) { + this.storageAccountAccessKey = storageAccountAccessKey; + return this; + } + + /** + * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. + * + * @param retentionDays the retentionDays value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Get the creationTime property: Specifies the UTC creation time of the policy. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.creationTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (state() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model SecurityAlertsPolicyPropertiesAutoGenerated")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertsPolicyPropertiesAutoGenerated.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("disabledAlerts", this.disabledAlerts, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("emailAddresses", this.emailAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("emailAccountAdmins", this.emailAccountAdmins); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityAlertsPolicyPropertiesAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityAlertsPolicyPropertiesAutoGenerated if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecurityAlertsPolicyPropertiesAutoGenerated. + */ + public static SecurityAlertsPolicyPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityAlertsPolicyPropertiesAutoGenerated deserializedSecurityAlertsPolicyPropertiesAutoGenerated + = new SecurityAlertsPolicyPropertiesAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.state + = SecurityAlertPolicyState.fromString(reader.getString()); + } else if ("disabledAlerts".equals(fieldName)) { + List disabledAlerts = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.disabledAlerts = disabledAlerts; + } else if ("emailAddresses".equals(fieldName)) { + List emailAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.emailAddresses = emailAddresses; + } else if ("emailAccountAdmins".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.emailAccountAdmins + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.storageAccountAccessKey + = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("creationTime".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityAlertsPolicyPropertiesAutoGenerated; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java index 5c8a932e7f2ef..d95436b22aed6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityEventSqlInjectionAdditionalProperties; import com.azure.resourcemanager.sql.models.SecurityEventType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A security event. */ +/** + * A security event. + */ @Immutable public final class SecurityEventInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SecurityEventProperties innerProperties; - /** Creates an instance of SecurityEventInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SecurityEventInner class. + */ public SecurityEventInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SecurityEventProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the eventTime property: The time when the security event occurred. - * + * * @return the eventTime value. */ public OffsetDateTime eventTime() { @@ -44,7 +95,7 @@ public OffsetDateTime eventTime() { /** * Get the securityEventType property: The type of the security event. - * + * * @return the securityEventType value. */ public SecurityEventType securityEventType() { @@ -53,7 +104,7 @@ public SecurityEventType securityEventType() { /** * Get the subscription property: The subscription name. - * + * * @return the subscription value. */ public String subscription() { @@ -62,7 +113,7 @@ public String subscription() { /** * Get the server property: The server name. - * + * * @return the server value. */ public String server() { @@ -71,7 +122,7 @@ public String server() { /** * Get the database property: The database name. - * + * * @return the database value. */ public String database() { @@ -80,7 +131,7 @@ public String database() { /** * Get the clientIp property: The IP address of the client who executed the statement. - * + * * @return the clientIp value. */ public String clientIp() { @@ -89,7 +140,7 @@ public String clientIp() { /** * Get the applicationName property: The application used to execute the statement. - * + * * @return the applicationName value. */ public String applicationName() { @@ -98,7 +149,7 @@ public String applicationName() { /** * Get the principalName property: The principal user who executed the statement. - * + * * @return the principalName value. */ public String principalName() { @@ -108,7 +159,7 @@ public String principalName() { /** * Get the securityEventSqlInjectionAdditionalProperties property: The sql injection additional properties, * populated only if the type of the security event is sql injection. - * + * * @return the securityEventSqlInjectionAdditionalProperties value. */ public SecurityEventSqlInjectionAdditionalProperties securityEventSqlInjectionAdditionalProperties() { @@ -119,7 +170,7 @@ public SecurityEventSqlInjectionAdditionalProperties securityEventSqlInjectionAd /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -127,4 +178,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityEventInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityEventInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecurityEventInner. + */ + public static SecurityEventInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityEventInner deserializedSecurityEventInner = new SecurityEventInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSecurityEventInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSecurityEventInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSecurityEventInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSecurityEventInner.innerProperties = SecurityEventProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityEventInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java index 375c0dcb52672..d1ad0427d65c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java @@ -5,75 +5,75 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityEventSqlInjectionAdditionalProperties; import com.azure.resourcemanager.sql.models.SecurityEventType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a security event. */ +/** + * The properties of a security event. + */ @Immutable -public final class SecurityEventProperties { +public final class SecurityEventProperties implements JsonSerializable { /* * The time when the security event occurred. */ - @JsonProperty(value = "eventTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime eventTime; /* * The type of the security event. */ - @JsonProperty(value = "securityEventType", access = JsonProperty.Access.WRITE_ONLY) private SecurityEventType securityEventType; /* * The subscription name */ - @JsonProperty(value = "subscription", access = JsonProperty.Access.WRITE_ONLY) private String subscription; /* * The server name */ - @JsonProperty(value = "server", access = JsonProperty.Access.WRITE_ONLY) private String server; /* * The database name */ - @JsonProperty(value = "database", access = JsonProperty.Access.WRITE_ONLY) private String database; /* * The IP address of the client who executed the statement. */ - @JsonProperty(value = "clientIp", access = JsonProperty.Access.WRITE_ONLY) private String clientIp; /* * The application used to execute the statement. */ - @JsonProperty(value = "applicationName", access = JsonProperty.Access.WRITE_ONLY) private String applicationName; /* * The principal user who executed the statement */ - @JsonProperty(value = "principalName", access = JsonProperty.Access.WRITE_ONLY) private String principalName; /* * The sql injection additional properties, populated only if the type of the security event is sql injection. */ - @JsonProperty(value = "securityEventSqlInjectionAdditionalProperties", access = JsonProperty.Access.WRITE_ONLY) private SecurityEventSqlInjectionAdditionalProperties securityEventSqlInjectionAdditionalProperties; - /** Creates an instance of SecurityEventProperties class. */ + /** + * Creates an instance of SecurityEventProperties class. + */ public SecurityEventProperties() { } /** * Get the eventTime property: The time when the security event occurred. - * + * * @return the eventTime value. */ public OffsetDateTime eventTime() { @@ -82,7 +82,7 @@ public OffsetDateTime eventTime() { /** * Get the securityEventType property: The type of the security event. - * + * * @return the securityEventType value. */ public SecurityEventType securityEventType() { @@ -91,7 +91,7 @@ public SecurityEventType securityEventType() { /** * Get the subscription property: The subscription name. - * + * * @return the subscription value. */ public String subscription() { @@ -100,7 +100,7 @@ public String subscription() { /** * Get the server property: The server name. - * + * * @return the server value. */ public String server() { @@ -109,7 +109,7 @@ public String server() { /** * Get the database property: The database name. - * + * * @return the database value. */ public String database() { @@ -118,7 +118,7 @@ public String database() { /** * Get the clientIp property: The IP address of the client who executed the statement. - * + * * @return the clientIp value. */ public String clientIp() { @@ -127,7 +127,7 @@ public String clientIp() { /** * Get the applicationName property: The application used to execute the statement. - * + * * @return the applicationName value. */ public String applicationName() { @@ -136,7 +136,7 @@ public String applicationName() { /** * Get the principalName property: The principal user who executed the statement. - * + * * @return the principalName value. */ public String principalName() { @@ -146,7 +146,7 @@ public String principalName() { /** * Get the securityEventSqlInjectionAdditionalProperties property: The sql injection additional properties, * populated only if the type of the security event is sql injection. - * + * * @return the securityEventSqlInjectionAdditionalProperties value. */ public SecurityEventSqlInjectionAdditionalProperties securityEventSqlInjectionAdditionalProperties() { @@ -155,7 +155,7 @@ public SecurityEventSqlInjectionAdditionalProperties securityEventSqlInjectionAd /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -163,4 +163,58 @@ public void validate() { securityEventSqlInjectionAdditionalProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityEventProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityEventProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecurityEventProperties. + */ + public static SecurityEventProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityEventProperties deserializedSecurityEventProperties = new SecurityEventProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventTime".equals(fieldName)) { + deserializedSecurityEventProperties.eventTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("securityEventType".equals(fieldName)) { + deserializedSecurityEventProperties.securityEventType + = SecurityEventType.fromString(reader.getString()); + } else if ("subscription".equals(fieldName)) { + deserializedSecurityEventProperties.subscription = reader.getString(); + } else if ("server".equals(fieldName)) { + deserializedSecurityEventProperties.server = reader.getString(); + } else if ("database".equals(fieldName)) { + deserializedSecurityEventProperties.database = reader.getString(); + } else if ("clientIp".equals(fieldName)) { + deserializedSecurityEventProperties.clientIp = reader.getString(); + } else if ("applicationName".equals(fieldName)) { + deserializedSecurityEventProperties.applicationName = reader.getString(); + } else if ("principalName".equals(fieldName)) { + deserializedSecurityEventProperties.principalName = reader.getString(); + } else if ("securityEventSqlInjectionAdditionalProperties".equals(fieldName)) { + deserializedSecurityEventProperties.securityEventSqlInjectionAdditionalProperties + = SecurityEventSqlInjectionAdditionalProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityEventProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelInner.java index 4bb46a6d55300..05c28d4caa268 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelInner.java @@ -6,31 +6,51 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SensitivityLabelRank; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A sensitivity label. */ +/** + * A sensitivity label. + */ @Fluent public final class SensitivityLabelInner extends ProxyResource { /* * Resource that manages the sensitivity label. */ - @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; /* * Resource properties. */ - @JsonProperty(value = "properties") private SensitivityLabelProperties innerProperties; - /** Creates an instance of SensitivityLabelInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SensitivityLabelInner class. + */ public SensitivityLabelInner() { } /** * Get the managedBy property: Resource that manages the sensitivity label. - * + * * @return the managedBy value. */ public String managedBy() { @@ -39,16 +59,46 @@ public String managedBy() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SensitivityLabelProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the schemaName property: The schema name. - * + * * @return the schemaName value. */ public String schemaName() { @@ -57,7 +107,7 @@ public String schemaName() { /** * Get the tableName property: The table name. - * + * * @return the tableName value. */ public String tableName() { @@ -66,7 +116,7 @@ public String tableName() { /** * Get the columnName property: The column name. - * + * * @return the columnName value. */ public String columnName() { @@ -75,7 +125,7 @@ public String columnName() { /** * Get the labelName property: The label name. - * + * * @return the labelName value. */ public String labelName() { @@ -84,7 +134,7 @@ public String labelName() { /** * Set the labelName property: The label name. - * + * * @param labelName the labelName value to set. * @return the SensitivityLabelInner object itself. */ @@ -98,7 +148,7 @@ public SensitivityLabelInner withLabelName(String labelName) { /** * Get the labelId property: The label ID. - * + * * @return the labelId value. */ public String labelId() { @@ -107,7 +157,7 @@ public String labelId() { /** * Set the labelId property: The label ID. - * + * * @param labelId the labelId value to set. * @return the SensitivityLabelInner object itself. */ @@ -121,7 +171,7 @@ public SensitivityLabelInner withLabelId(String labelId) { /** * Get the informationType property: The information type. - * + * * @return the informationType value. */ public String informationType() { @@ -130,7 +180,7 @@ public String informationType() { /** * Set the informationType property: The information type. - * + * * @param informationType the informationType value to set. * @return the SensitivityLabelInner object itself. */ @@ -144,7 +194,7 @@ public SensitivityLabelInner withInformationType(String informationType) { /** * Get the informationTypeId property: The information type ID. - * + * * @return the informationTypeId value. */ public String informationTypeId() { @@ -153,7 +203,7 @@ public String informationTypeId() { /** * Set the informationTypeId property: The information type ID. - * + * * @param informationTypeId the informationTypeId value to set. * @return the SensitivityLabelInner object itself. */ @@ -168,7 +218,7 @@ public SensitivityLabelInner withInformationTypeId(String informationTypeId) { /** * Get the isDisabled property: Is sensitivity recommendation disabled. Applicable for recommended sensitivity label * only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - * + * * @return the isDisabled value. */ public Boolean isDisabled() { @@ -177,7 +227,7 @@ public Boolean isDisabled() { /** * Get the rank property: The rank property. - * + * * @return the rank value. */ public SensitivityLabelRank rank() { @@ -186,7 +236,7 @@ public SensitivityLabelRank rank() { /** * Set the rank property: The rank property. - * + * * @param rank the rank value to set. * @return the SensitivityLabelInner object itself. */ @@ -200,7 +250,7 @@ public SensitivityLabelInner withRank(SensitivityLabelRank rank) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -208,4 +258,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SensitivityLabelInner. + */ + public static SensitivityLabelInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelInner deserializedSensitivityLabelInner = new SensitivityLabelInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSensitivityLabelInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSensitivityLabelInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSensitivityLabelInner.type = reader.getString(); + } else if ("managedBy".equals(fieldName)) { + deserializedSensitivityLabelInner.managedBy = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSensitivityLabelInner.innerProperties = SensitivityLabelProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelProperties.java index 721b96580a393..1a56e5024e4ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelProperties.java @@ -5,74 +5,73 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SensitivityLabelRank; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a sensitivity label. */ +/** + * Properties of a sensitivity label. + */ @Fluent -public final class SensitivityLabelProperties { +public final class SensitivityLabelProperties implements JsonSerializable { /* * The schema name. */ - @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) private String schemaName; /* * The table name. */ - @JsonProperty(value = "tableName", access = JsonProperty.Access.WRITE_ONLY) private String tableName; /* * The column name. */ - @JsonProperty(value = "columnName", access = JsonProperty.Access.WRITE_ONLY) private String columnName; /* * The label name. */ - @JsonProperty(value = "labelName") private String labelName; /* * The label ID. */ - @JsonProperty(value = "labelId") private String labelId; /* * The information type. */ - @JsonProperty(value = "informationType") private String informationType; /* * The information type ID. */ - @JsonProperty(value = "informationTypeId") private String informationTypeId; /* * Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the * sensitivity recommendation on this column is disabled (dismissed) or not. */ - @JsonProperty(value = "isDisabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDisabled; /* * The rank property. */ - @JsonProperty(value = "rank") private SensitivityLabelRank rank; - /** Creates an instance of SensitivityLabelProperties class. */ + /** + * Creates an instance of SensitivityLabelProperties class. + */ public SensitivityLabelProperties() { } /** * Get the schemaName property: The schema name. - * + * * @return the schemaName value. */ public String schemaName() { @@ -81,7 +80,7 @@ public String schemaName() { /** * Get the tableName property: The table name. - * + * * @return the tableName value. */ public String tableName() { @@ -90,7 +89,7 @@ public String tableName() { /** * Get the columnName property: The column name. - * + * * @return the columnName value. */ public String columnName() { @@ -99,7 +98,7 @@ public String columnName() { /** * Get the labelName property: The label name. - * + * * @return the labelName value. */ public String labelName() { @@ -108,7 +107,7 @@ public String labelName() { /** * Set the labelName property: The label name. - * + * * @param labelName the labelName value to set. * @return the SensitivityLabelProperties object itself. */ @@ -119,7 +118,7 @@ public SensitivityLabelProperties withLabelName(String labelName) { /** * Get the labelId property: The label ID. - * + * * @return the labelId value. */ public String labelId() { @@ -128,7 +127,7 @@ public String labelId() { /** * Set the labelId property: The label ID. - * + * * @param labelId the labelId value to set. * @return the SensitivityLabelProperties object itself. */ @@ -139,7 +138,7 @@ public SensitivityLabelProperties withLabelId(String labelId) { /** * Get the informationType property: The information type. - * + * * @return the informationType value. */ public String informationType() { @@ -148,7 +147,7 @@ public String informationType() { /** * Set the informationType property: The information type. - * + * * @param informationType the informationType value to set. * @return the SensitivityLabelProperties object itself. */ @@ -159,7 +158,7 @@ public SensitivityLabelProperties withInformationType(String informationType) { /** * Get the informationTypeId property: The information type ID. - * + * * @return the informationTypeId value. */ public String informationTypeId() { @@ -168,7 +167,7 @@ public String informationTypeId() { /** * Set the informationTypeId property: The information type ID. - * + * * @param informationTypeId the informationTypeId value to set. * @return the SensitivityLabelProperties object itself. */ @@ -180,7 +179,7 @@ public SensitivityLabelProperties withInformationTypeId(String informationTypeId /** * Get the isDisabled property: Is sensitivity recommendation disabled. Applicable for recommended sensitivity label * only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - * + * * @return the isDisabled value. */ public Boolean isDisabled() { @@ -189,7 +188,7 @@ public Boolean isDisabled() { /** * Get the rank property: The rank property. - * + * * @return the rank value. */ public SensitivityLabelRank rank() { @@ -198,7 +197,7 @@ public SensitivityLabelRank rank() { /** * Set the rank property: The rank property. - * + * * @param rank the rank value to set. * @return the SensitivityLabelProperties object itself. */ @@ -209,9 +208,65 @@ public SensitivityLabelProperties withRank(SensitivityLabelRank rank) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("labelName", this.labelName); + jsonWriter.writeStringField("labelId", this.labelId); + jsonWriter.writeStringField("informationType", this.informationType); + jsonWriter.writeStringField("informationTypeId", this.informationTypeId); + jsonWriter.writeStringField("rank", this.rank == null ? null : this.rank.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SensitivityLabelProperties. + */ + public static SensitivityLabelProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelProperties deserializedSensitivityLabelProperties = new SensitivityLabelProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schemaName".equals(fieldName)) { + deserializedSensitivityLabelProperties.schemaName = reader.getString(); + } else if ("tableName".equals(fieldName)) { + deserializedSensitivityLabelProperties.tableName = reader.getString(); + } else if ("columnName".equals(fieldName)) { + deserializedSensitivityLabelProperties.columnName = reader.getString(); + } else if ("labelName".equals(fieldName)) { + deserializedSensitivityLabelProperties.labelName = reader.getString(); + } else if ("labelId".equals(fieldName)) { + deserializedSensitivityLabelProperties.labelId = reader.getString(); + } else if ("informationType".equals(fieldName)) { + deserializedSensitivityLabelProperties.informationType = reader.getString(); + } else if ("informationTypeId".equals(fieldName)) { + deserializedSensitivityLabelProperties.informationTypeId = reader.getString(); + } else if ("isDisabled".equals(fieldName)) { + deserializedSensitivityLabelProperties.isDisabled = reader.getNullable(JsonReader::getBoolean); + } else if ("rank".equals(fieldName)) { + deserializedSensitivityLabelProperties.rank = SensitivityLabelRank.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdateInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdateInner.java index 46a5a4e8871b1..a6c849e7637cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdateInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdateInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A sensitivity label update operation. */ +/** + * A sensitivity label update operation. + */ @Fluent public final class SensitivityLabelUpdateInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SensitivityLabelUpdatePropertiesInner innerProperties; - /** Creates an instance of SensitivityLabelUpdateInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SensitivityLabelUpdateInner class. + */ public SensitivityLabelUpdateInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SensitivityLabelUpdatePropertiesInner innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the op property: The op property. - * + * * @return the op value. */ public SensitivityLabelUpdateKind op() { @@ -42,7 +93,7 @@ public SensitivityLabelUpdateKind op() { /** * Set the op property: The op property. - * + * * @param op the op value to set. * @return the SensitivityLabelUpdateInner object itself. */ @@ -56,7 +107,7 @@ public SensitivityLabelUpdateInner withOp(SensitivityLabelUpdateKind op) { /** * Get the schema property: Schema name of the column to update. - * + * * @return the schema value. */ public String schema() { @@ -65,7 +116,7 @@ public String schema() { /** * Set the schema property: Schema name of the column to update. - * + * * @param schema the schema value to set. * @return the SensitivityLabelUpdateInner object itself. */ @@ -79,7 +130,7 @@ public SensitivityLabelUpdateInner withSchema(String schema) { /** * Get the table property: Table name of the column to update. - * + * * @return the table value. */ public String table() { @@ -88,7 +139,7 @@ public String table() { /** * Set the table property: Table name of the column to update. - * + * * @param table the table value to set. * @return the SensitivityLabelUpdateInner object itself. */ @@ -102,7 +153,7 @@ public SensitivityLabelUpdateInner withTable(String table) { /** * Get the column property: Column name to update. - * + * * @return the column value. */ public String column() { @@ -111,7 +162,7 @@ public String column() { /** * Set the column property: Column name to update. - * + * * @param column the column value to set. * @return the SensitivityLabelUpdateInner object itself. */ @@ -125,7 +176,7 @@ public SensitivityLabelUpdateInner withColumn(String column) { /** * Get the sensitivityLabel property: The sensitivity label information to apply on a column. - * + * * @return the sensitivityLabel value. */ public SensitivityLabelInner sensitivityLabel() { @@ -134,7 +185,7 @@ public SensitivityLabelInner sensitivityLabel() { /** * Set the sensitivityLabel property: The sensitivity label information to apply on a column. - * + * * @param sensitivityLabel the sensitivityLabel value to set. * @return the SensitivityLabelUpdateInner object itself. */ @@ -148,7 +199,7 @@ public SensitivityLabelUpdateInner withSensitivityLabel(SensitivityLabelInner se /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -156,4 +207,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelUpdateInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelUpdateInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SensitivityLabelUpdateInner. + */ + public static SensitivityLabelUpdateInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelUpdateInner deserializedSensitivityLabelUpdateInner = new SensitivityLabelUpdateInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSensitivityLabelUpdateInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSensitivityLabelUpdateInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSensitivityLabelUpdateInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSensitivityLabelUpdateInner.innerProperties + = SensitivityLabelUpdatePropertiesInner.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelUpdateInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdatePropertiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdatePropertiesInner.java index ca60d21c62e9c..bd1b9677b08cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdatePropertiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdatePropertiesInner.java @@ -6,49 +6,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of an operation executed on a sensitivity label. */ +/** + * Properties of an operation executed on a sensitivity label. + */ @Fluent -public final class SensitivityLabelUpdatePropertiesInner { +public final class SensitivityLabelUpdatePropertiesInner + implements JsonSerializable { /* * The op property. */ - @JsonProperty(value = "op", required = true) private SensitivityLabelUpdateKind op; /* * Schema name of the column to update. */ - @JsonProperty(value = "schema", required = true) private String schema; /* * Table name of the column to update. */ - @JsonProperty(value = "table", required = true) private String table; /* * Column name to update. */ - @JsonProperty(value = "column", required = true) private String column; /* * The sensitivity label information to apply on a column. */ - @JsonProperty(value = "sensitivityLabel") private SensitivityLabelInner sensitivityLabel; - /** Creates an instance of SensitivityLabelUpdatePropertiesInner class. */ + /** + * Creates an instance of SensitivityLabelUpdatePropertiesInner class. + */ public SensitivityLabelUpdatePropertiesInner() { } /** * Get the op property: The op property. - * + * * @return the op value. */ public SensitivityLabelUpdateKind op() { @@ -57,7 +61,7 @@ public SensitivityLabelUpdateKind op() { /** * Set the op property: The op property. - * + * * @param op the op value to set. * @return the SensitivityLabelUpdatePropertiesInner object itself. */ @@ -68,7 +72,7 @@ public SensitivityLabelUpdatePropertiesInner withOp(SensitivityLabelUpdateKind o /** * Get the schema property: Schema name of the column to update. - * + * * @return the schema value. */ public String schema() { @@ -77,7 +81,7 @@ public String schema() { /** * Set the schema property: Schema name of the column to update. - * + * * @param schema the schema value to set. * @return the SensitivityLabelUpdatePropertiesInner object itself. */ @@ -88,7 +92,7 @@ public SensitivityLabelUpdatePropertiesInner withSchema(String schema) { /** * Get the table property: Table name of the column to update. - * + * * @return the table value. */ public String table() { @@ -97,7 +101,7 @@ public String table() { /** * Set the table property: Table name of the column to update. - * + * * @param table the table value to set. * @return the SensitivityLabelUpdatePropertiesInner object itself. */ @@ -108,7 +112,7 @@ public SensitivityLabelUpdatePropertiesInner withTable(String table) { /** * Get the column property: Column name to update. - * + * * @return the column value. */ public String column() { @@ -117,7 +121,7 @@ public String column() { /** * Set the column property: Column name to update. - * + * * @param column the column value to set. * @return the SensitivityLabelUpdatePropertiesInner object itself. */ @@ -128,7 +132,7 @@ public SensitivityLabelUpdatePropertiesInner withColumn(String column) { /** * Get the sensitivityLabel property: The sensitivity label information to apply on a column. - * + * * @return the sensitivityLabel value. */ public SensitivityLabelInner sensitivityLabel() { @@ -137,7 +141,7 @@ public SensitivityLabelInner sensitivityLabel() { /** * Set the sensitivityLabel property: The sensitivity label information to apply on a column. - * + * * @param sensitivityLabel the sensitivityLabel value to set. * @return the SensitivityLabelUpdatePropertiesInner object itself. */ @@ -148,33 +152,29 @@ public SensitivityLabelUpdatePropertiesInner withSensitivityLabel(SensitivityLab /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (op() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model SensitivityLabelUpdatePropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property op in model SensitivityLabelUpdatePropertiesInner")); } if (schema() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model SensitivityLabelUpdatePropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property schema in model SensitivityLabelUpdatePropertiesInner")); } if (table() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model SensitivityLabelUpdatePropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property table in model SensitivityLabelUpdatePropertiesInner")); } if (column() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model SensitivityLabelUpdatePropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property column in model SensitivityLabelUpdatePropertiesInner")); } if (sensitivityLabel() != null) { sensitivityLabel().validate(); @@ -182,4 +182,56 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(SensitivityLabelUpdatePropertiesInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("op", this.op == null ? null : this.op.toString()); + jsonWriter.writeStringField("schema", this.schema); + jsonWriter.writeStringField("table", this.table); + jsonWriter.writeStringField("column", this.column); + jsonWriter.writeJsonField("sensitivityLabel", this.sensitivityLabel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelUpdatePropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelUpdatePropertiesInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SensitivityLabelUpdatePropertiesInner. + */ + public static SensitivityLabelUpdatePropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelUpdatePropertiesInner deserializedSensitivityLabelUpdatePropertiesInner + = new SensitivityLabelUpdatePropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("op".equals(fieldName)) { + deserializedSensitivityLabelUpdatePropertiesInner.op + = SensitivityLabelUpdateKind.fromString(reader.getString()); + } else if ("schema".equals(fieldName)) { + deserializedSensitivityLabelUpdatePropertiesInner.schema = reader.getString(); + } else if ("table".equals(fieldName)) { + deserializedSensitivityLabelUpdatePropertiesInner.table = reader.getString(); + } else if ("column".equals(fieldName)) { + deserializedSensitivityLabelUpdatePropertiesInner.column = reader.getString(); + } else if ("sensitivityLabel".equals(fieldName)) { + deserializedSensitivityLabelUpdatePropertiesInner.sensitivityLabel + = SensitivityLabelInner.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelUpdatePropertiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAdvancedThreatProtectionInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAdvancedThreatProtectionInner.java index 8ec12b444b066..e181be7f7fb9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAdvancedThreatProtectionInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAdvancedThreatProtectionInner.java @@ -7,32 +7,52 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A server Advanced Threat Protection. */ +/** + * A server Advanced Threat Protection. + */ @Fluent public final class ServerAdvancedThreatProtectionInner extends ProxyResource { /* * SystemData of AdvancedThreatProtectionResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") private AdvancedThreatProtectionProperties innerProperties; - /** Creates an instance of ServerAdvancedThreatProtectionInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerAdvancedThreatProtectionInner class. + */ public ServerAdvancedThreatProtectionInner() { } /** * Get the systemData property: SystemData of AdvancedThreatProtectionResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -41,17 +61,47 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AdvancedThreatProtectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @return the state value. */ public AdvancedThreatProtectionState state() { @@ -61,7 +111,7 @@ public AdvancedThreatProtectionState state() { /** * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled * or a state has not been applied yet on the specific database or server. - * + * * @param state the state value to set. * @return the ServerAdvancedThreatProtectionInner object itself. */ @@ -75,7 +125,7 @@ public ServerAdvancedThreatProtectionInner withState(AdvancedThreatProtectionSta /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -84,7 +134,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -92,4 +142,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerAdvancedThreatProtectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerAdvancedThreatProtectionInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerAdvancedThreatProtectionInner. + */ + public static ServerAdvancedThreatProtectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerAdvancedThreatProtectionInner deserializedServerAdvancedThreatProtectionInner + = new ServerAdvancedThreatProtectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerAdvancedThreatProtectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerAdvancedThreatProtectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerAdvancedThreatProtectionInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedServerAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerAdvancedThreatProtectionInner.innerProperties + = AdvancedThreatProtectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerAdvancedThreatProtectionInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAutomaticTuningInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAutomaticTuningInner.java index d67427bde6505..bf5881a2b5d6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAutomaticTuningInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAutomaticTuningInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AutomaticTuningServerMode; import com.azure.resourcemanager.sql.models.AutomaticTuningServerOptions; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** Server-level Automatic Tuning. */ +/** + * Server-level Automatic Tuning. + */ @Fluent public final class ServerAutomaticTuningInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private AutomaticTuningServerProperties innerProperties; - /** Creates an instance of ServerAutomaticTuningInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerAutomaticTuningInner class. + */ public ServerAutomaticTuningInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AutomaticTuningServerProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the desiredState property: Automatic tuning desired state. - * + * * @return the desiredState value. */ public AutomaticTuningServerMode desiredState() { @@ -44,7 +95,7 @@ public AutomaticTuningServerMode desiredState() { /** * Set the desiredState property: Automatic tuning desired state. - * + * * @param desiredState the desiredState value to set. * @return the ServerAutomaticTuningInner object itself. */ @@ -58,7 +109,7 @@ public ServerAutomaticTuningInner withDesiredState(AutomaticTuningServerMode des /** * Get the actualState property: Automatic tuning actual state. - * + * * @return the actualState value. */ public AutomaticTuningServerMode actualState() { @@ -67,7 +118,7 @@ public AutomaticTuningServerMode actualState() { /** * Get the options property: Automatic tuning options definition. - * + * * @return the options value. */ public Map options() { @@ -76,7 +127,7 @@ public Map options() { /** * Set the options property: Automatic tuning options definition. - * + * * @param options the options value to set. * @return the ServerAutomaticTuningInner object itself. */ @@ -90,7 +141,7 @@ public ServerAutomaticTuningInner withOptions(Map { + ServerAutomaticTuningInner deserializedServerAutomaticTuningInner = new ServerAutomaticTuningInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerAutomaticTuningInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerAutomaticTuningInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerAutomaticTuningInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerAutomaticTuningInner.innerProperties + = AutomaticTuningServerProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerAutomaticTuningInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADAdministratorInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADAdministratorInner.java index 0de8641364bdf..dd619f62ba5c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADAdministratorInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADAdministratorInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.AdministratorType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** Azure Active Directory administrator. */ +/** + * Azure Active Directory administrator. + */ @Fluent public final class ServerAzureADAdministratorInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private AdministratorProperties innerProperties; - /** Creates an instance of ServerAzureADAdministratorInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerAzureADAdministratorInner class. + */ public ServerAzureADAdministratorInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AdministratorProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the administratorType property: Type of the sever administrator. - * + * * @return the administratorType value. */ public AdministratorType administratorType() { @@ -43,7 +94,7 @@ public AdministratorType administratorType() { /** * Set the administratorType property: Type of the sever administrator. - * + * * @param administratorType the administratorType value to set. * @return the ServerAzureADAdministratorInner object itself. */ @@ -57,7 +108,7 @@ public ServerAzureADAdministratorInner withAdministratorType(AdministratorType a /** * Get the login property: Login name of the server administrator. - * + * * @return the login value. */ public String login() { @@ -66,7 +117,7 @@ public String login() { /** * Set the login property: Login name of the server administrator. - * + * * @param login the login value to set. * @return the ServerAzureADAdministratorInner object itself. */ @@ -80,7 +131,7 @@ public ServerAzureADAdministratorInner withLogin(String login) { /** * Get the sid property: SID (object ID) of the server administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -89,7 +140,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the server administrator. - * + * * @param sid the sid value to set. * @return the ServerAzureADAdministratorInner object itself. */ @@ -103,7 +154,7 @@ public ServerAzureADAdministratorInner withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -112,7 +163,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the administrator. - * + * * @param tenantId the tenantId value to set. * @return the ServerAzureADAdministratorInner object itself. */ @@ -126,7 +177,7 @@ public ServerAzureADAdministratorInner withTenantId(UUID tenantId) { /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -135,7 +186,7 @@ public Boolean azureADOnlyAuthentication() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -143,4 +194,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerAzureADAdministratorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerAzureADAdministratorInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerAzureADAdministratorInner. + */ + public static ServerAzureADAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerAzureADAdministratorInner deserializedServerAzureADAdministratorInner + = new ServerAzureADAdministratorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerAzureADAdministratorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerAzureADAdministratorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerAzureADAdministratorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerAzureADAdministratorInner.innerProperties + = AdministratorProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerAzureADAdministratorInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADOnlyAuthenticationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADOnlyAuthenticationInner.java index cba43b7f7e034..847b728be11c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADOnlyAuthenticationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADOnlyAuthenticationInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Azure Active Directory only authentication. */ +/** + * Azure Active Directory only authentication. + */ @Fluent public final class ServerAzureADOnlyAuthenticationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private AzureADOnlyAuthProperties innerProperties; - /** Creates an instance of ServerAzureADOnlyAuthenticationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerAzureADOnlyAuthenticationInner class. + */ public ServerAzureADOnlyAuthenticationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private AzureADOnlyAuthProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -41,7 +92,7 @@ public Boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the ServerAzureADOnlyAuthenticationInner object itself. */ @@ -55,7 +106,7 @@ public ServerAzureADOnlyAuthenticationInner withAzureADOnlyAuthentication(Boolea /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -63,4 +114,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerAzureADOnlyAuthenticationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerAzureADOnlyAuthenticationInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerAzureADOnlyAuthenticationInner. + */ + public static ServerAzureADOnlyAuthenticationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerAzureADOnlyAuthenticationInner deserializedServerAzureADOnlyAuthenticationInner + = new ServerAzureADOnlyAuthenticationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerAzureADOnlyAuthenticationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerAzureADOnlyAuthenticationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerAzureADOnlyAuthenticationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerAzureADOnlyAuthenticationInner.innerProperties + = AzureADOnlyAuthProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerAzureADOnlyAuthenticationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyInner.java index 4456316085425..38c489bceb63c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyInner.java @@ -6,47 +6,100 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** A server blob auditing policy. */ +/** + * A server blob auditing policy. + */ @Fluent public final class ServerBlobAuditingPolicyInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerBlobAuditingPolicyProperties innerProperties; - /** Creates an instance of ServerBlobAuditingPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerBlobAuditingPolicyInner class. + */ public ServerBlobAuditingPolicyInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerBlobAuditingPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isDevopsAuditEnabled value. */ public Boolean isDevopsAuditEnabled() { @@ -55,18 +108,20 @@ public Boolean isDevopsAuditEnabled() { /** * Set the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isDevopsAuditEnabled the isDevopsAuditEnabled value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -80,7 +135,7 @@ public ServerBlobAuditingPolicyInner withIsDevopsAuditEnabled(Boolean isDevopsAu /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -89,7 +144,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -103,48 +158,76 @@ public ServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -153,48 +236,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -209,7 +320,7 @@ public ServerBlobAuditingPolicyInner withAuditActionsAndGroups(List audi /** * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { @@ -219,7 +330,7 @@ public Boolean isStorageSecondaryKeyInUse() { /** * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -232,19 +343,21 @@ public ServerBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isSt } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -252,19 +365,21 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -278,8 +393,9 @@ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isA /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -288,8 +404,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -303,7 +420,7 @@ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -312,7 +429,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -327,7 +444,7 @@ public ServerBlobAuditingPolicyInner withIsManagedIdentityInUse(Boolean isManage /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -337,7 +454,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -353,7 +470,7 @@ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -364,7 +481,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -377,14 +494,16 @@ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -392,14 +511,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -413,7 +534,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageA /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -422,7 +543,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ServerBlobAuditingPolicyInner object itself. */ @@ -436,7 +557,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID stora /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -444,4 +565,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerBlobAuditingPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerBlobAuditingPolicyInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerBlobAuditingPolicyInner. + */ + public static ServerBlobAuditingPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerBlobAuditingPolicyInner deserializedServerBlobAuditingPolicyInner + = new ServerBlobAuditingPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerBlobAuditingPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerBlobAuditingPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerBlobAuditingPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerBlobAuditingPolicyInner.innerProperties + = ServerBlobAuditingPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerBlobAuditingPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyProperties.java index 4feec39bee72b..838c036476ac5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyProperties.java @@ -6,55 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.UUID; -/** Properties of a server blob auditing policy. */ +/** + * Properties of a server blob auditing policy. + */ @Fluent -public final class ServerBlobAuditingPolicyProperties { +public final class ServerBlobAuditingPolicyProperties implements JsonSerializable { /* * Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as - * true and 'IsDevopsAuditEnabled' as true - * + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- + * version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isDevopsAuditEnabled") private Boolean isDevopsAuditEnabled; /* * Specifies the number of days to keep in the audit logs in the storage account. */ - @JsonProperty(value = "retentionDays") private Integer retentionDays; /* * Specifies the Actions-Groups and Actions to audit. - * + * * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * + * * BATCH_COMPLETED_GROUP, * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, * FAILED_DATABASE_AUTHENTICATION_GROUP. - * + * * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP * BACKUP_RESTORE_GROUP * DATABASE_LOGOUT_GROUP @@ -79,13 +85,14 @@ public final class ServerBlobAuditingPolicyProperties { * DATABASE_OWNERSHIP_CHANGE_GROUP * DATABASE_CHANGE_GROUP * LEDGER_OPERATION_GROUP - * + * * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * + * * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-action-groups). + * * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for * Server auditing policy). The supported actions to audit are: * SELECT @@ -95,76 +102,71 @@ public final class ServerBlobAuditingPolicyProperties { * EXECUTE * RECEIVE * REFERENCES - * + * * The general form for defining an action to be audited is: * {action} ON {object} BY {principal} - * + * * Note that in the above format can refer to an object like a table, view, or stored procedure, or an * entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. - * + * * For example: * SELECT on dbo.myTable by public * SELECT on DATABASE::myDatabase by public * SELECT on SCHEMA::mySchema by public - * + * * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action- + * groups-and-actions#database-level-audit-actions) */ - @JsonProperty(value = "auditActionsAndGroups") private List auditActionsAndGroups; /* * Specifies whether storageAccountAccessKey value is the storage's secondary key. */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") private Boolean isStorageSecondaryKeyInUse; /* * Specifies whether audit events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * + * * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs * category on the database should be also created. * Note that for server level audit you should use the 'master' database as {databaseName}. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}? + * api-version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") private Boolean isAzureMonitorTargetEnabled; /* * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ - @JsonProperty(value = "queueDelayMs") private Integer queueDelayMs; /* * Specifies whether Managed Identity is used to access blob storage */ - @JsonProperty(value = "isManagedIdentityInUse") private Boolean isManagedIdentityInUse; /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. */ - @JsonProperty(value = "state", required = true) private BlobAuditingPolicyState state; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint or isAzureMonitorTargetEnabled is required. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* @@ -173,38 +175,40 @@ public final class ServerBlobAuditingPolicyProperties { * server system-assigned managed identity to access the storage. * Prerequisites for using managed identity authentication: * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role - * to the server identity. + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the blob storage subscription Id. */ - @JsonProperty(value = "storageAccountSubscriptionId") private UUID storageAccountSubscriptionId; - /** Creates an instance of ServerBlobAuditingPolicyProperties class. */ + /** + * Creates an instance of ServerBlobAuditingPolicyProperties class. + */ public ServerBlobAuditingPolicyProperties() { } /** * Get the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isDevopsAuditEnabled value. */ public Boolean isDevopsAuditEnabled() { @@ -213,18 +217,20 @@ public Boolean isDevopsAuditEnabled() { /** * Set the isDevopsAuditEnabled property: Specifies the state of devops audit. If state is Enabled, devops logs will - * be sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' as 'Enabled', - * 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - *

When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true + * and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should also be created. - * - *

Diagnostic Settings URI format: PUT + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isDevopsAuditEnabled the isDevopsAuditEnabled value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -235,7 +241,7 @@ public ServerBlobAuditingPolicyProperties withIsDevopsAuditEnabled(Boolean isDev /** * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -244,7 +250,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * + * * @param retentionDays the retentionDays value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -255,48 +261,76 @@ public ServerBlobAuditingPolicyProperties withRetentionDays(Integer retentionDay /** * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { @@ -305,48 +339,76 @@ public List auditActionsAndGroups() { /** * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and + * + * The recommended set of action groups to use is the following combination - this will audit all the queries and * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing from the Azure * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * DBCC_GROUP DATABASE_OWNERSHIP_CHANGE_GROUP DATABASE_CHANGE_GROUP LEDGER_OPERATION_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should + * + * The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using + * unnecessary groups could lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the database, and should * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action + * + * For more information, see [Database-Level Audit Action * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for + * Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or + * an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + * used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * + * * @param auditActionsAndGroups the auditActionsAndGroups value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -358,7 +420,7 @@ public ServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List /** * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { @@ -368,7 +430,7 @@ public Boolean isStorageSecondaryKeyInUse() { /** * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's * secondary key. - * + * * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -378,19 +440,21 @@ public ServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse(Boolean } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -398,19 +462,21 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT + * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs + * category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -421,8 +487,9 @@ public ServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Boolea /** * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @return the queueDelayMs value. */ public Integer queueDelayMs() { @@ -431,8 +498,9 @@ public Integer queueDelayMs() { /** * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * + * are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * * @param queueDelayMs the queueDelayMs value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -443,7 +511,7 @@ public ServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) /** * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @return the isManagedIdentityInUse value. */ public Boolean isManagedIdentityInUse() { @@ -452,7 +520,7 @@ public Boolean isManagedIdentityInUse() { /** * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * + * * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -464,7 +532,7 @@ public ServerBlobAuditingPolicyProperties withIsManagedIdentityInUse(Boolean isM /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -474,7 +542,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -487,7 +555,7 @@ public ServerBlobAuditingPolicyProperties withState(BlobAuditingPolicyState stat * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -498,7 +566,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -508,14 +576,16 @@ public ServerBlobAuditingPolicyProperties withStorageEndpoint(String storageEndp } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -523,14 +593,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -541,7 +613,7 @@ public ServerBlobAuditingPolicyProperties withStorageAccountAccessKey(String sto /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -550,7 +622,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ServerBlobAuditingPolicyProperties object itself. */ @@ -561,17 +633,95 @@ public ServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUID /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerBlobAuditingPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model ServerBlobAuditingPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerBlobAuditingPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeBooleanField("isDevopsAuditEnabled", this.isDevopsAuditEnabled); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + jsonWriter.writeArrayField("auditActionsAndGroups", this.auditActionsAndGroups, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isStorageSecondaryKeyInUse", this.isStorageSecondaryKeyInUse); + jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); + jsonWriter.writeNumberField("queueDelayMs", this.queueDelayMs); + jsonWriter.writeBooleanField("isManagedIdentityInUse", this.isManagedIdentityInUse); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeStringField("storageAccountSubscriptionId", + Objects.toString(this.storageAccountSubscriptionId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerBlobAuditingPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerBlobAuditingPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerBlobAuditingPolicyProperties. + */ + public static ServerBlobAuditingPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerBlobAuditingPolicyProperties deserializedServerBlobAuditingPolicyProperties + = new ServerBlobAuditingPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.state + = BlobAuditingPolicyState.fromString(reader.getString()); + } else if ("isDevopsAuditEnabled".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.isDevopsAuditEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("retentionDays".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("auditActionsAndGroups".equals(fieldName)) { + List auditActionsAndGroups = reader.readArray(reader1 -> reader1.getString()); + deserializedServerBlobAuditingPolicyProperties.auditActionsAndGroups = auditActionsAndGroups; + } else if ("isStorageSecondaryKeyInUse".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.isStorageSecondaryKeyInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.isAzureMonitorTargetEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("queueDelayMs".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.queueDelayMs + = reader.getNullable(JsonReader::getInt); + } else if ("isManagedIdentityInUse".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.isManagedIdentityInUse + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.storageAccountAccessKey = reader.getString(); + } else if ("storageAccountSubscriptionId".equals(fieldName)) { + deserializedServerBlobAuditingPolicyProperties.storageAccountSubscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedServerBlobAuditingPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java index 70575ba1ea061..77a487138a534 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java @@ -6,37 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerConnectionType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A server connection policy. */ +/** + * A server connection policy. + */ @Fluent public final class ServerConnectionPolicyInner extends ProxyResource { /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerConnectionPolicyProperties innerProperties; - /** Creates an instance of ServerConnectionPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerConnectionPolicyInner class. + */ public ServerConnectionPolicyInner() { } /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -45,7 +64,7 @@ public String location() { /** * Get the kind property: Metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -54,16 +73,46 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerConnectionPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the connectionType property: The server connection type. - * + * * @return the connectionType value. */ public ServerConnectionType connectionType() { @@ -72,7 +121,7 @@ public ServerConnectionType connectionType() { /** * Set the connectionType property: The server connection type. - * + * * @param connectionType the connectionType value to set. * @return the ServerConnectionPolicyInner object itself. */ @@ -86,7 +135,7 @@ public ServerConnectionPolicyInner withConnectionType(ServerConnectionType conne /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -94,4 +143,52 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerConnectionPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerConnectionPolicyInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerConnectionPolicyInner. + */ + public static ServerConnectionPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerConnectionPolicyInner deserializedServerConnectionPolicyInner = new ServerConnectionPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerConnectionPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerConnectionPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerConnectionPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServerConnectionPolicyInner.location = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedServerConnectionPolicyInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerConnectionPolicyInner.innerProperties + = ServerConnectionPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerConnectionPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java index 68b7e82425826..9c11fff96a493 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java @@ -6,25 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerConnectionType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** The properties of a server connection policy. */ +/** + * The properties of a server connection policy. + */ @Fluent -public final class ServerConnectionPolicyProperties { +public final class ServerConnectionPolicyProperties implements JsonSerializable { /* * The server connection type. */ - @JsonProperty(value = "connectionType", required = true) private ServerConnectionType connectionType; - /** Creates an instance of ServerConnectionPolicyProperties class. */ + /** + * Creates an instance of ServerConnectionPolicyProperties class. + */ public ServerConnectionPolicyProperties() { } /** * Get the connectionType property: The server connection type. - * + * * @return the connectionType value. */ public ServerConnectionType connectionType() { @@ -33,7 +40,7 @@ public ServerConnectionType connectionType() { /** * Set the connectionType property: The server connection type. - * + * * @param connectionType the connectionType value to set. * @return the ServerConnectionPolicyProperties object itself. */ @@ -44,17 +51,56 @@ public ServerConnectionPolicyProperties withConnectionType(ServerConnectionType /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (connectionType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property connectionType in model ServerConnectionPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property connectionType in model ServerConnectionPolicyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerConnectionPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("connectionType", + this.connectionType == null ? null : this.connectionType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerConnectionPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerConnectionPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerConnectionPolicyProperties. + */ + public static ServerConnectionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerConnectionPolicyProperties deserializedServerConnectionPolicyProperties + = new ServerConnectionPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("connectionType".equals(fieldName)) { + deserializedServerConnectionPolicyProperties.connectionType + = ServerConnectionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServerConnectionPolicyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java index 9e84a558b70b6..54dfb5c4e418a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java @@ -6,44 +6,50 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** Properties of a server DevOps audit settings. */ +/** + * Properties of a server DevOps audit settings. + */ @Fluent -public final class ServerDevOpsAuditSettingsProperties { +public final class ServerDevOpsAuditSettingsProperties + implements JsonSerializable { /* * Specifies whether DevOps audit events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * + * * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs * category on the master database should be also created. - * + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft. + * Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api- + * version=2017-05-01-preview + * * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") private Boolean isAzureMonitorTargetEnabled; /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. */ - @JsonProperty(value = "state", required = true) private BlobAuditingPolicyState state; /* * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint or isAzureMonitorTargetEnabled is required. */ - @JsonProperty(value = "storageEndpoint") private String storageEndpoint; /* @@ -52,38 +58,39 @@ public final class ServerDevOpsAuditSettingsProperties { * server system-assigned managed identity to access the storage. * Prerequisites for using managed identity authentication: * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role - * to the server identity. + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * Specifies the blob storage subscription Id. */ - @JsonProperty(value = "storageAccountSubscriptionId") private UUID storageAccountSubscriptionId; - /** Creates an instance of ServerDevOpsAuditSettingsProperties class. */ + /** + * Creates an instance of ServerDevOpsAuditSettingsProperties class. + */ public ServerDevOpsAuditSettingsProperties() { } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. In - * order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * Get the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * - *

When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic - * logs category on the master database should be also created. - * - *

Diagnostic Settings URI format: PUT + * + * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * category on the master database should be also created. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -91,19 +98,20 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. In - * order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * Set the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * - *

When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic - * logs category on the master database should be also created. - * - *

Diagnostic Settings URI format: PUT + * + * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * category on the master database should be also created. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ServerDevOpsAuditSettingsProperties object itself. */ @@ -115,7 +123,7 @@ public ServerDevOpsAuditSettingsProperties withIsAzureMonitorTargetEnabled(Boole /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -125,7 +133,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ServerDevOpsAuditSettingsProperties object itself. */ @@ -138,7 +146,7 @@ public ServerDevOpsAuditSettingsProperties withState(BlobAuditingPolicyState sta * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -149,7 +157,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ServerDevOpsAuditSettingsProperties object itself. */ @@ -159,14 +167,16 @@ public ServerDevOpsAuditSettingsProperties withStorageEndpoint(String storageEnd } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -174,14 +184,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerDevOpsAuditSettingsProperties object itself. */ @@ -192,7 +204,7 @@ public ServerDevOpsAuditSettingsProperties withStorageAccountAccessKey(String st /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -201,7 +213,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ServerDevOpsAuditSettingsProperties object itself. */ @@ -212,17 +224,70 @@ public ServerDevOpsAuditSettingsProperties withStorageAccountSubscriptionId(UUID /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerDevOpsAuditSettingsProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model ServerDevOpsAuditSettingsProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerDevOpsAuditSettingsProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeStringField("storageAccountSubscriptionId", + Objects.toString(this.storageAccountSubscriptionId, null)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDevOpsAuditSettingsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDevOpsAuditSettingsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerDevOpsAuditSettingsProperties. + */ + public static ServerDevOpsAuditSettingsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDevOpsAuditSettingsProperties deserializedServerDevOpsAuditSettingsProperties + = new ServerDevOpsAuditSettingsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsProperties.state + = BlobAuditingPolicyState.fromString(reader.getString()); + } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsProperties.isAzureMonitorTargetEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsProperties.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsProperties.storageAccountAccessKey = reader.getString(); + } else if ("storageAccountSubscriptionId".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsProperties.storageAccountSubscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDevOpsAuditSettingsProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java index c1a60c736ca82..1990afd2b9c55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java @@ -7,32 +7,52 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** A server DevOps auditing settings. */ +/** + * A server DevOps auditing settings. + */ @Fluent public final class ServerDevOpsAuditingSettingsInner extends ProxyResource { /* * SystemData of ServerDevOpsAuditSettingsResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerDevOpsAuditSettingsProperties innerProperties; - /** Creates an instance of ServerDevOpsAuditingSettingsInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerDevOpsAuditingSettingsInner class. + */ public ServerDevOpsAuditingSettingsInner() { } /** * Get the systemData property: SystemData of ServerDevOpsAuditSettingsResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -41,7 +61,7 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerDevOpsAuditSettingsProperties innerProperties() { @@ -49,19 +69,50 @@ private ServerDevOpsAuditSettingsProperties innerProperties() { } /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. In - * order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * - *

When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic - * logs category on the master database should be also created. - * - *

Diagnostic Settings URI format: PUT + * + * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * category on the master database should be also created. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { @@ -69,19 +120,20 @@ public Boolean isAzureMonitorTargetEnabled() { } /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. In - * order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as + * Set the isAzureMonitorTargetEnabled property: Specifies whether DevOps audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as * true. - * - *

When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic - * logs category on the master database should be also created. - * - *

Diagnostic Settings URI format: PUT + * + * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs + * category on the master database should be also created. + * + * Diagnostic Settings URI format: + * PUT * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * + * + * For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. * @return the ServerDevOpsAuditingSettingsInner object itself. */ @@ -96,7 +148,7 @@ public ServerDevOpsAuditingSettingsInner withIsAzureMonitorTargetEnabled(Boolean /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @return the state value. */ public BlobAuditingPolicyState state() { @@ -106,7 +158,7 @@ public BlobAuditingPolicyState state() { /** * Set the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. - * + * * @param state the state value to set. * @return the ServerDevOpsAuditingSettingsInner object itself. */ @@ -122,7 +174,7 @@ public ServerDevOpsAuditingSettingsInner withState(BlobAuditingPolicyState state * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -133,7 +185,7 @@ public String storageEndpoint() { * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is * required. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ServerDevOpsAuditingSettingsInner object itself. */ @@ -146,14 +198,16 @@ public ServerDevOpsAuditingSettingsInner withStorageEndpoint(String storageEndpo } /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -161,14 +215,16 @@ public String storageAccountAccessKey() { } /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity + * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL + * server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to + * the server identity. + * For more information, see [Auditing to storage using Managed Identity * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerDevOpsAuditingSettingsInner object itself. */ @@ -182,7 +238,7 @@ public ServerDevOpsAuditingSettingsInner withStorageAccountAccessKey(String stor /** * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { @@ -191,7 +247,7 @@ public UUID storageAccountSubscriptionId() { /** * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * + * * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. * @return the ServerDevOpsAuditingSettingsInner object itself. */ @@ -205,7 +261,7 @@ public ServerDevOpsAuditingSettingsInner withStorageAccountSubscriptionId(UUID s /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -213,4 +269,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDevOpsAuditingSettingsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDevOpsAuditingSettingsInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerDevOpsAuditingSettingsInner. + */ + public static ServerDevOpsAuditingSettingsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDevOpsAuditingSettingsInner deserializedServerDevOpsAuditingSettingsInner + = new ServerDevOpsAuditingSettingsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.innerProperties + = ServerDevOpsAuditSettingsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDevOpsAuditingSettingsInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java index 1535cb32f8082..fd1d17abbe8df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A server DNS alias. */ +/** + * A server DNS alias. + */ @Immutable public final class ServerDnsAliasInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerDnsAliasProperties innerProperties; - /** Creates an instance of ServerDnsAliasInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerDnsAliasInner class. + */ public ServerDnsAliasInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerDnsAliasProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the azureDnsRecord property: The fully qualified DNS record for alias. - * + * * @return the azureDnsRecord value. */ public String azureDnsRecord() { @@ -41,7 +92,7 @@ public String azureDnsRecord() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -49,4 +100,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDnsAliasInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDnsAliasInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerDnsAliasInner. + */ + public static ServerDnsAliasInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDnsAliasInner deserializedServerDnsAliasInner = new ServerDnsAliasInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerDnsAliasInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerDnsAliasInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerDnsAliasInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerDnsAliasInner.innerProperties = ServerDnsAliasProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDnsAliasInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java index 650524823b9e5..5d2f78902266c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a server DNS alias. */ +/** + * Properties of a server DNS alias. + */ @Immutable -public final class ServerDnsAliasProperties { +public final class ServerDnsAliasProperties implements JsonSerializable { /* * The fully qualified DNS record for alias */ - @JsonProperty(value = "azureDnsRecord", access = JsonProperty.Access.WRITE_ONLY) private String azureDnsRecord; - /** Creates an instance of ServerDnsAliasProperties class. */ + /** + * Creates an instance of ServerDnsAliasProperties class. + */ public ServerDnsAliasProperties() { } /** * Get the azureDnsRecord property: The fully qualified DNS record for alias. - * + * * @return the azureDnsRecord value. */ public String azureDnsRecord() { @@ -31,9 +38,44 @@ public String azureDnsRecord() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDnsAliasProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDnsAliasProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerDnsAliasProperties. + */ + public static ServerDnsAliasProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDnsAliasProperties deserializedServerDnsAliasProperties = new ServerDnsAliasProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureDnsRecord".equals(fieldName)) { + deserializedServerDnsAliasProperties.azureDnsRecord = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDnsAliasProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java index b89da8e00165a..8c70fab72b6da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java @@ -5,33 +5,39 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of a server firewall rule. */ +/** + * The properties of a server firewall rule. + */ @Fluent -public final class ServerFirewallRuleProperties { +public final class ServerFirewallRuleProperties implements JsonSerializable { /* * The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP * addresses. */ - @JsonProperty(value = "startIpAddress") private String startIpAddress; /* * The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. * Use value '0.0.0.0' for all Azure-internal IP addresses. */ - @JsonProperty(value = "endIpAddress") private String endIpAddress; - /** Creates an instance of ServerFirewallRuleProperties class. */ + /** + * Creates an instance of ServerFirewallRuleProperties class. + */ public ServerFirewallRuleProperties() { } /** * Get the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format. Use value * '0.0.0.0' for all Azure-internal IP addresses. - * + * * @return the startIpAddress value. */ public String startIpAddress() { @@ -41,7 +47,7 @@ public String startIpAddress() { /** * Set the startIpAddress property: The start IP address of the firewall rule. Must be IPv4 format. Use value * '0.0.0.0' for all Azure-internal IP addresses. - * + * * @param startIpAddress the startIpAddress value to set. * @return the ServerFirewallRuleProperties object itself. */ @@ -53,7 +59,7 @@ public ServerFirewallRuleProperties withStartIpAddress(String startIpAddress) { /** * Get the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than * or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. - * + * * @return the endIpAddress value. */ public String endIpAddress() { @@ -63,7 +69,7 @@ public String endIpAddress() { /** * Set the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than * or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. - * + * * @param endIpAddress the endIpAddress value to set. * @return the ServerFirewallRuleProperties object itself. */ @@ -74,9 +80,48 @@ public ServerFirewallRuleProperties withEndIpAddress(String endIpAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("startIpAddress", this.startIpAddress); + jsonWriter.writeStringField("endIpAddress", this.endIpAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerFirewallRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerFirewallRuleProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerFirewallRuleProperties. + */ + public static ServerFirewallRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerFirewallRuleProperties deserializedServerFirewallRuleProperties = new ServerFirewallRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startIpAddress".equals(fieldName)) { + deserializedServerFirewallRuleProperties.startIpAddress = reader.getString(); + } else if ("endIpAddress".equals(fieldName)) { + deserializedServerFirewallRuleProperties.endIpAddress = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerFirewallRuleProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java index 26cedebada8d9..c0bcfd8926f6a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java @@ -6,44 +6,63 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ResourceIdentity; import com.azure.resourcemanager.sql.models.ServerExternalAdministrator; import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; import com.azure.resourcemanager.sql.models.ServerPrivateEndpointConnection; import com.azure.resourcemanager.sql.models.ServerWorkspaceFeature; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; import java.util.UUID; -/** An Azure SQL Database server. */ +/** + * An Azure SQL Database server. + */ @Fluent public final class ServerInner extends Resource { /* * The Azure Active Directory identity of the server. */ - @JsonProperty(value = "identity") private ResourceIdentity identity; /* * Kind of sql server. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerProperties innerProperties; - /** Creates an instance of ServerInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerInner class. + */ public ServerInner() { } /** * Get the identity property: The Azure Active Directory identity of the server. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -52,7 +71,7 @@ public ResourceIdentity identity() { /** * Set the identity property: The Azure Active Directory identity of the server. - * + * * @param identity the identity value to set. * @return the ServerInner object itself. */ @@ -63,7 +82,7 @@ public ServerInner withIdentity(ResourceIdentity identity) { /** * Get the kind property: Kind of sql server. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -72,21 +91,55 @@ public String kind() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public ServerInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ServerInner withTags(Map tags) { super.withTags(tags); @@ -95,7 +148,7 @@ public ServerInner withTags(Map tags) { /** * Get the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -104,7 +157,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ServerInner object itself. */ @@ -118,7 +171,7 @@ public ServerInner withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -127,7 +180,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerInner object itself. */ @@ -141,7 +194,7 @@ public ServerInner withAdministratorLoginPassword(String administratorLoginPassw /** * Get the version property: The version of the server. - * + * * @return the version value. */ public String version() { @@ -150,7 +203,7 @@ public String version() { /** * Set the version property: The version of the server. - * + * * @param version the version value to set. * @return the ServerInner object itself. */ @@ -164,7 +217,7 @@ public ServerInner withVersion(String version) { /** * Get the state property: The state of the server. - * + * * @return the state value. */ public String state() { @@ -173,7 +226,7 @@ public String state() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -182,7 +235,7 @@ public String fullyQualifiedDomainName() { /** * Get the privateEndpointConnections property: List of private endpoint connections on a server. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -191,7 +244,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -200,7 +253,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerInner object itself. */ @@ -215,7 +268,7 @@ public ServerInner withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the publicNetworkAccess value. */ public ServerNetworkAccessFlag publicNetworkAccess() { @@ -225,7 +278,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerInner object itself. */ @@ -240,7 +293,7 @@ public ServerInner withPublicNetworkAccess(ServerNetworkAccessFlag publicNetwork /** * Get the workspaceFeature property: Whether or not existing server has a workspace created and if it allows * connection from workspace. - * + * * @return the workspaceFeature value. */ public ServerWorkspaceFeature workspaceFeature() { @@ -250,7 +303,7 @@ public ServerWorkspaceFeature workspaceFeature() { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -260,7 +313,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ServerInner object itself. */ @@ -274,7 +327,7 @@ public ServerInner withPrimaryUserAssignedIdentityId(String primaryUserAssignedI /** * Get the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -283,7 +336,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the ServerInner object itself. */ @@ -297,7 +350,7 @@ public ServerInner withFederatedClientId(UUID federatedClientId) { /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -306,7 +359,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ServerInner object itself. */ @@ -320,7 +373,7 @@ public ServerInner withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ServerExternalAdministrator administrators() { @@ -329,7 +382,7 @@ public ServerExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ServerInner object itself. */ @@ -344,7 +397,7 @@ public ServerInner withAdministrators(ServerExternalAdministrator administrators /** * Get the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the restrictOutboundNetworkAccess value. */ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { @@ -354,7 +407,7 @@ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { /** * Set the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param restrictOutboundNetworkAccess the restrictOutboundNetworkAccess value to set. * @return the ServerInner object itself. */ @@ -368,7 +421,7 @@ public ServerInner withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag res /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -379,4 +432,59 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerInner. + */ + public static ServerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerInner deserializedServerInner = new ServerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServerInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServerInner.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedServerInner.identity = ResourceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedServerInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerInner.innerProperties = ServerProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java index b7c8cc4884fdd..ee888f7f29227 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java @@ -6,38 +6,57 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A server key. */ +/** + * A server key. + */ @Fluent public final class ServerKeyInner extends ProxyResource { /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ - @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; /* * Resource location. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerKeyProperties innerProperties; - /** Creates an instance of ServerKeyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerKeyInner class. + */ public ServerKeyInner() { } /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. - * + * * @return the kind value. */ public String kind() { @@ -46,7 +65,7 @@ public String kind() { /** * Get the location property: Resource location. - * + * * @return the location value. */ public String location() { @@ -55,16 +74,46 @@ public String location() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerKeyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the subregion property: Subregion of the server key. - * + * * @return the subregion value. */ public String subregion() { @@ -73,7 +122,7 @@ public String subregion() { /** * Get the serverKeyType property: The server key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -82,7 +131,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The server key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ServerKeyInner object itself. */ @@ -98,7 +147,7 @@ public ServerKeyInner withServerKeyType(ServerKeyType serverKeyType) { * Get the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. - * + * * @return the uri value. */ public String uri() { @@ -109,7 +158,7 @@ public String uri() { * Set the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. - * + * * @param uri the uri value to set. * @return the ServerKeyInner object itself. */ @@ -123,7 +172,7 @@ public ServerKeyInner withUri(String uri) { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -132,7 +181,7 @@ public String thumbprint() { /** * Get the creationDate property: The server key creation date. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -141,7 +190,7 @@ public OffsetDateTime creationDate() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -150,7 +199,7 @@ public Boolean autoRotationEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -158,4 +207,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerKeyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerKeyInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerKeyInner. + */ + public static ServerKeyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerKeyInner deserializedServerKeyInner = new ServerKeyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerKeyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerKeyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerKeyInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedServerKeyInner.kind = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedServerKeyInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerKeyInner.innerProperties = ServerKeyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerKeyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java index 6f43b3410d9fc..582a02d902c07 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java @@ -5,58 +5,61 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties for a server key execution. */ +/** + * Properties for a server key execution. + */ @Fluent -public final class ServerKeyProperties { +public final class ServerKeyProperties implements JsonSerializable { /* * Subregion of the server key. */ - @JsonProperty(value = "subregion", access = JsonProperty.Access.WRITE_ONLY) private String subregion; /* * The server key type like 'ServiceManaged', 'AzureKeyVault'. */ - @JsonProperty(value = "serverKeyType", required = true) private ServerKeyType serverKeyType; /* * The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is * required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' */ - @JsonProperty(value = "uri") private String uri; /* * Thumbprint of the server key. */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) private String thumbprint; /* * The server key creation date. */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * Key auto rotation opt-in flag. Either true or false. */ - @JsonProperty(value = "autoRotationEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean autoRotationEnabled; - /** Creates an instance of ServerKeyProperties class. */ + /** + * Creates an instance of ServerKeyProperties class. + */ public ServerKeyProperties() { } /** * Get the subregion property: Subregion of the server key. - * + * * @return the subregion value. */ public String subregion() { @@ -65,7 +68,7 @@ public String subregion() { /** * Get the serverKeyType property: The server key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { @@ -74,7 +77,7 @@ public ServerKeyType serverKeyType() { /** * Set the serverKeyType property: The server key type like 'ServiceManaged', 'AzureKeyVault'. - * + * * @param serverKeyType the serverKeyType value to set. * @return the ServerKeyProperties object itself. */ @@ -87,7 +90,7 @@ public ServerKeyProperties withServerKeyType(ServerKeyType serverKeyType) { * Get the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. - * + * * @return the uri value. */ public String uri() { @@ -98,7 +101,7 @@ public String uri() { * Set the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. - * + * * @param uri the uri value to set. * @return the ServerKeyProperties object itself. */ @@ -109,7 +112,7 @@ public ServerKeyProperties withUri(String uri) { /** * Get the thumbprint property: Thumbprint of the server key. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -118,7 +121,7 @@ public String thumbprint() { /** * Get the creationDate property: The server key creation date. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -127,7 +130,7 @@ public OffsetDateTime creationDate() { /** * Get the autoRotationEnabled property: Key auto rotation opt-in flag. Either true or false. - * + * * @return the autoRotationEnabled value. */ public Boolean autoRotationEnabled() { @@ -136,17 +139,65 @@ public Boolean autoRotationEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model ServerKeyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serverKeyType in model ServerKeyProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerKeyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverKeyType", this.serverKeyType == null ? null : this.serverKeyType.toString()); + jsonWriter.writeStringField("uri", this.uri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerKeyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerKeyProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerKeyProperties. + */ + public static ServerKeyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerKeyProperties deserializedServerKeyProperties = new ServerKeyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverKeyType".equals(fieldName)) { + deserializedServerKeyProperties.serverKeyType = ServerKeyType.fromString(reader.getString()); + } else if ("subregion".equals(fieldName)) { + deserializedServerKeyProperties.subregion = reader.getString(); + } else if ("uri".equals(fieldName)) { + deserializedServerKeyProperties.uri = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedServerKeyProperties.thumbprint = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedServerKeyProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("autoRotationEnabled".equals(fieldName)) { + deserializedServerKeyProperties.autoRotationEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServerKeyProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java index 26d2a7af13a41..6ea45477dbfe7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** A server operation. */ +/** + * A server operation. + */ @Immutable public final class ServerOperationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerOperationProperties innerProperties; - /** Creates an instance of ServerOperationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerOperationInner class. + */ public ServerOperationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerOperationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -43,7 +94,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -52,7 +103,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -61,7 +112,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -70,7 +121,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -79,7 +130,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -88,7 +139,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -97,7 +148,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -106,7 +157,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -115,7 +166,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -124,7 +175,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -133,7 +184,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -142,7 +193,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -151,7 +202,7 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -159,4 +210,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerOperationInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerOperationInner. + */ + public static ServerOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerOperationInner deserializedServerOperationInner = new ServerOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerOperationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerOperationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerOperationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerOperationInner.innerProperties = ServerOperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java index 3ded7e44665a7..b02610e724b45 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java @@ -5,98 +5,94 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** The properties of a server operation. */ +/** + * The properties of a server operation. + */ @Immutable -public final class ServerOperationProperties { +public final class ServerOperationProperties implements JsonSerializable { /* * The name of operation. */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The friendly name of operation. */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) private String operationFriendlyName; /* * The percentage of the operation completed. */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) private Integer percentComplete; /* * The name of the server. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * The operation start time. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The operation state. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private ManagementOperationState state; /* * The operation error code. */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private Integer errorCode; /* * The operation error description. */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) private String errorDescription; /* * The operation error severity. */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) private Integer errorSeverity; /* * Whether or not the error is a user error. */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) private Boolean isUserError; /* * The estimated completion time of the operation. */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime estimatedCompletionTime; /* * The operation description. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Whether the operation can be cancelled. */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) private Boolean isCancellable; - /** Creates an instance of ServerOperationProperties class. */ + /** + * Creates an instance of ServerOperationProperties class. + */ public ServerOperationProperties() { } /** * Get the operation property: The name of operation. - * + * * @return the operation value. */ public String operation() { @@ -105,7 +101,7 @@ public String operation() { /** * Get the operationFriendlyName property: The friendly name of operation. - * + * * @return the operationFriendlyName value. */ public String operationFriendlyName() { @@ -114,7 +110,7 @@ public String operationFriendlyName() { /** * Get the percentComplete property: The percentage of the operation completed. - * + * * @return the percentComplete value. */ public Integer percentComplete() { @@ -123,7 +119,7 @@ public Integer percentComplete() { /** * Get the serverName property: The name of the server. - * + * * @return the serverName value. */ public String serverName() { @@ -132,7 +128,7 @@ public String serverName() { /** * Get the startTime property: The operation start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -141,7 +137,7 @@ public OffsetDateTime startTime() { /** * Get the state property: The operation state. - * + * * @return the state value. */ public ManagementOperationState state() { @@ -150,7 +146,7 @@ public ManagementOperationState state() { /** * Get the errorCode property: The operation error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -159,7 +155,7 @@ public Integer errorCode() { /** * Get the errorDescription property: The operation error description. - * + * * @return the errorDescription value. */ public String errorDescription() { @@ -168,7 +164,7 @@ public String errorDescription() { /** * Get the errorSeverity property: The operation error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -177,7 +173,7 @@ public Integer errorSeverity() { /** * Get the isUserError property: Whether or not the error is a user error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -186,7 +182,7 @@ public Boolean isUserError() { /** * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * + * * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { @@ -195,7 +191,7 @@ public OffsetDateTime estimatedCompletionTime() { /** * Get the description property: The operation description. - * + * * @return the description value. */ public String description() { @@ -204,7 +200,7 @@ public String description() { /** * Get the isCancellable property: Whether the operation can be cancelled. - * + * * @return the isCancellable value. */ public Boolean isCancellable() { @@ -213,9 +209,71 @@ public Boolean isCancellable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerOperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerOperationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerOperationProperties. + */ + public static ServerOperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerOperationProperties deserializedServerOperationProperties = new ServerOperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operation".equals(fieldName)) { + deserializedServerOperationProperties.operation = reader.getString(); + } else if ("operationFriendlyName".equals(fieldName)) { + deserializedServerOperationProperties.operationFriendlyName = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedServerOperationProperties.percentComplete = reader.getNullable(JsonReader::getInt); + } else if ("serverName".equals(fieldName)) { + deserializedServerOperationProperties.serverName = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedServerOperationProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedServerOperationProperties.state + = ManagementOperationState.fromString(reader.getString()); + } else if ("errorCode".equals(fieldName)) { + deserializedServerOperationProperties.errorCode = reader.getNullable(JsonReader::getInt); + } else if ("errorDescription".equals(fieldName)) { + deserializedServerOperationProperties.errorDescription = reader.getString(); + } else if ("errorSeverity".equals(fieldName)) { + deserializedServerOperationProperties.errorSeverity = reader.getNullable(JsonReader::getInt); + } else if ("isUserError".equals(fieldName)) { + deserializedServerOperationProperties.isUserError = reader.getNullable(JsonReader::getBoolean); + } else if ("estimatedCompletionTime".equals(fieldName)) { + deserializedServerOperationProperties.estimatedCompletionTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("description".equals(fieldName)) { + deserializedServerOperationProperties.description = reader.getString(); + } else if ("isCancellable".equals(fieldName)) { + deserializedServerOperationProperties.isCancellable = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServerOperationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerProperties.java index 8a5d25f02e10d..9c452811eb66d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerProperties.java @@ -5,110 +5,105 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerExternalAdministrator; import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; import com.azure.resourcemanager.sql.models.ServerPrivateEndpointConnection; import com.azure.resourcemanager.sql.models.ServerWorkspaceFeature; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.UUID; -/** The properties of a server. */ +/** + * The properties of a server. + */ @Fluent -public final class ServerProperties { +public final class ServerProperties implements JsonSerializable { /* * Administrator username for the server. Once created it cannot be changed. */ - @JsonProperty(value = "administratorLogin") private String administratorLogin; /* * The administrator login password (required for server creation). */ - @JsonProperty(value = "administratorLoginPassword") private String administratorLoginPassword; /* * The version of the server. */ - @JsonProperty(value = "version") private String version; /* * The state of the server. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; /* * The fully qualified domain name of the server. */ - @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY) private String fullyQualifiedDomainName; /* * List of private endpoint connections on a server */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; /* * Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ - @JsonProperty(value = "minimalTlsVersion") private String minimalTlsVersion; /* - * Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be + * Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be * 'Enabled' or 'Disabled' */ - @JsonProperty(value = "publicNetworkAccess") private ServerNetworkAccessFlag publicNetworkAccess; /* * Whether or not existing server has a workspace created and if it allows connection from workspace */ - @JsonProperty(value = "workspaceFeature", access = JsonProperty.Access.WRITE_ONLY) private ServerWorkspaceFeature workspaceFeature; /* * The resource id of a user assigned identity to be used by default. */ - @JsonProperty(value = "primaryUserAssignedIdentityId") private String primaryUserAssignedIdentityId; /* * The Client id used for cross tenant CMK scenario */ - @JsonProperty(value = "federatedClientId") private UUID federatedClientId; /* * A CMK URI of the key to use for encryption. */ - @JsonProperty(value = "keyId") private String keyId; /* * The Azure Active Directory administrator of the server. */ - @JsonProperty(value = "administrators") private ServerExternalAdministrator administrators; /* - * Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be + * Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be * 'Enabled' or 'Disabled' */ - @JsonProperty(value = "restrictOutboundNetworkAccess") private ServerNetworkAccessFlag restrictOutboundNetworkAccess; - /** Creates an instance of ServerProperties class. */ + /** + * Creates an instance of ServerProperties class. + */ public ServerProperties() { } /** * Get the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -117,7 +112,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ServerProperties object itself. */ @@ -128,7 +123,7 @@ public ServerProperties withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -137,7 +132,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerProperties object itself. */ @@ -148,7 +143,7 @@ public ServerProperties withAdministratorLoginPassword(String administratorLogin /** * Get the version property: The version of the server. - * + * * @return the version value. */ public String version() { @@ -157,7 +152,7 @@ public String version() { /** * Set the version property: The version of the server. - * + * * @param version the version value to set. * @return the ServerProperties object itself. */ @@ -168,7 +163,7 @@ public ServerProperties withVersion(String version) { /** * Get the state property: The state of the server. - * + * * @return the state value. */ public String state() { @@ -177,7 +172,7 @@ public String state() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -186,7 +181,7 @@ public String fullyQualifiedDomainName() { /** * Get the privateEndpointConnections property: List of private endpoint connections on a server. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -195,7 +190,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -204,7 +199,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerProperties object itself. */ @@ -216,7 +211,7 @@ public ServerProperties withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the publicNetworkAccess value. */ public ServerNetworkAccessFlag publicNetworkAccess() { @@ -226,7 +221,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerProperties object itself. */ @@ -238,7 +233,7 @@ public ServerProperties withPublicNetworkAccess(ServerNetworkAccessFlag publicNe /** * Get the workspaceFeature property: Whether or not existing server has a workspace created and if it allows * connection from workspace. - * + * * @return the workspaceFeature value. */ public ServerWorkspaceFeature workspaceFeature() { @@ -248,7 +243,7 @@ public ServerWorkspaceFeature workspaceFeature() { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -258,7 +253,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ServerProperties object itself. */ @@ -269,7 +264,7 @@ public ServerProperties withPrimaryUserAssignedIdentityId(String primaryUserAssi /** * Get the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -278,7 +273,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the ServerProperties object itself. */ @@ -289,7 +284,7 @@ public ServerProperties withFederatedClientId(UUID federatedClientId) { /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -298,7 +293,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ServerProperties object itself. */ @@ -309,7 +304,7 @@ public ServerProperties withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ServerExternalAdministrator administrators() { @@ -318,7 +313,7 @@ public ServerExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ServerProperties object itself. */ @@ -330,7 +325,7 @@ public ServerProperties withAdministrators(ServerExternalAdministrator administr /** * Get the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the restrictOutboundNetworkAccess value. */ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { @@ -340,7 +335,7 @@ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { /** * Set the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param restrictOutboundNetworkAccess the restrictOutboundNetworkAccess value to set. * @return the ServerProperties object itself. */ @@ -351,7 +346,7 @@ public ServerProperties withRestrictOutboundNetworkAccess(ServerNetworkAccessFla /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -362,4 +357,83 @@ public void validate() { administrators().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("minimalTlsVersion", this.minimalTlsVersion); + jsonWriter.writeStringField("publicNetworkAccess", + this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); + jsonWriter.writeStringField("primaryUserAssignedIdentityId", this.primaryUserAssignedIdentityId); + jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); + jsonWriter.writeStringField("keyId", this.keyId); + jsonWriter.writeJsonField("administrators", this.administrators); + jsonWriter.writeStringField("restrictOutboundNetworkAccess", + this.restrictOutboundNetworkAccess == null ? null : this.restrictOutboundNetworkAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerProperties. + */ + public static ServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerProperties deserializedServerProperties = new ServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administratorLogin".equals(fieldName)) { + deserializedServerProperties.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedServerProperties.administratorLoginPassword = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedServerProperties.version = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedServerProperties.state = reader.getString(); + } else if ("fullyQualifiedDomainName".equals(fieldName)) { + deserializedServerProperties.fullyQualifiedDomainName = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> ServerPrivateEndpointConnection.fromJson(reader1)); + deserializedServerProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("minimalTlsVersion".equals(fieldName)) { + deserializedServerProperties.minimalTlsVersion = reader.getString(); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedServerProperties.publicNetworkAccess + = ServerNetworkAccessFlag.fromString(reader.getString()); + } else if ("workspaceFeature".equals(fieldName)) { + deserializedServerProperties.workspaceFeature + = ServerWorkspaceFeature.fromString(reader.getString()); + } else if ("primaryUserAssignedIdentityId".equals(fieldName)) { + deserializedServerProperties.primaryUserAssignedIdentityId = reader.getString(); + } else if ("federatedClientId".equals(fieldName)) { + deserializedServerProperties.federatedClientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("keyId".equals(fieldName)) { + deserializedServerProperties.keyId = reader.getString(); + } else if ("administrators".equals(fieldName)) { + deserializedServerProperties.administrators = ServerExternalAdministrator.fromJson(reader); + } else if ("restrictOutboundNetworkAccess".equals(fieldName)) { + deserializedServerProperties.restrictOutboundNetworkAccess + = ServerNetworkAccessFlag.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServerProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java index 3e72a00506559..cf7b7259060ce 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java @@ -7,33 +7,53 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A server security alert policy. */ +/** + * A server security alert policy. + */ @Fluent public final class ServerSecurityAlertPolicyInner extends ProxyResource { /* * SystemData of SecurityAlertPolicyResource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * Resource properties. */ - @JsonProperty(value = "properties") private SecurityAlertsPolicyProperties innerProperties; - /** Creates an instance of ServerSecurityAlertPolicyInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerSecurityAlertPolicyInner class. + */ public ServerSecurityAlertPolicyInner() { } /** * Get the systemData property: SystemData of SecurityAlertPolicyResource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -42,17 +62,47 @@ public SystemData systemData() { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SecurityAlertsPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @return the state value. */ public SecurityAlertPolicyState state() { @@ -62,7 +112,7 @@ public SecurityAlertPolicyState state() { /** * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not * been applied yet on the specific database. - * + * * @param state the state value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -77,7 +127,7 @@ public ServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) /** * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @return the disabledAlerts value. */ public List disabledAlerts() { @@ -87,7 +137,7 @@ public List disabledAlerts() { /** * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. - * + * * @param disabledAlerts the disabledAlerts value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -101,7 +151,7 @@ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAl /** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @return the emailAddresses value. */ public List emailAddresses() { @@ -110,7 +160,7 @@ public List emailAddresses() { /** * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * + * * @param emailAddresses the emailAddresses value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -124,7 +174,7 @@ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddre /** * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { @@ -133,7 +183,7 @@ public Boolean emailAccountAdmins() { /** * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * + * * @param emailAccountAdmins the emailAccountAdmins value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -148,7 +198,7 @@ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccoun /** * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @return the storageEndpoint value. */ public String storageEndpoint() { @@ -158,7 +208,7 @@ public String storageEndpoint() { /** * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * + * * @param storageEndpoint the storageEndpoint value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -173,7 +223,7 @@ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint /** * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -183,7 +233,7 @@ public String storageAccountAccessKey() { /** * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage * account. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -197,7 +247,7 @@ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storage /** * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @return the retentionDays value. */ public Integer retentionDays() { @@ -206,7 +256,7 @@ public Integer retentionDays() { /** * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * + * * @param retentionDays the retentionDays value to set. * @return the ServerSecurityAlertPolicyInner object itself. */ @@ -220,7 +270,7 @@ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { /** * Get the creationTime property: Specifies the UTC creation time of the policy. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -229,7 +279,7 @@ public OffsetDateTime creationTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -237,4 +287,51 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerSecurityAlertPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerSecurityAlertPolicyInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerSecurityAlertPolicyInner. + */ + public static ServerSecurityAlertPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerSecurityAlertPolicyInner deserializedServerSecurityAlertPolicyInner + = new ServerSecurityAlertPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.innerProperties + = SecurityAlertsPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerSecurityAlertPolicyInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java index 4a6c1824c56a4..52f56e155c115 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ +/** + * Server trust certificate imported from box to enable connection between box and Sql Managed Instance. + */ @Fluent public final class ServerTrustCertificateInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerTrustCertificateProperties innerProperties; - /** Creates an instance of ServerTrustCertificateInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerTrustCertificateInner class. + */ public ServerTrustCertificateInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerTrustCertificateProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the publicBlob property: The certificate public blob. - * + * * @return the publicBlob value. */ public String publicBlob() { @@ -41,7 +92,7 @@ public String publicBlob() { /** * Set the publicBlob property: The certificate public blob. - * + * * @param publicBlob the publicBlob value to set. * @return the ServerTrustCertificateInner object itself. */ @@ -55,7 +106,7 @@ public ServerTrustCertificateInner withPublicBlob(String publicBlob) { /** * Get the thumbprint property: The certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -64,7 +115,7 @@ public String thumbprint() { /** * Get the certificateName property: The certificate name. - * + * * @return the certificateName value. */ public String certificateName() { @@ -73,7 +124,7 @@ public String certificateName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -81,4 +132,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerTrustCertificateInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerTrustCertificateInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerTrustCertificateInner. + */ + public static ServerTrustCertificateInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerTrustCertificateInner deserializedServerTrustCertificateInner = new ServerTrustCertificateInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerTrustCertificateInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerTrustCertificateInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerTrustCertificateInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerTrustCertificateInner.innerProperties + = ServerTrustCertificateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustCertificateInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java index a3026f963d71e..674a3af41f2a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of a server trust certificate. */ +/** + * The properties of a server trust certificate. + */ @Fluent -public final class ServerTrustCertificateProperties { +public final class ServerTrustCertificateProperties implements JsonSerializable { /* * The certificate public blob */ - @JsonProperty(value = "publicBlob") private String publicBlob; /* * The certificate thumbprint */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) private String thumbprint; /* * The certificate name */ - @JsonProperty(value = "certificateName", access = JsonProperty.Access.WRITE_ONLY) private String certificateName; - /** Creates an instance of ServerTrustCertificateProperties class. */ + /** + * Creates an instance of ServerTrustCertificateProperties class. + */ public ServerTrustCertificateProperties() { } /** * Get the publicBlob property: The certificate public blob. - * + * * @return the publicBlob value. */ public String publicBlob() { @@ -43,7 +48,7 @@ public String publicBlob() { /** * Set the publicBlob property: The certificate public blob. - * + * * @param publicBlob the publicBlob value to set. * @return the ServerTrustCertificateProperties object itself. */ @@ -54,7 +59,7 @@ public ServerTrustCertificateProperties withPublicBlob(String publicBlob) { /** * Get the thumbprint property: The certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -63,7 +68,7 @@ public String thumbprint() { /** * Get the certificateName property: The certificate name. - * + * * @return the certificateName value. */ public String certificateName() { @@ -72,9 +77,50 @@ public String certificateName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicBlob", this.publicBlob); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerTrustCertificateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerTrustCertificateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerTrustCertificateProperties. + */ + public static ServerTrustCertificateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerTrustCertificateProperties deserializedServerTrustCertificateProperties + = new ServerTrustCertificateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicBlob".equals(fieldName)) { + deserializedServerTrustCertificateProperties.publicBlob = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedServerTrustCertificateProperties.thumbprint = reader.getString(); + } else if ("certificateName".equals(fieldName)) { + deserializedServerTrustCertificateProperties.certificateName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustCertificateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java index f915f5d72a3eb..565c321208f86 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java @@ -6,36 +6,87 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerInfo; import com.azure.resourcemanager.sql.models.ServerTrustGroupPropertiesTrustScopesItem; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A server trust group. */ +/** + * A server trust group. + */ @Fluent public final class ServerTrustGroupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerTrustGroupProperties innerProperties; - /** Creates an instance of ServerTrustGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerTrustGroupInner class. + */ public ServerTrustGroupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerTrustGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the groupMembers property: Group members information for the server trust group. - * + * * @return the groupMembers value. */ public List groupMembers() { @@ -44,7 +95,7 @@ public List groupMembers() { /** * Set the groupMembers property: Group members information for the server trust group. - * + * * @param groupMembers the groupMembers value to set. * @return the ServerTrustGroupInner object itself. */ @@ -58,7 +109,7 @@ public ServerTrustGroupInner withGroupMembers(List groupMembers) { /** * Get the trustScopes property: Trust scope of the server trust group. - * + * * @return the trustScopes value. */ public List trustScopes() { @@ -67,7 +118,7 @@ public List trustScopes() { /** * Set the trustScopes property: Trust scope of the server trust group. - * + * * @param trustScopes the trustScopes value to set. * @return the ServerTrustGroupInner object itself. */ @@ -81,7 +132,7 @@ public ServerTrustGroupInner withTrustScopes(List { + ServerTrustGroupInner deserializedServerTrustGroupInner = new ServerTrustGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerTrustGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerTrustGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerTrustGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerTrustGroupInner.innerProperties = ServerTrustGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java index 0099f8b06325a..c38af49d0b12e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java @@ -6,33 +6,39 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ServerInfo; import com.azure.resourcemanager.sql.models.ServerTrustGroupPropertiesTrustScopesItem; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Properties of a server trust group. */ +/** + * Properties of a server trust group. + */ @Fluent -public final class ServerTrustGroupProperties { +public final class ServerTrustGroupProperties implements JsonSerializable { /* * Group members information for the server trust group. */ - @JsonProperty(value = "groupMembers", required = true) private List groupMembers; /* * Trust scope of the server trust group. */ - @JsonProperty(value = "trustScopes", required = true) private List trustScopes; - /** Creates an instance of ServerTrustGroupProperties class. */ + /** + * Creates an instance of ServerTrustGroupProperties class. + */ public ServerTrustGroupProperties() { } /** * Get the groupMembers property: Group members information for the server trust group. - * + * * @return the groupMembers value. */ public List groupMembers() { @@ -41,7 +47,7 @@ public List groupMembers() { /** * Set the groupMembers property: Group members information for the server trust group. - * + * * @param groupMembers the groupMembers value to set. * @return the ServerTrustGroupProperties object itself. */ @@ -52,7 +58,7 @@ public ServerTrustGroupProperties withGroupMembers(List groupMembers /** * Get the trustScopes property: Trust scope of the server trust group. - * + * * @return the trustScopes value. */ public List trustScopes() { @@ -61,7 +67,7 @@ public List trustScopes() { /** * Set the trustScopes property: Trust scope of the server trust group. - * + * * @param trustScopes the trustScopes value to set. * @return the ServerTrustGroupProperties object itself. */ @@ -72,25 +78,67 @@ public ServerTrustGroupProperties withTrustScopes(List e.validate()); } if (trustScopes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property trustScopes in model ServerTrustGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trustScopes in model ServerTrustGroupProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerTrustGroupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("groupMembers", this.groupMembers, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("trustScopes", this.trustScopes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerTrustGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerTrustGroupProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerTrustGroupProperties. + */ + public static ServerTrustGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerTrustGroupProperties deserializedServerTrustGroupProperties = new ServerTrustGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupMembers".equals(fieldName)) { + List groupMembers = reader.readArray(reader1 -> ServerInfo.fromJson(reader1)); + deserializedServerTrustGroupProperties.groupMembers = groupMembers; + } else if ("trustScopes".equals(fieldName)) { + List trustScopes = reader.readArray( + reader1 -> ServerTrustGroupPropertiesTrustScopesItem.fromString(reader1.getString())); + deserializedServerTrustGroupProperties.trustScopes = trustScopes; + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java index 6ddc1aec2191d..1baa43fc09cd9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Usage metric of a server. */ +/** + * Usage metric of a server. + */ @Immutable public final class ServerUsageInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerUsageProperties innerProperties; - /** Creates an instance of ServerUsageInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerUsageInner class. + */ public ServerUsageInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerUsageProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -41,7 +92,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -50,7 +101,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -59,7 +110,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -68,7 +119,7 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -76,4 +127,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerUsageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerUsageInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerUsageInner. + */ + public static ServerUsageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerUsageInner deserializedServerUsageInner = new ServerUsageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerUsageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerUsageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerUsageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerUsageInner.innerProperties = ServerUsageProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerUsageInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java index 1a545dcbac3a6..bc039e38aac5d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a server usage. */ +/** + * Properties of a server usage. + */ @Immutable -public final class ServerUsageProperties { +public final class ServerUsageProperties implements JsonSerializable { /* * User-readable name of the metric. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * Current value of the metric. */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) private Double currentValue; /* * Boundary value of the metric. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Double limit; /* * Unit of the metric. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; - /** Creates an instance of ServerUsageProperties class. */ + /** + * Creates an instance of ServerUsageProperties class. + */ public ServerUsageProperties() { } /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -49,7 +53,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -58,7 +62,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -67,7 +71,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -76,9 +80,50 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerUsageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerUsageProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerUsageProperties. + */ + public static ServerUsageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerUsageProperties deserializedServerUsageProperties = new ServerUsageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedServerUsageProperties.displayName = reader.getString(); + } else if ("currentValue".equals(fieldName)) { + deserializedServerUsageProperties.currentValue = reader.getNullable(JsonReader::getDouble); + } else if ("limit".equals(fieldName)) { + deserializedServerUsageProperties.limit = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedServerUsageProperties.unit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerUsageProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentInner.java index 04827bae36924..bad5cf19d8ce3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A server vulnerability assessment. */ +/** + * A server vulnerability assessment. + */ @Fluent public final class ServerVulnerabilityAssessmentInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerVulnerabilityAssessmentProperties innerProperties; - /** Creates an instance of ServerVulnerabilityAssessmentInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ServerVulnerabilityAssessmentInner class. + */ public ServerVulnerabilityAssessmentInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerVulnerabilityAssessmentProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -44,7 +95,7 @@ public String storageContainerPath() { /** * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the ServerVulnerabilityAssessmentInner object itself. */ @@ -60,7 +111,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerPath(String storag * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -71,7 +122,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the ServerVulnerabilityAssessmentInner object itself. */ @@ -87,7 +138,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerSasKey(String stor * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -98,7 +149,7 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerVulnerabilityAssessmentInner object itself. */ @@ -112,7 +163,7 @@ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String sto /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -121,12 +172,12 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the ServerVulnerabilityAssessmentInner object itself. */ - public ServerVulnerabilityAssessmentInner withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public ServerVulnerabilityAssessmentInner + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { if (this.innerProperties() == null) { this.innerProperties = new ServerVulnerabilityAssessmentProperties(); } @@ -136,7 +187,7 @@ public ServerVulnerabilityAssessmentInner withRecurringScans( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -144,4 +195,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerVulnerabilityAssessmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerVulnerabilityAssessmentInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerVulnerabilityAssessmentInner. + */ + public static ServerVulnerabilityAssessmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerVulnerabilityAssessmentInner deserializedServerVulnerabilityAssessmentInner + = new ServerVulnerabilityAssessmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentInner.innerProperties + = ServerVulnerabilityAssessmentProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerVulnerabilityAssessmentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentProperties.java index eb6e5a6a6ed09..9391671221f64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentProperties.java @@ -6,16 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a server Vulnerability Assessment. */ +/** + * Properties of a server Vulnerability Assessment. + */ @Fluent -public final class ServerVulnerabilityAssessmentProperties { +public final class ServerVulnerabilityAssessmentProperties + implements JsonSerializable { /* * A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ - @JsonProperty(value = "storageContainerPath", required = true) private String storageContainerPath; /* @@ -23,7 +29,6 @@ public final class ServerVulnerabilityAssessmentProperties { * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is * required. Applies only if the storage account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageContainerSasKey") private String storageContainerSasKey; /* @@ -31,23 +36,23 @@ public final class ServerVulnerabilityAssessmentProperties { * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage * account is not behind a Vnet or a firewall */ - @JsonProperty(value = "storageAccountAccessKey") private String storageAccountAccessKey; /* * The recurring scans settings */ - @JsonProperty(value = "recurringScans") private VulnerabilityAssessmentRecurringScansProperties recurringScans; - /** Creates an instance of ServerVulnerabilityAssessmentProperties class. */ + /** + * Creates an instance of ServerVulnerabilityAssessmentProperties class. + */ public ServerVulnerabilityAssessmentProperties() { } /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -57,7 +62,7 @@ public String storageContainerPath() { /** * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. * https://myStorage.blob.core.windows.net/VaScans/). - * + * * @param storageContainerPath the storageContainerPath value to set. * @return the ServerVulnerabilityAssessmentProperties object itself. */ @@ -70,7 +75,7 @@ public ServerVulnerabilityAssessmentProperties withStorageContainerPath(String s * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { @@ -81,7 +86,7 @@ public String storageContainerSasKey() { * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageContainerSasKey the storageContainerSasKey value to set. * @return the ServerVulnerabilityAssessmentProperties object itself. */ @@ -94,7 +99,7 @@ public ServerVulnerabilityAssessmentProperties withStorageContainerSasKey(String * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { @@ -105,7 +110,7 @@ public String storageAccountAccessKey() { * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. * Applies only if the storage account is not behind a Vnet or a firewall. - * + * * @param storageAccountAccessKey the storageAccountAccessKey value to set. * @return the ServerVulnerabilityAssessmentProperties object itself. */ @@ -116,7 +121,7 @@ public ServerVulnerabilityAssessmentProperties withStorageAccountAccessKey(Strin /** * Get the recurringScans property: The recurring scans settings. - * + * * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { @@ -125,28 +130,26 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { /** * Set the recurringScans property: The recurring scans settings. - * + * * @param recurringScans the recurringScans value to set. * @return the ServerVulnerabilityAssessmentProperties object itself. */ - public ServerVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { + public ServerVulnerabilityAssessmentProperties + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.recurringScans = recurringScans; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageContainerPath() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageContainerPath in model" - + " ServerVulnerabilityAssessmentProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageContainerPath in model ServerVulnerabilityAssessmentProperties")); } if (recurringScans() != null) { recurringScans().validate(); @@ -154,4 +157,52 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ServerVulnerabilityAssessmentProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageContainerPath", this.storageContainerPath); + jsonWriter.writeStringField("storageContainerSasKey", this.storageContainerSasKey); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeJsonField("recurringScans", this.recurringScans); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerVulnerabilityAssessmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerVulnerabilityAssessmentProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerVulnerabilityAssessmentProperties. + */ + public static ServerVulnerabilityAssessmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerVulnerabilityAssessmentProperties deserializedServerVulnerabilityAssessmentProperties + = new ServerVulnerabilityAssessmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageContainerPath".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentProperties.storageContainerPath = reader.getString(); + } else if ("storageContainerSasKey".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentProperties.storageContainerSasKey = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentProperties.storageAccountAccessKey = reader.getString(); + } else if ("recurringScans".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentProperties.recurringScans + = VulnerabilityAssessmentRecurringScansProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerVulnerabilityAssessmentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationInner.java index 6175dcd27042d..00e8b20ebef6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SqlAgentConfigurationPropertiesState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A recoverable managed database resource. */ +/** + * A recoverable managed database resource. + */ @Fluent public final class SqlAgentConfigurationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SqlAgentConfigurationProperties innerProperties; - /** Creates an instance of SqlAgentConfigurationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SqlAgentConfigurationInner class. + */ public SqlAgentConfigurationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SqlAgentConfigurationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the state property: The state of Sql Agent. - * + * * @return the state value. */ public SqlAgentConfigurationPropertiesState state() { @@ -42,7 +93,7 @@ public SqlAgentConfigurationPropertiesState state() { /** * Set the state property: The state of Sql Agent. - * + * * @param state the state value to set. * @return the SqlAgentConfigurationInner object itself. */ @@ -56,7 +107,7 @@ public SqlAgentConfigurationInner withState(SqlAgentConfigurationPropertiesState /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -64,4 +115,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SqlAgentConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SqlAgentConfigurationInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SqlAgentConfigurationInner. + */ + public static SqlAgentConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SqlAgentConfigurationInner deserializedSqlAgentConfigurationInner = new SqlAgentConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSqlAgentConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSqlAgentConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSqlAgentConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSqlAgentConfigurationInner.innerProperties + = SqlAgentConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSqlAgentConfigurationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationProperties.java index 58c6b3b151c8e..c9b4688e85108 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationProperties.java @@ -5,25 +5,32 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SqlAgentConfigurationPropertiesState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Sql agent configuration properties. */ +/** + * Sql agent configuration properties. + */ @Fluent -public final class SqlAgentConfigurationProperties { +public final class SqlAgentConfigurationProperties implements JsonSerializable { /* * The state of Sql Agent. */ - @JsonProperty(value = "state") private SqlAgentConfigurationPropertiesState state; - /** Creates an instance of SqlAgentConfigurationProperties class. */ + /** + * Creates an instance of SqlAgentConfigurationProperties class. + */ public SqlAgentConfigurationProperties() { } /** * Get the state property: The state of Sql Agent. - * + * * @return the state value. */ public SqlAgentConfigurationPropertiesState state() { @@ -32,7 +39,7 @@ public SqlAgentConfigurationPropertiesState state() { /** * Set the state property: The state of Sql Agent. - * + * * @param state the state value to set. * @return the SqlAgentConfigurationProperties object itself. */ @@ -43,9 +50,47 @@ public SqlAgentConfigurationProperties withState(SqlAgentConfigurationProperties /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SqlAgentConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SqlAgentConfigurationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SqlAgentConfigurationProperties. + */ + public static SqlAgentConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SqlAgentConfigurationProperties deserializedSqlAgentConfigurationProperties + = new SqlAgentConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSqlAgentConfigurationProperties.state + = SqlAgentConfigurationPropertiesState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSqlAgentConfigurationProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java index d854f1a1cb480..c3d6c98d8f34e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Usage Metric of a Subscription in a Location. */ +/** + * Usage Metric of a Subscription in a Location. + */ @Immutable public final class SubscriptionUsageInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SubscriptionUsageProperties innerProperties; - /** Creates an instance of SubscriptionUsageInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SubscriptionUsageInner class. + */ public SubscriptionUsageInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SubscriptionUsageProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -41,7 +92,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -50,7 +101,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -59,7 +110,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -68,7 +119,7 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -76,4 +127,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionUsageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionUsageInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SubscriptionUsageInner. + */ + public static SubscriptionUsageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionUsageInner deserializedSubscriptionUsageInner = new SubscriptionUsageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubscriptionUsageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubscriptionUsageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubscriptionUsageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubscriptionUsageInner.innerProperties = SubscriptionUsageProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionUsageInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java index 6e037b50b1e92..450c1bc065e19 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a subscription usage. */ +/** + * Properties of a subscription usage. + */ @Immutable -public final class SubscriptionUsageProperties { +public final class SubscriptionUsageProperties implements JsonSerializable { /* * User-readable name of the metric. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * Current value of the metric. */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) private Double currentValue; /* * Boundary value of the metric. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Double limit; /* * Unit of the metric. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; - /** Creates an instance of SubscriptionUsageProperties class. */ + /** + * Creates an instance of SubscriptionUsageProperties class. + */ public SubscriptionUsageProperties() { } /** * Get the displayName property: User-readable name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -49,7 +53,7 @@ public String displayName() { /** * Get the currentValue property: Current value of the metric. - * + * * @return the currentValue value. */ public Double currentValue() { @@ -58,7 +62,7 @@ public Double currentValue() { /** * Get the limit property: Boundary value of the metric. - * + * * @return the limit value. */ public Double limit() { @@ -67,7 +71,7 @@ public Double limit() { /** * Get the unit property: Unit of the metric. - * + * * @return the unit value. */ public String unit() { @@ -76,9 +80,50 @@ public String unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionUsageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionUsageProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubscriptionUsageProperties. + */ + public static SubscriptionUsageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionUsageProperties deserializedSubscriptionUsageProperties = new SubscriptionUsageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedSubscriptionUsageProperties.displayName = reader.getString(); + } else if ("currentValue".equals(fieldName)) { + deserializedSubscriptionUsageProperties.currentValue = reader.getNullable(JsonReader::getDouble); + } else if ("limit".equals(fieldName)) { + deserializedSubscriptionUsageProperties.limit = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedSubscriptionUsageProperties.unit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionUsageProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java index 81798f2aaebeb..c8362e930dffc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java @@ -6,35 +6,86 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncAgentState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** An Azure SQL Database sync agent. */ +/** + * An Azure SQL Database sync agent. + */ @Fluent public final class SyncAgentInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SyncAgentProperties innerProperties; - /** Creates an instance of SyncAgentInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SyncAgentInner class. + */ public SyncAgentInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SyncAgentProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the name property: Name of the sync agent. - * + * * @return the name value. */ public String namePropertiesName() { @@ -43,7 +94,7 @@ public String namePropertiesName() { /** * Get the syncDatabaseId property: ARM resource id of the sync database in the sync agent. - * + * * @return the syncDatabaseId value. */ public String syncDatabaseId() { @@ -52,7 +103,7 @@ public String syncDatabaseId() { /** * Set the syncDatabaseId property: ARM resource id of the sync database in the sync agent. - * + * * @param syncDatabaseId the syncDatabaseId value to set. * @return the SyncAgentInner object itself. */ @@ -66,7 +117,7 @@ public SyncAgentInner withSyncDatabaseId(String syncDatabaseId) { /** * Get the lastAliveTime property: Last alive time of the sync agent. - * + * * @return the lastAliveTime value. */ public OffsetDateTime lastAliveTime() { @@ -75,7 +126,7 @@ public OffsetDateTime lastAliveTime() { /** * Get the state property: State of the sync agent. - * + * * @return the state value. */ public SyncAgentState state() { @@ -84,7 +135,7 @@ public SyncAgentState state() { /** * Get the isUpToDate property: If the sync agent version is up to date. - * + * * @return the isUpToDate value. */ public Boolean isUpToDate() { @@ -93,7 +144,7 @@ public Boolean isUpToDate() { /** * Get the expiryTime property: Expiration time of the sync agent version. - * + * * @return the expiryTime value. */ public OffsetDateTime expiryTime() { @@ -102,7 +153,7 @@ public OffsetDateTime expiryTime() { /** * Get the version property: Version of the sync agent. - * + * * @return the version value. */ public String version() { @@ -111,7 +162,7 @@ public String version() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -119,4 +170,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SyncAgentInner. + */ + public static SyncAgentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentInner deserializedSyncAgentInner = new SyncAgentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSyncAgentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSyncAgentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSyncAgentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSyncAgentInner.innerProperties = SyncAgentProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java index 7eb0d0f6ce594..e3491f32c6ccd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of an Azure SQL Database sync agent key. */ +/** + * Properties of an Azure SQL Database sync agent key. + */ @Immutable -public final class SyncAgentKeyPropertiesInner { +public final class SyncAgentKeyPropertiesInner implements JsonSerializable { /* * Key of sync agent. */ - @JsonProperty(value = "syncAgentKey", access = JsonProperty.Access.WRITE_ONLY) private String syncAgentKey; - /** Creates an instance of SyncAgentKeyPropertiesInner class. */ + /** + * Creates an instance of SyncAgentKeyPropertiesInner class. + */ public SyncAgentKeyPropertiesInner() { } /** * Get the syncAgentKey property: Key of sync agent. - * + * * @return the syncAgentKey value. */ public String syncAgentKey() { @@ -31,9 +38,44 @@ public String syncAgentKey() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentKeyPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentKeyPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncAgentKeyPropertiesInner. + */ + public static SyncAgentKeyPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentKeyPropertiesInner deserializedSyncAgentKeyPropertiesInner = new SyncAgentKeyPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("syncAgentKey".equals(fieldName)) { + deserializedSyncAgentKeyPropertiesInner.syncAgentKey = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentKeyPropertiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseInner.java index 9bc8cb22a2ea4..d708c36644908 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncMemberDbType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** An Azure SQL Database sync agent linked database. */ +/** + * An Azure SQL Database sync agent linked database. + */ @Immutable public final class SyncAgentLinkedDatabaseInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SyncAgentLinkedDatabaseProperties innerProperties; - /** Creates an instance of SyncAgentLinkedDatabaseInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SyncAgentLinkedDatabaseInner class. + */ public SyncAgentLinkedDatabaseInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SyncAgentLinkedDatabaseProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the databaseType property: Type of the sync agent linked database. - * + * * @return the databaseType value. */ public SyncMemberDbType databaseType() { @@ -42,7 +93,7 @@ public SyncMemberDbType databaseType() { /** * Get the databaseId property: Id of the sync agent linked database. - * + * * @return the databaseId value. */ public String databaseId() { @@ -51,7 +102,7 @@ public String databaseId() { /** * Get the description property: Description of the sync agent linked database. - * + * * @return the description value. */ public String description() { @@ -60,7 +111,7 @@ public String description() { /** * Get the serverName property: Server name of the sync agent linked database. - * + * * @return the serverName value. */ public String serverName() { @@ -69,7 +120,7 @@ public String serverName() { /** * Get the databaseName property: Database name of the sync agent linked database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -78,7 +129,7 @@ public String databaseName() { /** * Get the username property: User name of the sync agent linked database. - * + * * @return the username value. */ public String username() { @@ -87,7 +138,7 @@ public String username() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -95,4 +146,48 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentLinkedDatabaseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentLinkedDatabaseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SyncAgentLinkedDatabaseInner. + */ + public static SyncAgentLinkedDatabaseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentLinkedDatabaseInner deserializedSyncAgentLinkedDatabaseInner = new SyncAgentLinkedDatabaseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseInner.innerProperties + = SyncAgentLinkedDatabaseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentLinkedDatabaseInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseProperties.java index e48c8cbd926fd..fd160209fe5de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseProperties.java @@ -5,55 +5,57 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncMemberDbType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of an Azure SQL Database sync agent linked database. */ +/** + * Properties of an Azure SQL Database sync agent linked database. + */ @Immutable -public final class SyncAgentLinkedDatabaseProperties { +public final class SyncAgentLinkedDatabaseProperties implements JsonSerializable { /* * Type of the sync agent linked database. */ - @JsonProperty(value = "databaseType", access = JsonProperty.Access.WRITE_ONLY) private SyncMemberDbType databaseType; /* * Id of the sync agent linked database. */ - @JsonProperty(value = "databaseId", access = JsonProperty.Access.WRITE_ONLY) private String databaseId; /* * Description of the sync agent linked database. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Server name of the sync agent linked database. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * Database name of the sync agent linked database. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; /* * User name of the sync agent linked database. */ - @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY) private String username; - /** Creates an instance of SyncAgentLinkedDatabaseProperties class. */ + /** + * Creates an instance of SyncAgentLinkedDatabaseProperties class. + */ public SyncAgentLinkedDatabaseProperties() { } /** * Get the databaseType property: Type of the sync agent linked database. - * + * * @return the databaseType value. */ public SyncMemberDbType databaseType() { @@ -62,7 +64,7 @@ public SyncMemberDbType databaseType() { /** * Get the databaseId property: Id of the sync agent linked database. - * + * * @return the databaseId value. */ public String databaseId() { @@ -71,7 +73,7 @@ public String databaseId() { /** * Get the description property: Description of the sync agent linked database. - * + * * @return the description value. */ public String description() { @@ -80,7 +82,7 @@ public String description() { /** * Get the serverName property: Server name of the sync agent linked database. - * + * * @return the serverName value. */ public String serverName() { @@ -89,7 +91,7 @@ public String serverName() { /** * Get the databaseName property: Database name of the sync agent linked database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -98,7 +100,7 @@ public String databaseName() { /** * Get the username property: User name of the sync agent linked database. - * + * * @return the username value. */ public String username() { @@ -107,9 +109,56 @@ public String username() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentLinkedDatabaseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentLinkedDatabaseProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncAgentLinkedDatabaseProperties. + */ + public static SyncAgentLinkedDatabaseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentLinkedDatabaseProperties deserializedSyncAgentLinkedDatabaseProperties + = new SyncAgentLinkedDatabaseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseType".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.databaseType + = SyncMemberDbType.fromString(reader.getString()); + } else if ("databaseId".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.databaseId = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.description = reader.getString(); + } else if ("serverName".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.databaseName = reader.getString(); + } else if ("userName".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseProperties.username = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentLinkedDatabaseProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentProperties.java index f5b39ba6f6c32..66e4721244988 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentProperties.java @@ -5,62 +5,64 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncAgentState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of an Azure SQL Database sync agent. */ +/** + * Properties of an Azure SQL Database sync agent. + */ @Fluent -public final class SyncAgentProperties { +public final class SyncAgentProperties implements JsonSerializable { /* * Name of the sync agent. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * ARM resource id of the sync database in the sync agent. */ - @JsonProperty(value = "syncDatabaseId") private String syncDatabaseId; /* * Last alive time of the sync agent. */ - @JsonProperty(value = "lastAliveTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastAliveTime; /* * State of the sync agent. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private SyncAgentState state; /* * If the sync agent version is up to date. */ - @JsonProperty(value = "isUpToDate", access = JsonProperty.Access.WRITE_ONLY) private Boolean isUpToDate; /* * Expiration time of the sync agent version. */ - @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expiryTime; /* * Version of the sync agent. */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; - /** Creates an instance of SyncAgentProperties class. */ + /** + * Creates an instance of SyncAgentProperties class. + */ public SyncAgentProperties() { } /** * Get the name property: Name of the sync agent. - * + * * @return the name value. */ public String name() { @@ -69,7 +71,7 @@ public String name() { /** * Get the syncDatabaseId property: ARM resource id of the sync database in the sync agent. - * + * * @return the syncDatabaseId value. */ public String syncDatabaseId() { @@ -78,7 +80,7 @@ public String syncDatabaseId() { /** * Set the syncDatabaseId property: ARM resource id of the sync database in the sync agent. - * + * * @param syncDatabaseId the syncDatabaseId value to set. * @return the SyncAgentProperties object itself. */ @@ -89,7 +91,7 @@ public SyncAgentProperties withSyncDatabaseId(String syncDatabaseId) { /** * Get the lastAliveTime property: Last alive time of the sync agent. - * + * * @return the lastAliveTime value. */ public OffsetDateTime lastAliveTime() { @@ -98,7 +100,7 @@ public OffsetDateTime lastAliveTime() { /** * Get the state property: State of the sync agent. - * + * * @return the state value. */ public SyncAgentState state() { @@ -107,7 +109,7 @@ public SyncAgentState state() { /** * Get the isUpToDate property: If the sync agent version is up to date. - * + * * @return the isUpToDate value. */ public Boolean isUpToDate() { @@ -116,7 +118,7 @@ public Boolean isUpToDate() { /** * Get the expiryTime property: Expiration time of the sync agent version. - * + * * @return the expiryTime value. */ public OffsetDateTime expiryTime() { @@ -125,7 +127,7 @@ public OffsetDateTime expiryTime() { /** * Get the version property: Version of the sync agent. - * + * * @return the version value. */ public String version() { @@ -134,9 +136,59 @@ public String version() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("syncDatabaseId", this.syncDatabaseId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncAgentProperties. + */ + public static SyncAgentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentProperties deserializedSyncAgentProperties = new SyncAgentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSyncAgentProperties.name = reader.getString(); + } else if ("syncDatabaseId".equals(fieldName)) { + deserializedSyncAgentProperties.syncDatabaseId = reader.getString(); + } else if ("lastAliveTime".equals(fieldName)) { + deserializedSyncAgentProperties.lastAliveTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedSyncAgentProperties.state = SyncAgentState.fromString(reader.getString()); + } else if ("isUpToDate".equals(fieldName)) { + deserializedSyncAgentProperties.isUpToDate = reader.getNullable(JsonReader::getBoolean); + } else if ("expiryTime".equals(fieldName)) { + deserializedSyncAgentProperties.expiryTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("version".equals(fieldName)) { + deserializedSyncAgentProperties.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncDatabaseIdPropertiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncDatabaseIdPropertiesInner.java index ca4a422a1ac49..914a18a6a98b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncDatabaseIdPropertiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncDatabaseIdPropertiesInner.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of the sync database id. */ +/** + * Properties of the sync database id. + */ @Immutable -public final class SyncDatabaseIdPropertiesInner { +public final class SyncDatabaseIdPropertiesInner implements JsonSerializable { /* * ARM resource id of sync database. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /** Creates an instance of SyncDatabaseIdPropertiesInner class. */ + /** + * Creates an instance of SyncDatabaseIdPropertiesInner class. + */ public SyncDatabaseIdPropertiesInner() { } /** * Get the id property: ARM resource id of sync database. - * + * * @return the id value. */ public String id() { @@ -31,9 +38,45 @@ public String id() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncDatabaseIdPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncDatabaseIdPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncDatabaseIdPropertiesInner. + */ + public static SyncDatabaseIdPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncDatabaseIdPropertiesInner deserializedSyncDatabaseIdPropertiesInner + = new SyncDatabaseIdPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSyncDatabaseIdPropertiesInner.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncDatabaseIdPropertiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncFullSchemaPropertiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncFullSchemaPropertiesInner.java index 793b7d118f6d6..f02b68a120d04 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncFullSchemaPropertiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncFullSchemaPropertiesInner.java @@ -5,33 +5,40 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncFullSchemaTable; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Properties of the database full schema. */ +/** + * Properties of the database full schema. + */ @Immutable -public final class SyncFullSchemaPropertiesInner { +public final class SyncFullSchemaPropertiesInner implements JsonSerializable { /* * List of tables in the database full schema. */ - @JsonProperty(value = "tables", access = JsonProperty.Access.WRITE_ONLY) private List tables; /* * Last update time of the database schema. */ - @JsonProperty(value = "lastUpdateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastUpdateTime; - /** Creates an instance of SyncFullSchemaPropertiesInner class. */ + /** + * Creates an instance of SyncFullSchemaPropertiesInner class. + */ public SyncFullSchemaPropertiesInner() { } /** * Get the tables property: List of tables in the database full schema. - * + * * @return the tables value. */ public List tables() { @@ -40,7 +47,7 @@ public List tables() { /** * Get the lastUpdateTime property: Last update time of the database schema. - * + * * @return the lastUpdateTime value. */ public OffsetDateTime lastUpdateTime() { @@ -49,7 +56,7 @@ public OffsetDateTime lastUpdateTime() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -57,4 +64,45 @@ public void validate() { tables().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncFullSchemaPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncFullSchemaPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncFullSchemaPropertiesInner. + */ + public static SyncFullSchemaPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncFullSchemaPropertiesInner deserializedSyncFullSchemaPropertiesInner + = new SyncFullSchemaPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tables".equals(fieldName)) { + List tables + = reader.readArray(reader1 -> SyncFullSchemaTable.fromJson(reader1)); + deserializedSyncFullSchemaPropertiesInner.tables = tables; + } else if ("lastUpdateTime".equals(fieldName)) { + deserializedSyncFullSchemaPropertiesInner.lastUpdateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncFullSchemaPropertiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupInner.java index 93f95e849fcab..b8a0e945adc65 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupInner.java @@ -6,35 +6,55 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.Sku; import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; import com.azure.resourcemanager.sql.models.SyncGroupSchema; import com.azure.resourcemanager.sql.models.SyncGroupState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** An Azure SQL Database sync group. */ +/** + * An Azure SQL Database sync group. + */ @Fluent public final class SyncGroupInner extends ProxyResource { /* * The name and capacity of the SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource properties. */ - @JsonProperty(value = "properties") private SyncGroupProperties innerProperties; - /** Creates an instance of SyncGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SyncGroupInner class. + */ public SyncGroupInner() { } /** * Get the sku property: The name and capacity of the SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -43,7 +63,7 @@ public Sku sku() { /** * Set the sku property: The name and capacity of the SKU. - * + * * @param sku the sku value to set. * @return the SyncGroupInner object itself. */ @@ -54,16 +74,46 @@ public SyncGroupInner withSku(Sku sku) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SyncGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the interval property: Sync interval of the sync group. - * + * * @return the interval value. */ public Integer interval() { @@ -72,7 +122,7 @@ public Integer interval() { /** * Set the interval property: Sync interval of the sync group. - * + * * @param interval the interval value to set. * @return the SyncGroupInner object itself. */ @@ -86,7 +136,7 @@ public SyncGroupInner withInterval(Integer interval) { /** * Get the lastSyncTime property: Last sync time of the sync group. - * + * * @return the lastSyncTime value. */ public OffsetDateTime lastSyncTime() { @@ -95,7 +145,7 @@ public OffsetDateTime lastSyncTime() { /** * Get the conflictResolutionPolicy property: Conflict resolution policy of the sync group. - * + * * @return the conflictResolutionPolicy value. */ public SyncConflictResolutionPolicy conflictResolutionPolicy() { @@ -104,7 +154,7 @@ public SyncConflictResolutionPolicy conflictResolutionPolicy() { /** * Set the conflictResolutionPolicy property: Conflict resolution policy of the sync group. - * + * * @param conflictResolutionPolicy the conflictResolutionPolicy value to set. * @return the SyncGroupInner object itself. */ @@ -118,7 +168,7 @@ public SyncGroupInner withConflictResolutionPolicy(SyncConflictResolutionPolicy /** * Get the syncDatabaseId property: ARM resource id of the sync database in the sync group. - * + * * @return the syncDatabaseId value. */ public String syncDatabaseId() { @@ -127,7 +177,7 @@ public String syncDatabaseId() { /** * Set the syncDatabaseId property: ARM resource id of the sync database in the sync group. - * + * * @param syncDatabaseId the syncDatabaseId value to set. * @return the SyncGroupInner object itself. */ @@ -141,7 +191,7 @@ public SyncGroupInner withSyncDatabaseId(String syncDatabaseId) { /** * Get the hubDatabaseUsername property: User name for the sync group hub database credential. - * + * * @return the hubDatabaseUsername value. */ public String hubDatabaseUsername() { @@ -150,7 +200,7 @@ public String hubDatabaseUsername() { /** * Set the hubDatabaseUsername property: User name for the sync group hub database credential. - * + * * @param hubDatabaseUsername the hubDatabaseUsername value to set. * @return the SyncGroupInner object itself. */ @@ -164,7 +214,7 @@ public SyncGroupInner withHubDatabaseUsername(String hubDatabaseUsername) { /** * Get the hubDatabasePassword property: Password for the sync group hub database credential. - * + * * @return the hubDatabasePassword value. */ public String hubDatabasePassword() { @@ -173,7 +223,7 @@ public String hubDatabasePassword() { /** * Set the hubDatabasePassword property: Password for the sync group hub database credential. - * + * * @param hubDatabasePassword the hubDatabasePassword value to set. * @return the SyncGroupInner object itself. */ @@ -187,7 +237,7 @@ public SyncGroupInner withHubDatabasePassword(String hubDatabasePassword) { /** * Get the syncState property: Sync state of the sync group. - * + * * @return the syncState value. */ public SyncGroupState syncState() { @@ -196,7 +246,7 @@ public SyncGroupState syncState() { /** * Get the schema property: Sync schema of the sync group. - * + * * @return the schema value. */ public SyncGroupSchema schema() { @@ -205,7 +255,7 @@ public SyncGroupSchema schema() { /** * Set the schema property: Sync schema of the sync group. - * + * * @param schema the schema value to set. * @return the SyncGroupInner object itself. */ @@ -219,7 +269,7 @@ public SyncGroupInner withSchema(SyncGroupSchema schema) { /** * Get the enableConflictLogging property: If conflict logging is enabled. - * + * * @return the enableConflictLogging value. */ public Boolean enableConflictLogging() { @@ -228,7 +278,7 @@ public Boolean enableConflictLogging() { /** * Set the enableConflictLogging property: If conflict logging is enabled. - * + * * @param enableConflictLogging the enableConflictLogging value to set. * @return the SyncGroupInner object itself. */ @@ -242,7 +292,7 @@ public SyncGroupInner withEnableConflictLogging(Boolean enableConflictLogging) { /** * Get the conflictLoggingRetentionInDays property: Conflict logging retention period. - * + * * @return the conflictLoggingRetentionInDays value. */ public Integer conflictLoggingRetentionInDays() { @@ -251,7 +301,7 @@ public Integer conflictLoggingRetentionInDays() { /** * Set the conflictLoggingRetentionInDays property: Conflict logging retention period. - * + * * @param conflictLoggingRetentionInDays the conflictLoggingRetentionInDays value to set. * @return the SyncGroupInner object itself. */ @@ -265,7 +315,7 @@ public SyncGroupInner withConflictLoggingRetentionInDays(Integer conflictLogging /** * Get the usePrivateLinkConnection property: If use private link connection is enabled. - * + * * @return the usePrivateLinkConnection value. */ public Boolean usePrivateLinkConnection() { @@ -274,7 +324,7 @@ public Boolean usePrivateLinkConnection() { /** * Set the usePrivateLinkConnection property: If use private link connection is enabled. - * + * * @param usePrivateLinkConnection the usePrivateLinkConnection value to set. * @return the SyncGroupInner object itself. */ @@ -289,7 +339,7 @@ public SyncGroupInner withUsePrivateLinkConnection(Boolean usePrivateLinkConnect /** * Get the privateEndpointName property: Private endpoint name of the sync group if use private link connection is * enabled. - * + * * @return the privateEndpointName value. */ public String privateEndpointName() { @@ -298,7 +348,7 @@ public String privateEndpointName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -309,4 +359,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SyncGroupInner. + */ + public static SyncGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupInner deserializedSyncGroupInner = new SyncGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSyncGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSyncGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSyncGroupInner.type = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedSyncGroupInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedSyncGroupInner.innerProperties = SyncGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupLogPropertiesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupLogPropertiesInner.java index e34fb997dc31e..20a9e9487170e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupLogPropertiesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupLogPropertiesInner.java @@ -5,57 +5,60 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncGroupLogType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.UUID; -/** Properties of an Azure SQL Database sync group log. */ +/** + * Properties of an Azure SQL Database sync group log. + */ @Immutable -public final class SyncGroupLogPropertiesInner { +public final class SyncGroupLogPropertiesInner implements JsonSerializable { /* * Timestamp of the sync group log. */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime timestamp; /* * Type of the sync group log. */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private SyncGroupLogType type; /* * Source of the sync group log. */ - @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY) private String source; /* * Details of the sync group log. */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) private String details; /* * TracingId of the sync group log. */ - @JsonProperty(value = "tracingId", access = JsonProperty.Access.WRITE_ONLY) private UUID tracingId; /* * OperationStatus of the sync group log. */ - @JsonProperty(value = "operationStatus", access = JsonProperty.Access.WRITE_ONLY) private String operationStatus; - /** Creates an instance of SyncGroupLogPropertiesInner class. */ + /** + * Creates an instance of SyncGroupLogPropertiesInner class. + */ public SyncGroupLogPropertiesInner() { } /** * Get the timestamp property: Timestamp of the sync group log. - * + * * @return the timestamp value. */ public OffsetDateTime timestamp() { @@ -64,7 +67,7 @@ public OffsetDateTime timestamp() { /** * Get the type property: Type of the sync group log. - * + * * @return the type value. */ public SyncGroupLogType type() { @@ -73,7 +76,7 @@ public SyncGroupLogType type() { /** * Get the source property: Source of the sync group log. - * + * * @return the source value. */ public String source() { @@ -82,7 +85,7 @@ public String source() { /** * Get the details property: Details of the sync group log. - * + * * @return the details value. */ public String details() { @@ -91,7 +94,7 @@ public String details() { /** * Get the tracingId property: TracingId of the sync group log. - * + * * @return the tracingId value. */ public UUID tracingId() { @@ -100,7 +103,7 @@ public UUID tracingId() { /** * Get the operationStatus property: OperationStatus of the sync group log. - * + * * @return the operationStatus value. */ public String operationStatus() { @@ -109,9 +112,56 @@ public String operationStatus() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupLogPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupLogPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupLogPropertiesInner. + */ + public static SyncGroupLogPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupLogPropertiesInner deserializedSyncGroupLogPropertiesInner = new SyncGroupLogPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timestamp".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("type".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.type = SyncGroupLogType.fromString(reader.getString()); + } else if ("source".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.source = reader.getString(); + } else if ("details".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.details = reader.getString(); + } else if ("tracingId".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.tracingId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("operationStatus".equals(fieldName)) { + deserializedSyncGroupLogPropertiesInner.operationStatus = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupLogPropertiesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupProperties.java index e909043d94b86..6266c81158b08 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupProperties.java @@ -5,94 +5,91 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; import com.azure.resourcemanager.sql.models.SyncGroupSchema; import com.azure.resourcemanager.sql.models.SyncGroupState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; -/** Properties of a sync group. */ +/** + * Properties of a sync group. + */ @Fluent -public final class SyncGroupProperties { +public final class SyncGroupProperties implements JsonSerializable { /* * Sync interval of the sync group. */ - @JsonProperty(value = "interval") private Integer interval; /* * Last sync time of the sync group. */ - @JsonProperty(value = "lastSyncTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastSyncTime; /* * Conflict resolution policy of the sync group. */ - @JsonProperty(value = "conflictResolutionPolicy") private SyncConflictResolutionPolicy conflictResolutionPolicy; /* * ARM resource id of the sync database in the sync group. */ - @JsonProperty(value = "syncDatabaseId") private String syncDatabaseId; /* * User name for the sync group hub database credential. */ - @JsonProperty(value = "hubDatabaseUserName") private String hubDatabaseUsername; /* * Password for the sync group hub database credential. */ - @JsonProperty(value = "hubDatabasePassword") private String hubDatabasePassword; /* * Sync state of the sync group. */ - @JsonProperty(value = "syncState", access = JsonProperty.Access.WRITE_ONLY) private SyncGroupState syncState; /* * Sync schema of the sync group. */ - @JsonProperty(value = "schema") private SyncGroupSchema schema; /* * If conflict logging is enabled. */ - @JsonProperty(value = "enableConflictLogging") private Boolean enableConflictLogging; /* * Conflict logging retention period. */ - @JsonProperty(value = "conflictLoggingRetentionInDays") private Integer conflictLoggingRetentionInDays; /* * If use private link connection is enabled. */ - @JsonProperty(value = "usePrivateLinkConnection") private Boolean usePrivateLinkConnection; /* * Private endpoint name of the sync group if use private link connection is enabled. */ - @JsonProperty(value = "privateEndpointName", access = JsonProperty.Access.WRITE_ONLY) private String privateEndpointName; - /** Creates an instance of SyncGroupProperties class. */ + /** + * Creates an instance of SyncGroupProperties class. + */ public SyncGroupProperties() { } /** * Get the interval property: Sync interval of the sync group. - * + * * @return the interval value. */ public Integer interval() { @@ -101,7 +98,7 @@ public Integer interval() { /** * Set the interval property: Sync interval of the sync group. - * + * * @param interval the interval value to set. * @return the SyncGroupProperties object itself. */ @@ -112,7 +109,7 @@ public SyncGroupProperties withInterval(Integer interval) { /** * Get the lastSyncTime property: Last sync time of the sync group. - * + * * @return the lastSyncTime value. */ public OffsetDateTime lastSyncTime() { @@ -121,7 +118,7 @@ public OffsetDateTime lastSyncTime() { /** * Get the conflictResolutionPolicy property: Conflict resolution policy of the sync group. - * + * * @return the conflictResolutionPolicy value. */ public SyncConflictResolutionPolicy conflictResolutionPolicy() { @@ -130,7 +127,7 @@ public SyncConflictResolutionPolicy conflictResolutionPolicy() { /** * Set the conflictResolutionPolicy property: Conflict resolution policy of the sync group. - * + * * @param conflictResolutionPolicy the conflictResolutionPolicy value to set. * @return the SyncGroupProperties object itself. */ @@ -141,7 +138,7 @@ public SyncGroupProperties withConflictResolutionPolicy(SyncConflictResolutionPo /** * Get the syncDatabaseId property: ARM resource id of the sync database in the sync group. - * + * * @return the syncDatabaseId value. */ public String syncDatabaseId() { @@ -150,7 +147,7 @@ public String syncDatabaseId() { /** * Set the syncDatabaseId property: ARM resource id of the sync database in the sync group. - * + * * @param syncDatabaseId the syncDatabaseId value to set. * @return the SyncGroupProperties object itself. */ @@ -161,7 +158,7 @@ public SyncGroupProperties withSyncDatabaseId(String syncDatabaseId) { /** * Get the hubDatabaseUsername property: User name for the sync group hub database credential. - * + * * @return the hubDatabaseUsername value. */ public String hubDatabaseUsername() { @@ -170,7 +167,7 @@ public String hubDatabaseUsername() { /** * Set the hubDatabaseUsername property: User name for the sync group hub database credential. - * + * * @param hubDatabaseUsername the hubDatabaseUsername value to set. * @return the SyncGroupProperties object itself. */ @@ -181,7 +178,7 @@ public SyncGroupProperties withHubDatabaseUsername(String hubDatabaseUsername) { /** * Get the hubDatabasePassword property: Password for the sync group hub database credential. - * + * * @return the hubDatabasePassword value. */ public String hubDatabasePassword() { @@ -190,7 +187,7 @@ public String hubDatabasePassword() { /** * Set the hubDatabasePassword property: Password for the sync group hub database credential. - * + * * @param hubDatabasePassword the hubDatabasePassword value to set. * @return the SyncGroupProperties object itself. */ @@ -201,7 +198,7 @@ public SyncGroupProperties withHubDatabasePassword(String hubDatabasePassword) { /** * Get the syncState property: Sync state of the sync group. - * + * * @return the syncState value. */ public SyncGroupState syncState() { @@ -210,7 +207,7 @@ public SyncGroupState syncState() { /** * Get the schema property: Sync schema of the sync group. - * + * * @return the schema value. */ public SyncGroupSchema schema() { @@ -219,7 +216,7 @@ public SyncGroupSchema schema() { /** * Set the schema property: Sync schema of the sync group. - * + * * @param schema the schema value to set. * @return the SyncGroupProperties object itself. */ @@ -230,7 +227,7 @@ public SyncGroupProperties withSchema(SyncGroupSchema schema) { /** * Get the enableConflictLogging property: If conflict logging is enabled. - * + * * @return the enableConflictLogging value. */ public Boolean enableConflictLogging() { @@ -239,7 +236,7 @@ public Boolean enableConflictLogging() { /** * Set the enableConflictLogging property: If conflict logging is enabled. - * + * * @param enableConflictLogging the enableConflictLogging value to set. * @return the SyncGroupProperties object itself. */ @@ -250,7 +247,7 @@ public SyncGroupProperties withEnableConflictLogging(Boolean enableConflictLoggi /** * Get the conflictLoggingRetentionInDays property: Conflict logging retention period. - * + * * @return the conflictLoggingRetentionInDays value. */ public Integer conflictLoggingRetentionInDays() { @@ -259,7 +256,7 @@ public Integer conflictLoggingRetentionInDays() { /** * Set the conflictLoggingRetentionInDays property: Conflict logging retention period. - * + * * @param conflictLoggingRetentionInDays the conflictLoggingRetentionInDays value to set. * @return the SyncGroupProperties object itself. */ @@ -270,7 +267,7 @@ public SyncGroupProperties withConflictLoggingRetentionInDays(Integer conflictLo /** * Get the usePrivateLinkConnection property: If use private link connection is enabled. - * + * * @return the usePrivateLinkConnection value. */ public Boolean usePrivateLinkConnection() { @@ -279,7 +276,7 @@ public Boolean usePrivateLinkConnection() { /** * Set the usePrivateLinkConnection property: If use private link connection is enabled. - * + * * @param usePrivateLinkConnection the usePrivateLinkConnection value to set. * @return the SyncGroupProperties object itself. */ @@ -291,7 +288,7 @@ public SyncGroupProperties withUsePrivateLinkConnection(Boolean usePrivateLinkCo /** * Get the privateEndpointName property: Private endpoint name of the sync group if use private link connection is * enabled. - * + * * @return the privateEndpointName value. */ public String privateEndpointName() { @@ -300,7 +297,7 @@ public String privateEndpointName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -308,4 +305,75 @@ public void validate() { schema().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("interval", this.interval); + jsonWriter.writeStringField("conflictResolutionPolicy", + this.conflictResolutionPolicy == null ? null : this.conflictResolutionPolicy.toString()); + jsonWriter.writeStringField("syncDatabaseId", this.syncDatabaseId); + jsonWriter.writeStringField("hubDatabaseUserName", this.hubDatabaseUsername); + jsonWriter.writeStringField("hubDatabasePassword", this.hubDatabasePassword); + jsonWriter.writeJsonField("schema", this.schema); + jsonWriter.writeBooleanField("enableConflictLogging", this.enableConflictLogging); + jsonWriter.writeNumberField("conflictLoggingRetentionInDays", this.conflictLoggingRetentionInDays); + jsonWriter.writeBooleanField("usePrivateLinkConnection", this.usePrivateLinkConnection); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupProperties. + */ + public static SyncGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupProperties deserializedSyncGroupProperties = new SyncGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interval".equals(fieldName)) { + deserializedSyncGroupProperties.interval = reader.getNullable(JsonReader::getInt); + } else if ("lastSyncTime".equals(fieldName)) { + deserializedSyncGroupProperties.lastSyncTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("conflictResolutionPolicy".equals(fieldName)) { + deserializedSyncGroupProperties.conflictResolutionPolicy + = SyncConflictResolutionPolicy.fromString(reader.getString()); + } else if ("syncDatabaseId".equals(fieldName)) { + deserializedSyncGroupProperties.syncDatabaseId = reader.getString(); + } else if ("hubDatabaseUserName".equals(fieldName)) { + deserializedSyncGroupProperties.hubDatabaseUsername = reader.getString(); + } else if ("hubDatabasePassword".equals(fieldName)) { + deserializedSyncGroupProperties.hubDatabasePassword = reader.getString(); + } else if ("syncState".equals(fieldName)) { + deserializedSyncGroupProperties.syncState = SyncGroupState.fromString(reader.getString()); + } else if ("schema".equals(fieldName)) { + deserializedSyncGroupProperties.schema = SyncGroupSchema.fromJson(reader); + } else if ("enableConflictLogging".equals(fieldName)) { + deserializedSyncGroupProperties.enableConflictLogging = reader.getNullable(JsonReader::getBoolean); + } else if ("conflictLoggingRetentionInDays".equals(fieldName)) { + deserializedSyncGroupProperties.conflictLoggingRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else if ("usePrivateLinkConnection".equals(fieldName)) { + deserializedSyncGroupProperties.usePrivateLinkConnection + = reader.getNullable(JsonReader::getBoolean); + } else if ("privateEndpointName".equals(fieldName)) { + deserializedSyncGroupProperties.privateEndpointName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java index 4f2b7fea7c2c7..1dcc9e63094e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java @@ -6,37 +6,88 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncDirection; import com.azure.resourcemanager.sql.models.SyncMemberDbType; import com.azure.resourcemanager.sql.models.SyncMemberState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.UUID; -/** An Azure SQL Database sync member. */ +/** + * An Azure SQL Database sync member. + */ @Fluent public final class SyncMemberInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private SyncMemberProperties innerProperties; - /** Creates an instance of SyncMemberInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SyncMemberInner class. + */ public SyncMemberInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private SyncMemberProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the databaseType property: Database type of the sync member. - * + * * @return the databaseType value. */ public SyncMemberDbType databaseType() { @@ -45,7 +96,7 @@ public SyncMemberDbType databaseType() { /** * Set the databaseType property: Database type of the sync member. - * + * * @param databaseType the databaseType value to set. * @return the SyncMemberInner object itself. */ @@ -59,7 +110,7 @@ public SyncMemberInner withDatabaseType(SyncMemberDbType databaseType) { /** * Get the syncAgentId property: ARM resource id of the sync agent in the sync member. - * + * * @return the syncAgentId value. */ public String syncAgentId() { @@ -68,7 +119,7 @@ public String syncAgentId() { /** * Set the syncAgentId property: ARM resource id of the sync agent in the sync member. - * + * * @param syncAgentId the syncAgentId value to set. * @return the SyncMemberInner object itself. */ @@ -82,7 +133,7 @@ public SyncMemberInner withSyncAgentId(String syncAgentId) { /** * Get the sqlServerDatabaseId property: SQL Server database id of the sync member. - * + * * @return the sqlServerDatabaseId value. */ public UUID sqlServerDatabaseId() { @@ -91,7 +142,7 @@ public UUID sqlServerDatabaseId() { /** * Set the sqlServerDatabaseId property: SQL Server database id of the sync member. - * + * * @param sqlServerDatabaseId the sqlServerDatabaseId value to set. * @return the SyncMemberInner object itself. */ @@ -106,7 +157,7 @@ public SyncMemberInner withSqlServerDatabaseId(UUID sqlServerDatabaseId) { /** * Get the syncMemberAzureDatabaseResourceId property: ARM resource id of the sync member logical database, for sync * members in Azure. - * + * * @return the syncMemberAzureDatabaseResourceId value. */ public String syncMemberAzureDatabaseResourceId() { @@ -116,7 +167,7 @@ public String syncMemberAzureDatabaseResourceId() { /** * Set the syncMemberAzureDatabaseResourceId property: ARM resource id of the sync member logical database, for sync * members in Azure. - * + * * @param syncMemberAzureDatabaseResourceId the syncMemberAzureDatabaseResourceId value to set. * @return the SyncMemberInner object itself. */ @@ -130,7 +181,7 @@ public SyncMemberInner withSyncMemberAzureDatabaseResourceId(String syncMemberAz /** * Get the usePrivateLinkConnection property: Whether to use private link connection. - * + * * @return the usePrivateLinkConnection value. */ public Boolean usePrivateLinkConnection() { @@ -139,7 +190,7 @@ public Boolean usePrivateLinkConnection() { /** * Set the usePrivateLinkConnection property: Whether to use private link connection. - * + * * @param usePrivateLinkConnection the usePrivateLinkConnection value to set. * @return the SyncMemberInner object itself. */ @@ -154,7 +205,7 @@ public SyncMemberInner withUsePrivateLinkConnection(Boolean usePrivateLinkConnec /** * Get the privateEndpointName property: Private endpoint name of the sync member if use private link connection is * enabled, for sync members in Azure. - * + * * @return the privateEndpointName value. */ public String privateEndpointName() { @@ -163,7 +214,7 @@ public String privateEndpointName() { /** * Get the serverName property: Server name of the member database in the sync member. - * + * * @return the serverName value. */ public String serverName() { @@ -172,7 +223,7 @@ public String serverName() { /** * Set the serverName property: Server name of the member database in the sync member. - * + * * @param serverName the serverName value to set. * @return the SyncMemberInner object itself. */ @@ -186,7 +237,7 @@ public SyncMemberInner withServerName(String serverName) { /** * Get the databaseName property: Database name of the member database in the sync member. - * + * * @return the databaseName value. */ public String databaseName() { @@ -195,7 +246,7 @@ public String databaseName() { /** * Set the databaseName property: Database name of the member database in the sync member. - * + * * @param databaseName the databaseName value to set. * @return the SyncMemberInner object itself. */ @@ -209,7 +260,7 @@ public SyncMemberInner withDatabaseName(String databaseName) { /** * Get the username property: User name of the member database in the sync member. - * + * * @return the username value. */ public String username() { @@ -218,7 +269,7 @@ public String username() { /** * Set the username property: User name of the member database in the sync member. - * + * * @param username the username value to set. * @return the SyncMemberInner object itself. */ @@ -232,7 +283,7 @@ public SyncMemberInner withUsername(String username) { /** * Get the password property: Password of the member database in the sync member. - * + * * @return the password value. */ public String password() { @@ -241,7 +292,7 @@ public String password() { /** * Set the password property: Password of the member database in the sync member. - * + * * @param password the password value to set. * @return the SyncMemberInner object itself. */ @@ -255,7 +306,7 @@ public SyncMemberInner withPassword(String password) { /** * Get the syncDirection property: Sync direction of the sync member. - * + * * @return the syncDirection value. */ public SyncDirection syncDirection() { @@ -264,7 +315,7 @@ public SyncDirection syncDirection() { /** * Set the syncDirection property: Sync direction of the sync member. - * + * * @param syncDirection the syncDirection value to set. * @return the SyncMemberInner object itself. */ @@ -278,7 +329,7 @@ public SyncMemberInner withSyncDirection(SyncDirection syncDirection) { /** * Get the syncState property: Sync state of the sync member. - * + * * @return the syncState value. */ public SyncMemberState syncState() { @@ -287,7 +338,7 @@ public SyncMemberState syncState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -295,4 +346,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncMemberInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncMemberInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SyncMemberInner. + */ + public static SyncMemberInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncMemberInner deserializedSyncMemberInner = new SyncMemberInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSyncMemberInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSyncMemberInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSyncMemberInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSyncMemberInner.innerProperties = SyncMemberProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncMemberInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java index 82f73ba09175e..c6c15867f2344 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java @@ -5,94 +5,91 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.SyncDirection; import com.azure.resourcemanager.sql.models.SyncMemberDbType; import com.azure.resourcemanager.sql.models.SyncMemberState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** Properties of a sync member. */ +/** + * Properties of a sync member. + */ @Fluent -public final class SyncMemberProperties { +public final class SyncMemberProperties implements JsonSerializable { /* * Database type of the sync member. */ - @JsonProperty(value = "databaseType") private SyncMemberDbType databaseType; /* * ARM resource id of the sync agent in the sync member. */ - @JsonProperty(value = "syncAgentId") private String syncAgentId; /* * SQL Server database id of the sync member. */ - @JsonProperty(value = "sqlServerDatabaseId") private UUID sqlServerDatabaseId; /* * ARM resource id of the sync member logical database, for sync members in Azure. */ - @JsonProperty(value = "syncMemberAzureDatabaseResourceId") private String syncMemberAzureDatabaseResourceId; /* * Whether to use private link connection. */ - @JsonProperty(value = "usePrivateLinkConnection") private Boolean usePrivateLinkConnection; /* * Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. */ - @JsonProperty(value = "privateEndpointName", access = JsonProperty.Access.WRITE_ONLY) private String privateEndpointName; /* * Server name of the member database in the sync member */ - @JsonProperty(value = "serverName") private String serverName; /* * Database name of the member database in the sync member. */ - @JsonProperty(value = "databaseName") private String databaseName; /* * User name of the member database in the sync member. */ - @JsonProperty(value = "userName") private String username; /* * Password of the member database in the sync member. */ - @JsonProperty(value = "password") private String password; /* * Sync direction of the sync member. */ - @JsonProperty(value = "syncDirection") private SyncDirection syncDirection; /* * Sync state of the sync member. */ - @JsonProperty(value = "syncState", access = JsonProperty.Access.WRITE_ONLY) private SyncMemberState syncState; - /** Creates an instance of SyncMemberProperties class. */ + /** + * Creates an instance of SyncMemberProperties class. + */ public SyncMemberProperties() { } /** * Get the databaseType property: Database type of the sync member. - * + * * @return the databaseType value. */ public SyncMemberDbType databaseType() { @@ -101,7 +98,7 @@ public SyncMemberDbType databaseType() { /** * Set the databaseType property: Database type of the sync member. - * + * * @param databaseType the databaseType value to set. * @return the SyncMemberProperties object itself. */ @@ -112,7 +109,7 @@ public SyncMemberProperties withDatabaseType(SyncMemberDbType databaseType) { /** * Get the syncAgentId property: ARM resource id of the sync agent in the sync member. - * + * * @return the syncAgentId value. */ public String syncAgentId() { @@ -121,7 +118,7 @@ public String syncAgentId() { /** * Set the syncAgentId property: ARM resource id of the sync agent in the sync member. - * + * * @param syncAgentId the syncAgentId value to set. * @return the SyncMemberProperties object itself. */ @@ -132,7 +129,7 @@ public SyncMemberProperties withSyncAgentId(String syncAgentId) { /** * Get the sqlServerDatabaseId property: SQL Server database id of the sync member. - * + * * @return the sqlServerDatabaseId value. */ public UUID sqlServerDatabaseId() { @@ -141,7 +138,7 @@ public UUID sqlServerDatabaseId() { /** * Set the sqlServerDatabaseId property: SQL Server database id of the sync member. - * + * * @param sqlServerDatabaseId the sqlServerDatabaseId value to set. * @return the SyncMemberProperties object itself. */ @@ -153,7 +150,7 @@ public SyncMemberProperties withSqlServerDatabaseId(UUID sqlServerDatabaseId) { /** * Get the syncMemberAzureDatabaseResourceId property: ARM resource id of the sync member logical database, for sync * members in Azure. - * + * * @return the syncMemberAzureDatabaseResourceId value. */ public String syncMemberAzureDatabaseResourceId() { @@ -163,7 +160,7 @@ public String syncMemberAzureDatabaseResourceId() { /** * Set the syncMemberAzureDatabaseResourceId property: ARM resource id of the sync member logical database, for sync * members in Azure. - * + * * @param syncMemberAzureDatabaseResourceId the syncMemberAzureDatabaseResourceId value to set. * @return the SyncMemberProperties object itself. */ @@ -174,7 +171,7 @@ public SyncMemberProperties withSyncMemberAzureDatabaseResourceId(String syncMem /** * Get the usePrivateLinkConnection property: Whether to use private link connection. - * + * * @return the usePrivateLinkConnection value. */ public Boolean usePrivateLinkConnection() { @@ -183,7 +180,7 @@ public Boolean usePrivateLinkConnection() { /** * Set the usePrivateLinkConnection property: Whether to use private link connection. - * + * * @param usePrivateLinkConnection the usePrivateLinkConnection value to set. * @return the SyncMemberProperties object itself. */ @@ -195,7 +192,7 @@ public SyncMemberProperties withUsePrivateLinkConnection(Boolean usePrivateLinkC /** * Get the privateEndpointName property: Private endpoint name of the sync member if use private link connection is * enabled, for sync members in Azure. - * + * * @return the privateEndpointName value. */ public String privateEndpointName() { @@ -204,7 +201,7 @@ public String privateEndpointName() { /** * Get the serverName property: Server name of the member database in the sync member. - * + * * @return the serverName value. */ public String serverName() { @@ -213,7 +210,7 @@ public String serverName() { /** * Set the serverName property: Server name of the member database in the sync member. - * + * * @param serverName the serverName value to set. * @return the SyncMemberProperties object itself. */ @@ -224,7 +221,7 @@ public SyncMemberProperties withServerName(String serverName) { /** * Get the databaseName property: Database name of the member database in the sync member. - * + * * @return the databaseName value. */ public String databaseName() { @@ -233,7 +230,7 @@ public String databaseName() { /** * Set the databaseName property: Database name of the member database in the sync member. - * + * * @param databaseName the databaseName value to set. * @return the SyncMemberProperties object itself. */ @@ -244,7 +241,7 @@ public SyncMemberProperties withDatabaseName(String databaseName) { /** * Get the username property: User name of the member database in the sync member. - * + * * @return the username value. */ public String username() { @@ -253,7 +250,7 @@ public String username() { /** * Set the username property: User name of the member database in the sync member. - * + * * @param username the username value to set. * @return the SyncMemberProperties object itself. */ @@ -264,7 +261,7 @@ public SyncMemberProperties withUsername(String username) { /** * Get the password property: Password of the member database in the sync member. - * + * * @return the password value. */ public String password() { @@ -273,7 +270,7 @@ public String password() { /** * Set the password property: Password of the member database in the sync member. - * + * * @param password the password value to set. * @return the SyncMemberProperties object itself. */ @@ -284,7 +281,7 @@ public SyncMemberProperties withPassword(String password) { /** * Get the syncDirection property: Sync direction of the sync member. - * + * * @return the syncDirection value. */ public SyncDirection syncDirection() { @@ -293,7 +290,7 @@ public SyncDirection syncDirection() { /** * Set the syncDirection property: Sync direction of the sync member. - * + * * @param syncDirection the syncDirection value to set. * @return the SyncMemberProperties object itself. */ @@ -304,7 +301,7 @@ public SyncMemberProperties withSyncDirection(SyncDirection syncDirection) { /** * Get the syncState property: Sync state of the sync member. - * + * * @return the syncState value. */ public SyncMemberState syncState() { @@ -313,9 +310,78 @@ public SyncMemberState syncState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("databaseType", this.databaseType == null ? null : this.databaseType.toString()); + jsonWriter.writeStringField("syncAgentId", this.syncAgentId); + jsonWriter.writeStringField("sqlServerDatabaseId", Objects.toString(this.sqlServerDatabaseId, null)); + jsonWriter.writeStringField("syncMemberAzureDatabaseResourceId", this.syncMemberAzureDatabaseResourceId); + jsonWriter.writeBooleanField("usePrivateLinkConnection", this.usePrivateLinkConnection); + jsonWriter.writeStringField("serverName", this.serverName); + jsonWriter.writeStringField("databaseName", this.databaseName); + jsonWriter.writeStringField("userName", this.username); + jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("syncDirection", this.syncDirection == null ? null : this.syncDirection.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncMemberProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncMemberProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncMemberProperties. + */ + public static SyncMemberProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncMemberProperties deserializedSyncMemberProperties = new SyncMemberProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseType".equals(fieldName)) { + deserializedSyncMemberProperties.databaseType = SyncMemberDbType.fromString(reader.getString()); + } else if ("syncAgentId".equals(fieldName)) { + deserializedSyncMemberProperties.syncAgentId = reader.getString(); + } else if ("sqlServerDatabaseId".equals(fieldName)) { + deserializedSyncMemberProperties.sqlServerDatabaseId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("syncMemberAzureDatabaseResourceId".equals(fieldName)) { + deserializedSyncMemberProperties.syncMemberAzureDatabaseResourceId = reader.getString(); + } else if ("usePrivateLinkConnection".equals(fieldName)) { + deserializedSyncMemberProperties.usePrivateLinkConnection + = reader.getNullable(JsonReader::getBoolean); + } else if ("privateEndpointName".equals(fieldName)) { + deserializedSyncMemberProperties.privateEndpointName = reader.getString(); + } else if ("serverName".equals(fieldName)) { + deserializedSyncMemberProperties.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedSyncMemberProperties.databaseName = reader.getString(); + } else if ("userName".equals(fieldName)) { + deserializedSyncMemberProperties.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedSyncMemberProperties.password = reader.getString(); + } else if ("syncDirection".equals(fieldName)) { + deserializedSyncMemberProperties.syncDirection = SyncDirection.fromString(reader.getString()); + } else if ("syncState".equals(fieldName)) { + deserializedSyncMemberProperties.syncState = SyncMemberState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncMemberProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java index 3a5b77bd43a6e..8f3a98a48976b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java @@ -6,30 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a TDE certificate. */ +/** + * Properties of a TDE certificate. + */ @Fluent -public final class TdeCertificateProperties { +public final class TdeCertificateProperties implements JsonSerializable { /* * The base64 encoded certificate private blob. */ - @JsonProperty(value = "privateBlob", required = true) private String privateBlob; /* * The certificate password. */ - @JsonProperty(value = "certPassword") private String certPassword; - /** Creates an instance of TdeCertificateProperties class. */ + /** + * Creates an instance of TdeCertificateProperties class. + */ public TdeCertificateProperties() { } /** * Get the privateBlob property: The base64 encoded certificate private blob. - * + * * @return the privateBlob value. */ public String privateBlob() { @@ -38,7 +44,7 @@ public String privateBlob() { /** * Set the privateBlob property: The base64 encoded certificate private blob. - * + * * @param privateBlob the privateBlob value to set. * @return the TdeCertificateProperties object itself. */ @@ -49,7 +55,7 @@ public TdeCertificateProperties withPrivateBlob(String privateBlob) { /** * Get the certPassword property: The certificate password. - * + * * @return the certPassword value. */ public String certPassword() { @@ -58,7 +64,7 @@ public String certPassword() { /** * Set the certPassword property: The certificate password. - * + * * @param certPassword the certPassword value to set. * @return the TdeCertificateProperties object itself. */ @@ -69,17 +75,56 @@ public TdeCertificateProperties withCertPassword(String certPassword) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (privateBlob() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateBlob in model TdeCertificateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateBlob in model TdeCertificateProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(TdeCertificateProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("privateBlob", this.privateBlob); + jsonWriter.writeStringField("certPassword", this.certPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TdeCertificateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TdeCertificateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TdeCertificateProperties. + */ + public static TdeCertificateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TdeCertificateProperties deserializedTdeCertificateProperties = new TdeCertificateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateBlob".equals(fieldName)) { + deserializedTdeCertificateProperties.privateBlob = reader.getString(); + } else if ("certPassword".equals(fieldName)) { + deserializedTdeCertificateProperties.certPassword = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTdeCertificateProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java index 9992a2d8c04f5..5709b081fcd71 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Time Zone property. */ +/** + * Time Zone property. + */ @Immutable public final class TimeZoneInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private TimeZoneProperties innerProperties; - /** Creates an instance of TimeZoneInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TimeZoneInner class. + */ public TimeZoneInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private TimeZoneProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the timeZoneId property: The time zone id. - * + * * @return the timeZoneId value. */ public String timeZoneId() { @@ -41,7 +92,7 @@ public String timeZoneId() { /** * Get the displayName property: The time zone display name. - * + * * @return the displayName value. */ public String displayName() { @@ -50,7 +101,7 @@ public String displayName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -58,4 +109,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeZoneInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeZoneInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TimeZoneInner. + */ + public static TimeZoneInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeZoneInner deserializedTimeZoneInner = new TimeZoneInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTimeZoneInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTimeZoneInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTimeZoneInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTimeZoneInner.innerProperties = TimeZoneProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTimeZoneInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java index 08508f8a73c78..f42413a265ba4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The properties of a time zone. */ +/** + * The properties of a time zone. + */ @Immutable -public final class TimeZoneProperties { +public final class TimeZoneProperties implements JsonSerializable { /* * The time zone id */ - @JsonProperty(value = "timeZoneId", access = JsonProperty.Access.WRITE_ONLY) private String timeZoneId; /* * The time zone display name */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; - /** Creates an instance of TimeZoneProperties class. */ + /** + * Creates an instance of TimeZoneProperties class. + */ public TimeZoneProperties() { } /** * Get the timeZoneId property: The time zone id. - * + * * @return the timeZoneId value. */ public String timeZoneId() { @@ -37,7 +43,7 @@ public String timeZoneId() { /** * Get the displayName property: The time zone display name. - * + * * @return the displayName value. */ public String displayName() { @@ -46,9 +52,46 @@ public String displayName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeZoneProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeZoneProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TimeZoneProperties. + */ + public static TimeZoneProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeZoneProperties deserializedTimeZoneProperties = new TimeZoneProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeZoneId".equals(fieldName)) { + deserializedTimeZoneProperties.timeZoneId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedTimeZoneProperties.displayName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTimeZoneProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TopQueriesInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TopQueriesInner.java index d5d1db41f4273..3df795d780aac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TopQueriesInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TopQueriesInner.java @@ -5,62 +5,63 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The TopQueries model. */ +/** + * The TopQueries model. + */ @Fluent -public final class TopQueriesInner { +public final class TopQueriesInner implements JsonSerializable { /* * Requested number of top queries. */ - @JsonProperty(value = "numberOfQueries", access = JsonProperty.Access.WRITE_ONLY) private Integer numberOfQueries; /* * Aggregation function used to calculate query metrics. */ - @JsonProperty(value = "aggregationFunction", access = JsonProperty.Access.WRITE_ONLY) private String aggregationFunction; /* * Metric used to rank queries. */ - @JsonProperty(value = "observationMetric", access = JsonProperty.Access.WRITE_ONLY) private String observationMetric; /* * Interval type (length). */ - @JsonProperty(value = "intervalType", access = JsonProperty.Access.WRITE_ONLY) private QueryTimeGrainType intervalType; /* * The start time for the metric (ISO-8601 format). */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private String startTime; /* * The end time for the metric (ISO-8601 format). */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) private String endTime; /* * List of top resource consuming queries with appropriate metric data */ - @JsonProperty(value = "queries") private List queries; - /** Creates an instance of TopQueriesInner class. */ + /** + * Creates an instance of TopQueriesInner class. + */ public TopQueriesInner() { } /** * Get the numberOfQueries property: Requested number of top queries. - * + * * @return the numberOfQueries value. */ public Integer numberOfQueries() { @@ -69,7 +70,7 @@ public Integer numberOfQueries() { /** * Get the aggregationFunction property: Aggregation function used to calculate query metrics. - * + * * @return the aggregationFunction value. */ public String aggregationFunction() { @@ -78,7 +79,7 @@ public String aggregationFunction() { /** * Get the observationMetric property: Metric used to rank queries. - * + * * @return the observationMetric value. */ public String observationMetric() { @@ -87,7 +88,7 @@ public String observationMetric() { /** * Get the intervalType property: Interval type (length). - * + * * @return the intervalType value. */ public QueryTimeGrainType intervalType() { @@ -96,7 +97,7 @@ public QueryTimeGrainType intervalType() { /** * Get the startTime property: The start time for the metric (ISO-8601 format). - * + * * @return the startTime value. */ public String startTime() { @@ -105,7 +106,7 @@ public String startTime() { /** * Get the endTime property: The end time for the metric (ISO-8601 format). - * + * * @return the endTime value. */ public String endTime() { @@ -114,7 +115,7 @@ public String endTime() { /** * Get the queries property: List of top resource consuming queries with appropriate metric data. - * + * * @return the queries value. */ public List queries() { @@ -123,7 +124,7 @@ public List queries() { /** * Set the queries property: List of top resource consuming queries with appropriate metric data. - * + * * @param queries the queries value to set. * @return the TopQueriesInner object itself. */ @@ -134,7 +135,7 @@ public TopQueriesInner withQueries(List queries) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -142,4 +143,54 @@ public void validate() { queries().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("queries", this.queries, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopQueriesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopQueriesInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TopQueriesInner. + */ + public static TopQueriesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopQueriesInner deserializedTopQueriesInner = new TopQueriesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("numberOfQueries".equals(fieldName)) { + deserializedTopQueriesInner.numberOfQueries = reader.getNullable(JsonReader::getInt); + } else if ("aggregationFunction".equals(fieldName)) { + deserializedTopQueriesInner.aggregationFunction = reader.getString(); + } else if ("observationMetric".equals(fieldName)) { + deserializedTopQueriesInner.observationMetric = reader.getString(); + } else if ("intervalType".equals(fieldName)) { + deserializedTopQueriesInner.intervalType = QueryTimeGrainType.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedTopQueriesInner.startTime = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedTopQueriesInner.endTime = reader.getString(); + } else if ("queries".equals(fieldName)) { + List queries + = reader.readArray(reader1 -> QueryStatisticsProperties.fromJson(reader1)); + deserializedTopQueriesInner.queries = queries; + } else { + reader.skipChildren(); + } + } + + return deserializedTopQueriesInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java index 0047e018a8b9f..55c7dbdf868bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java @@ -6,25 +6,33 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a transparent data encryption. */ +/** + * Properties of a transparent data encryption. + */ @Fluent -public final class TransparentDataEncryptionProperties { +public final class TransparentDataEncryptionProperties + implements JsonSerializable { /* * Specifies the state of the transparent data encryption. */ - @JsonProperty(value = "state", required = true) private TransparentDataEncryptionState state; - /** Creates an instance of TransparentDataEncryptionProperties class. */ + /** + * Creates an instance of TransparentDataEncryptionProperties class. + */ public TransparentDataEncryptionProperties() { } /** * Get the state property: Specifies the state of the transparent data encryption. - * + * * @return the state value. */ public TransparentDataEncryptionState state() { @@ -33,7 +41,7 @@ public TransparentDataEncryptionState state() { /** * Set the state property: Specifies the state of the transparent data encryption. - * + * * @param state the state value to set. * @return the TransparentDataEncryptionProperties object itself. */ @@ -44,17 +52,55 @@ public TransparentDataEncryptionProperties withState(TransparentDataEncryptionSt /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model TransparentDataEncryptionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model TransparentDataEncryptionProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(TransparentDataEncryptionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TransparentDataEncryptionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TransparentDataEncryptionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TransparentDataEncryptionProperties. + */ + public static TransparentDataEncryptionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TransparentDataEncryptionProperties deserializedTransparentDataEncryptionProperties + = new TransparentDataEncryptionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedTransparentDataEncryptionProperties.state + = TransparentDataEncryptionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTransparentDataEncryptionProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java index 41cb546e00f34..af31a8b34d0e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java @@ -5,25 +5,33 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Contains the properties to perform long term retention backup copy operation. */ +/** + * Contains the properties to perform long term retention backup copy operation. + */ @Fluent -public final class UpdateLongTermRetentionBackupParametersProperties { +public final class UpdateLongTermRetentionBackupParametersProperties + implements JsonSerializable { /* * The storage redundancy type of the copied backup */ - @JsonProperty(value = "requestedBackupStorageRedundancy") private BackupStorageRedundancy requestedBackupStorageRedundancy; - /** Creates an instance of UpdateLongTermRetentionBackupParametersProperties class. */ + /** + * Creates an instance of UpdateLongTermRetentionBackupParametersProperties class. + */ public UpdateLongTermRetentionBackupParametersProperties() { } /** * Get the requestedBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -32,21 +40,60 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the UpdateLongTermRetentionBackupParametersProperties object itself. */ - public UpdateLongTermRetentionBackupParametersProperties withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public UpdateLongTermRetentionBackupParametersProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("requestedBackupStorageRedundancy", + this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateLongTermRetentionBackupParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateLongTermRetentionBackupParametersProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UpdateLongTermRetentionBackupParametersProperties. + */ + public static UpdateLongTermRetentionBackupParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateLongTermRetentionBackupParametersProperties deserializedUpdateLongTermRetentionBackupParametersProperties + = new UpdateLongTermRetentionBackupParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requestedBackupStorageRedundancy".equals(fieldName)) { + deserializedUpdateLongTermRetentionBackupParametersProperties.requestedBackupStorageRedundancy + = BackupStorageRedundancy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateLongTermRetentionBackupParametersProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java index 7a4255658c902..5945e2e0fdef9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.DnsRefreshConfigurationPropertiesStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A recoverable managed database resource. */ +/** + * A recoverable managed database resource. + */ @Immutable public final class UpdateManagedInstanceDnsServersOperationInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DnsRefreshConfigurationProperties innerProperties; - /** Creates an instance of UpdateManagedInstanceDnsServersOperationInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of UpdateManagedInstanceDnsServersOperationInner class. + */ public UpdateManagedInstanceDnsServersOperationInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DnsRefreshConfigurationProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the status property: The status of the DNS refresh operation. - * + * * @return the status value. */ public DnsRefreshConfigurationPropertiesStatus status() { @@ -42,7 +93,7 @@ public DnsRefreshConfigurationPropertiesStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -50,4 +101,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateManagedInstanceDnsServersOperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateManagedInstanceDnsServersOperationInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UpdateManagedInstanceDnsServersOperationInner. + */ + public static UpdateManagedInstanceDnsServersOperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateManagedInstanceDnsServersOperationInner deserializedUpdateManagedInstanceDnsServersOperationInner + = new UpdateManagedInstanceDnsServersOperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedUpdateManagedInstanceDnsServersOperationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedUpdateManagedInstanceDnsServersOperationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedUpdateManagedInstanceDnsServersOperationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedUpdateManagedInstanceDnsServersOperationInner.innerProperties + = DnsRefreshConfigurationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateManagedInstanceDnsServersOperationInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java index 096db5b82710e..6043f87665dc6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java @@ -5,61 +5,62 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.Name; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** ARM usage. */ +/** + * ARM usage. + */ @Immutable -public final class UsageInner { +public final class UsageInner implements JsonSerializable { /* * Resource ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Resource name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private Name name; /* * Resource type. */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* * Usage unit. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; /* * Usage current value. */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) private Integer currentValue; /* * Usage limit. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Integer limit; /* * Usage requested limit. */ - @JsonProperty(value = "requestedLimit", access = JsonProperty.Access.WRITE_ONLY) private Integer requestedLimit; - /** Creates an instance of UsageInner class. */ + /** + * Creates an instance of UsageInner class. + */ public UsageInner() { } /** * Get the id property: Resource ID. - * + * * @return the id value. */ public String id() { @@ -68,7 +69,7 @@ public String id() { /** * Get the name property: Resource name. - * + * * @return the name value. */ public Name name() { @@ -77,7 +78,7 @@ public Name name() { /** * Get the type property: Resource type. - * + * * @return the type value. */ public String type() { @@ -86,7 +87,7 @@ public String type() { /** * Get the unit property: Usage unit. - * + * * @return the unit value. */ public String unit() { @@ -95,7 +96,7 @@ public String unit() { /** * Get the currentValue property: Usage current value. - * + * * @return the currentValue value. */ public Integer currentValue() { @@ -104,7 +105,7 @@ public Integer currentValue() { /** * Get the limit property: Usage limit. - * + * * @return the limit value. */ public Integer limit() { @@ -113,7 +114,7 @@ public Integer limit() { /** * Get the requestedLimit property: Usage requested limit. - * + * * @return the requestedLimit value. */ public Integer requestedLimit() { @@ -122,7 +123,7 @@ public Integer requestedLimit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -130,4 +131,51 @@ public void validate() { name().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UsageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the UsageInner. + */ + public static UsageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageInner deserializedUsageInner = new UsageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedUsageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedUsageInner.name = Name.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedUsageInner.type = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedUsageInner.unit = reader.getString(); + } else if ("currentValue".equals(fieldName)) { + deserializedUsageInner.currentValue = reader.getNullable(JsonReader::getInt); + } else if ("limit".equals(fieldName)) { + deserializedUsageInner.limit = reader.getNullable(JsonReader::getInt); + } else if ("requestedLimit".equals(fieldName)) { + deserializedUsageInner.requestedLimit = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedUsageInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java index df0c928966ce1..5a0372d1dce55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java @@ -6,40 +6,95 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; import java.util.Map; -/** An Azure SQL virtual cluster. */ +/** + * An Azure SQL virtual cluster. + */ @Fluent public final class VirtualClusterInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") private VirtualClusterProperties innerProperties; - /** Creates an instance of VirtualClusterInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VirtualClusterInner class. + */ public VirtualClusterInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private VirtualClusterProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public VirtualClusterInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualClusterInner withTags(Map tags) { super.withTags(tags); @@ -48,7 +103,7 @@ public VirtualClusterInner withTags(Map tags) { /** * Get the subnetId property: Subnet resource ID for the virtual cluster. - * + * * @return the subnetId value. */ public String subnetId() { @@ -58,7 +113,7 @@ public String subnetId() { /** * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @return the family value. */ public String family() { @@ -68,7 +123,7 @@ public String family() { /** * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @param family the family value to set. * @return the VirtualClusterInner object itself. */ @@ -82,7 +137,7 @@ public VirtualClusterInner withFamily(String family) { /** * Get the childResources property: List of resources in this virtual cluster. - * + * * @return the childResources value. */ public List childResources() { @@ -92,7 +147,7 @@ public List childResources() { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -102,7 +157,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the VirtualClusterInner object itself. */ @@ -116,7 +171,7 @@ public VirtualClusterInner withMaintenanceConfigurationId(String maintenanceConf /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -124,4 +179,54 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualClusterInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualClusterInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualClusterInner. + */ + public static VirtualClusterInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualClusterInner deserializedVirtualClusterInner = new VirtualClusterInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualClusterInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVirtualClusterInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualClusterInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVirtualClusterInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualClusterInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVirtualClusterInner.innerProperties = VirtualClusterProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualClusterInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java index 37e033503f733..752c1df4e78f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java @@ -5,43 +5,47 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The properties of a virtual cluster. */ +/** + * The properties of a virtual cluster. + */ @Fluent -public final class VirtualClusterProperties { +public final class VirtualClusterProperties implements JsonSerializable { /* * Subnet resource ID for the virtual cluster. */ - @JsonProperty(value = "subnetId", access = JsonProperty.Access.WRITE_ONLY) private String subnetId; /* * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - @JsonProperty(value = "family") private String family; /* * List of resources in this virtual cluster. */ - @JsonProperty(value = "childResources", access = JsonProperty.Access.WRITE_ONLY) private List childResources; /* * Specifies maintenance configuration id to apply to this virtual cluster. */ - @JsonProperty(value = "maintenanceConfigurationId") private String maintenanceConfigurationId; - /** Creates an instance of VirtualClusterProperties class. */ + /** + * Creates an instance of VirtualClusterProperties class. + */ public VirtualClusterProperties() { } /** * Get the subnetId property: Subnet resource ID for the virtual cluster. - * + * * @return the subnetId value. */ public String subnetId() { @@ -51,7 +55,7 @@ public String subnetId() { /** * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @return the family value. */ public String family() { @@ -61,7 +65,7 @@ public String family() { /** * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @param family the family value to set. * @return the VirtualClusterProperties object itself. */ @@ -72,7 +76,7 @@ public VirtualClusterProperties withFamily(String family) { /** * Get the childResources property: List of resources in this virtual cluster. - * + * * @return the childResources value. */ public List childResources() { @@ -82,7 +86,7 @@ public List childResources() { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -92,7 +96,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the VirtualClusterProperties object itself. */ @@ -103,9 +107,53 @@ public VirtualClusterProperties withMaintenanceConfigurationId(String maintenanc /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualClusterProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualClusterProperties. + */ + public static VirtualClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualClusterProperties deserializedVirtualClusterProperties = new VirtualClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subnetId".equals(fieldName)) { + deserializedVirtualClusterProperties.subnetId = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedVirtualClusterProperties.family = reader.getString(); + } else if ("childResources".equals(fieldName)) { + List childResources = reader.readArray(reader1 -> reader1.getString()); + deserializedVirtualClusterProperties.childResources = childResources; + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedVirtualClusterProperties.maintenanceConfigurationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualClusterProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java index 7dc27309b4b42..657835567bb8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VirtualNetworkRuleState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A virtual network rule. */ +/** + * A virtual network rule. + */ @Fluent public final class VirtualNetworkRuleInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private VirtualNetworkRuleProperties innerProperties; - /** Creates an instance of VirtualNetworkRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VirtualNetworkRuleInner class. + */ public VirtualNetworkRuleInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private VirtualNetworkRuleProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. - * + * * @return the virtualNetworkSubnetId value. */ public String virtualNetworkSubnetId() { @@ -42,7 +93,7 @@ public String virtualNetworkSubnetId() { /** * Set the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. - * + * * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. * @return the VirtualNetworkRuleInner object itself. */ @@ -57,7 +108,7 @@ public VirtualNetworkRuleInner withVirtualNetworkSubnetId(String virtualNetworkS /** * Get the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet * service endpoint enabled. - * + * * @return the ignoreMissingVnetServiceEndpoint value. */ public Boolean ignoreMissingVnetServiceEndpoint() { @@ -67,7 +118,7 @@ public Boolean ignoreMissingVnetServiceEndpoint() { /** * Set the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet * service endpoint enabled. - * + * * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set. * @return the VirtualNetworkRuleInner object itself. */ @@ -81,7 +132,7 @@ public VirtualNetworkRuleInner withIgnoreMissingVnetServiceEndpoint(Boolean igno /** * Get the state property: Virtual Network Rule State. - * + * * @return the state value. */ public VirtualNetworkRuleState state() { @@ -90,7 +141,7 @@ public VirtualNetworkRuleState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -98,4 +149,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkRuleInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkRuleInner. + */ + public static VirtualNetworkRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkRuleInner deserializedVirtualNetworkRuleInner = new VirtualNetworkRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualNetworkRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVirtualNetworkRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualNetworkRuleInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualNetworkRuleInner.innerProperties = VirtualNetworkRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkRuleInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java index fe8edde38e0fe..fc36e4ec04069 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java @@ -6,37 +6,42 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VirtualNetworkRuleState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of a virtual network rule. */ +/** + * Properties of a virtual network rule. + */ @Fluent -public final class VirtualNetworkRuleProperties { +public final class VirtualNetworkRuleProperties implements JsonSerializable { /* * The ARM resource id of the virtual network subnet. */ - @JsonProperty(value = "virtualNetworkSubnetId", required = true) private String virtualNetworkSubnetId; /* * Create firewall rule before the virtual network has vnet service endpoint enabled. */ - @JsonProperty(value = "ignoreMissingVnetServiceEndpoint") private Boolean ignoreMissingVnetServiceEndpoint; /* * Virtual Network Rule State */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private VirtualNetworkRuleState state; - /** Creates an instance of VirtualNetworkRuleProperties class. */ + /** + * Creates an instance of VirtualNetworkRuleProperties class. + */ public VirtualNetworkRuleProperties() { } /** * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. - * + * * @return the virtualNetworkSubnetId value. */ public String virtualNetworkSubnetId() { @@ -45,7 +50,7 @@ public String virtualNetworkSubnetId() { /** * Set the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. - * + * * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. * @return the VirtualNetworkRuleProperties object itself. */ @@ -57,7 +62,7 @@ public VirtualNetworkRuleProperties withVirtualNetworkSubnetId(String virtualNet /** * Get the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet * service endpoint enabled. - * + * * @return the ignoreMissingVnetServiceEndpoint value. */ public Boolean ignoreMissingVnetServiceEndpoint() { @@ -67,7 +72,7 @@ public Boolean ignoreMissingVnetServiceEndpoint() { /** * Set the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet * service endpoint enabled. - * + * * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set. * @return the VirtualNetworkRuleProperties object itself. */ @@ -78,7 +83,7 @@ public VirtualNetworkRuleProperties withIgnoreMissingVnetServiceEndpoint(Boolean /** * Get the state property: Virtual Network Rule State. - * + * * @return the state value. */ public VirtualNetworkRuleState state() { @@ -87,17 +92,60 @@ public VirtualNetworkRuleState state() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (virtualNetworkSubnetId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property virtualNetworkSubnetId in model VirtualNetworkRuleProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property virtualNetworkSubnetId in model VirtualNetworkRuleProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRuleProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("virtualNetworkSubnetId", this.virtualNetworkSubnetId); + jsonWriter.writeBooleanField("ignoreMissingVnetServiceEndpoint", this.ignoreMissingVnetServiceEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkRuleProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VirtualNetworkRuleProperties. + */ + public static VirtualNetworkRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkRuleProperties deserializedVirtualNetworkRuleProperties = new VirtualNetworkRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("virtualNetworkSubnetId".equals(fieldName)) { + deserializedVirtualNetworkRuleProperties.virtualNetworkSubnetId = reader.getString(); + } else if ("ignoreMissingVnetServiceEndpoint".equals(fieldName)) { + deserializedVirtualNetworkRuleProperties.ignoreMissingVnetServiceEndpoint + = reader.getNullable(JsonReader::getBoolean); + } else if ("state".equals(fieldName)) { + deserializedVirtualNetworkRuleProperties.state + = VirtualNetworkRuleState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkRuleProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java index e289ce58a59fc..a77e7373df055 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java @@ -6,38 +6,89 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanError; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanState; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanTriggerType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** A vulnerability assessment scan record. */ +/** + * A vulnerability assessment scan record. + */ @Immutable public final class VulnerabilityAssessmentScanRecordInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private VulnerabilityAssessmentScanRecordProperties innerProperties; - /** Creates an instance of VulnerabilityAssessmentScanRecordInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VulnerabilityAssessmentScanRecordInner class. + */ public VulnerabilityAssessmentScanRecordInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private VulnerabilityAssessmentScanRecordProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the scanId property: The scan ID. - * + * * @return the scanId value. */ public String scanId() { @@ -46,7 +97,7 @@ public String scanId() { /** * Get the triggerType property: The scan trigger type. - * + * * @return the triggerType value. */ public VulnerabilityAssessmentScanTriggerType triggerType() { @@ -55,7 +106,7 @@ public VulnerabilityAssessmentScanTriggerType triggerType() { /** * Get the state property: The scan status. - * + * * @return the state value. */ public VulnerabilityAssessmentScanState state() { @@ -64,7 +115,7 @@ public VulnerabilityAssessmentScanState state() { /** * Get the startTime property: The scan start time (UTC). - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -73,7 +124,7 @@ public OffsetDateTime startTime() { /** * Get the endTime property: The scan end time (UTC). - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -82,7 +133,7 @@ public OffsetDateTime endTime() { /** * Get the errors property: The scan errors. - * + * * @return the errors value. */ public List errors() { @@ -91,7 +142,7 @@ public List errors() { /** * Get the storageContainerPath property: The scan results storage container path. - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -100,7 +151,7 @@ public String storageContainerPath() { /** * Get the numberOfFailedSecurityChecks property: The number of failed security checks. - * + * * @return the numberOfFailedSecurityChecks value. */ public Integer numberOfFailedSecurityChecks() { @@ -109,7 +160,7 @@ public Integer numberOfFailedSecurityChecks() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -117,4 +168,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityAssessmentScanRecordInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityAssessmentScanRecordInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VulnerabilityAssessmentScanRecordInner. + */ + public static VulnerabilityAssessmentScanRecordInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityAssessmentScanRecordInner deserializedVulnerabilityAssessmentScanRecordInner + = new VulnerabilityAssessmentScanRecordInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordInner.innerProperties + = VulnerabilityAssessmentScanRecordProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityAssessmentScanRecordInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java index c6d52bcc1bbe8..0e739fbff67fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java @@ -5,71 +5,73 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanError; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanState; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanTriggerType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -/** Properties of a vulnerability assessment scan record. */ +/** + * Properties of a vulnerability assessment scan record. + */ @Immutable -public final class VulnerabilityAssessmentScanRecordProperties { +public final class VulnerabilityAssessmentScanRecordProperties + implements JsonSerializable { /* * The scan ID. */ - @JsonProperty(value = "scanId", access = JsonProperty.Access.WRITE_ONLY) private String scanId; /* * The scan trigger type. */ - @JsonProperty(value = "triggerType", access = JsonProperty.Access.WRITE_ONLY) private VulnerabilityAssessmentScanTriggerType triggerType; /* * The scan status. */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private VulnerabilityAssessmentScanState state; /* * The scan start time (UTC). */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * The scan end time (UTC). */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime endTime; /* * The scan errors. */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; /* * The scan results storage container path. */ - @JsonProperty(value = "storageContainerPath", access = JsonProperty.Access.WRITE_ONLY) private String storageContainerPath; /* * The number of failed security checks. */ - @JsonProperty(value = "numberOfFailedSecurityChecks", access = JsonProperty.Access.WRITE_ONLY) private Integer numberOfFailedSecurityChecks; - /** Creates an instance of VulnerabilityAssessmentScanRecordProperties class. */ + /** + * Creates an instance of VulnerabilityAssessmentScanRecordProperties class. + */ public VulnerabilityAssessmentScanRecordProperties() { } /** * Get the scanId property: The scan ID. - * + * * @return the scanId value. */ public String scanId() { @@ -78,7 +80,7 @@ public String scanId() { /** * Get the triggerType property: The scan trigger type. - * + * * @return the triggerType value. */ public VulnerabilityAssessmentScanTriggerType triggerType() { @@ -87,7 +89,7 @@ public VulnerabilityAssessmentScanTriggerType triggerType() { /** * Get the state property: The scan status. - * + * * @return the state value. */ public VulnerabilityAssessmentScanState state() { @@ -96,7 +98,7 @@ public VulnerabilityAssessmentScanState state() { /** * Get the startTime property: The scan start time (UTC). - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -105,7 +107,7 @@ public OffsetDateTime startTime() { /** * Get the endTime property: The scan end time (UTC). - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -114,7 +116,7 @@ public OffsetDateTime endTime() { /** * Get the errors property: The scan errors. - * + * * @return the errors value. */ public List errors() { @@ -123,7 +125,7 @@ public List errors() { /** * Get the storageContainerPath property: The scan results storage container path. - * + * * @return the storageContainerPath value. */ public String storageContainerPath() { @@ -132,7 +134,7 @@ public String storageContainerPath() { /** * Get the numberOfFailedSecurityChecks property: The number of failed security checks. - * + * * @return the numberOfFailedSecurityChecks value. */ public Integer numberOfFailedSecurityChecks() { @@ -141,7 +143,7 @@ public Integer numberOfFailedSecurityChecks() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -149,4 +151,61 @@ public void validate() { errors().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityAssessmentScanRecordProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityAssessmentScanRecordProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityAssessmentScanRecordProperties. + */ + public static VulnerabilityAssessmentScanRecordProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityAssessmentScanRecordProperties deserializedVulnerabilityAssessmentScanRecordProperties + = new VulnerabilityAssessmentScanRecordProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scanId".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.scanId = reader.getString(); + } else if ("triggerType".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.triggerType + = VulnerabilityAssessmentScanTriggerType.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.state + = VulnerabilityAssessmentScanState.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("errors".equals(fieldName)) { + List errors + = reader.readArray(reader1 -> VulnerabilityAssessmentScanError.fromJson(reader1)); + deserializedVulnerabilityAssessmentScanRecordProperties.errors = errors; + } else if ("storageContainerPath".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.storageContainerPath = reader.getString(); + } else if ("numberOfFailedSecurityChecks".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordProperties.numberOfFailedSecurityChecks + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityAssessmentScanRecordProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java index 99a934fc88e53..00a2b055149ba 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Workload classifier operations for a data warehouse. */ +/** + * Workload classifier operations for a data warehouse. + */ @Fluent public final class WorkloadClassifierInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private WorkloadClassifierProperties innerProperties; - /** Creates an instance of WorkloadClassifierInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WorkloadClassifierInner class. + */ public WorkloadClassifierInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private WorkloadClassifierProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the memberName property: The workload classifier member name. - * + * * @return the memberName value. */ public String memberName() { @@ -41,7 +92,7 @@ public String memberName() { /** * Set the memberName property: The workload classifier member name. - * + * * @param memberName the memberName value to set. * @return the WorkloadClassifierInner object itself. */ @@ -55,7 +106,7 @@ public WorkloadClassifierInner withMemberName(String memberName) { /** * Get the label property: The workload classifier label. - * + * * @return the label value. */ public String label() { @@ -64,7 +115,7 @@ public String label() { /** * Set the label property: The workload classifier label. - * + * * @param label the label value to set. * @return the WorkloadClassifierInner object itself. */ @@ -78,7 +129,7 @@ public WorkloadClassifierInner withLabel(String label) { /** * Get the context property: The workload classifier context. - * + * * @return the context value. */ public String context() { @@ -87,7 +138,7 @@ public String context() { /** * Set the context property: The workload classifier context. - * + * * @param context the context value to set. * @return the WorkloadClassifierInner object itself. */ @@ -101,7 +152,7 @@ public WorkloadClassifierInner withContext(String context) { /** * Get the startTime property: The workload classifier start time for classification. - * + * * @return the startTime value. */ public String startTime() { @@ -110,7 +161,7 @@ public String startTime() { /** * Set the startTime property: The workload classifier start time for classification. - * + * * @param startTime the startTime value to set. * @return the WorkloadClassifierInner object itself. */ @@ -124,7 +175,7 @@ public WorkloadClassifierInner withStartTime(String startTime) { /** * Get the endTime property: The workload classifier end time for classification. - * + * * @return the endTime value. */ public String endTime() { @@ -133,7 +184,7 @@ public String endTime() { /** * Set the endTime property: The workload classifier end time for classification. - * + * * @param endTime the endTime value to set. * @return the WorkloadClassifierInner object itself. */ @@ -147,7 +198,7 @@ public WorkloadClassifierInner withEndTime(String endTime) { /** * Get the importance property: The workload classifier importance. - * + * * @return the importance value. */ public String importance() { @@ -156,7 +207,7 @@ public String importance() { /** * Set the importance property: The workload classifier importance. - * + * * @param importance the importance value to set. * @return the WorkloadClassifierInner object itself. */ @@ -170,7 +221,7 @@ public WorkloadClassifierInner withImportance(String importance) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -178,4 +229,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadClassifierInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadClassifierInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkloadClassifierInner. + */ + public static WorkloadClassifierInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadClassifierInner deserializedWorkloadClassifierInner = new WorkloadClassifierInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadClassifierInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadClassifierInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadClassifierInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadClassifierInner.innerProperties = WorkloadClassifierProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadClassifierInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java index 68df042f38b00..998ef763d15ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java @@ -6,54 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV). */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV). + */ @Fluent -public final class WorkloadClassifierProperties { +public final class WorkloadClassifierProperties implements JsonSerializable { /* * The workload classifier member name. */ - @JsonProperty(value = "memberName", required = true) private String memberName; /* * The workload classifier label. */ - @JsonProperty(value = "label") private String label; /* * The workload classifier context. */ - @JsonProperty(value = "context") private String context; /* * The workload classifier start time for classification. */ - @JsonProperty(value = "startTime") private String startTime; /* * The workload classifier end time for classification. */ - @JsonProperty(value = "endTime") private String endTime; /* * The workload classifier importance. */ - @JsonProperty(value = "importance") private String importance; - /** Creates an instance of WorkloadClassifierProperties class. */ + /** + * Creates an instance of WorkloadClassifierProperties class. + */ public WorkloadClassifierProperties() { } /** * Get the memberName property: The workload classifier member name. - * + * * @return the memberName value. */ public String memberName() { @@ -62,7 +64,7 @@ public String memberName() { /** * Set the memberName property: The workload classifier member name. - * + * * @param memberName the memberName value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -73,7 +75,7 @@ public WorkloadClassifierProperties withMemberName(String memberName) { /** * Get the label property: The workload classifier label. - * + * * @return the label value. */ public String label() { @@ -82,7 +84,7 @@ public String label() { /** * Set the label property: The workload classifier label. - * + * * @param label the label value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -93,7 +95,7 @@ public WorkloadClassifierProperties withLabel(String label) { /** * Get the context property: The workload classifier context. - * + * * @return the context value. */ public String context() { @@ -102,7 +104,7 @@ public String context() { /** * Set the context property: The workload classifier context. - * + * * @param context the context value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -113,7 +115,7 @@ public WorkloadClassifierProperties withContext(String context) { /** * Get the startTime property: The workload classifier start time for classification. - * + * * @return the startTime value. */ public String startTime() { @@ -122,7 +124,7 @@ public String startTime() { /** * Set the startTime property: The workload classifier start time for classification. - * + * * @param startTime the startTime value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -133,7 +135,7 @@ public WorkloadClassifierProperties withStartTime(String startTime) { /** * Get the endTime property: The workload classifier end time for classification. - * + * * @return the endTime value. */ public String endTime() { @@ -142,7 +144,7 @@ public String endTime() { /** * Set the endTime property: The workload classifier end time for classification. - * + * * @param endTime the endTime value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -153,7 +155,7 @@ public WorkloadClassifierProperties withEndTime(String endTime) { /** * Get the importance property: The workload classifier importance. - * + * * @return the importance value. */ public String importance() { @@ -162,7 +164,7 @@ public String importance() { /** * Set the importance property: The workload classifier importance. - * + * * @param importance the importance value to set. * @return the WorkloadClassifierProperties object itself. */ @@ -173,17 +175,68 @@ public WorkloadClassifierProperties withImportance(String importance) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (memberName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property memberName in model WorkloadClassifierProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property memberName in model WorkloadClassifierProperties")); } } private static final ClientLogger LOGGER = new ClientLogger(WorkloadClassifierProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("memberName", this.memberName); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeStringField("context", this.context); + jsonWriter.writeStringField("startTime", this.startTime); + jsonWriter.writeStringField("endTime", this.endTime); + jsonWriter.writeStringField("importance", this.importance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadClassifierProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadClassifierProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkloadClassifierProperties. + */ + public static WorkloadClassifierProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadClassifierProperties deserializedWorkloadClassifierProperties = new WorkloadClassifierProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("memberName".equals(fieldName)) { + deserializedWorkloadClassifierProperties.memberName = reader.getString(); + } else if ("label".equals(fieldName)) { + deserializedWorkloadClassifierProperties.label = reader.getString(); + } else if ("context".equals(fieldName)) { + deserializedWorkloadClassifierProperties.context = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedWorkloadClassifierProperties.startTime = reader.getString(); + } else if ("endTime".equals(fieldName)) { + deserializedWorkloadClassifierProperties.endTime = reader.getString(); + } else if ("importance".equals(fieldName)) { + deserializedWorkloadClassifierProperties.importance = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadClassifierProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java index 6a6e81df3d3ab..9126caae3bd4a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java @@ -6,33 +6,84 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Workload group operations for a data warehouse. */ +/** + * Workload group operations for a data warehouse. + */ @Fluent public final class WorkloadGroupInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private WorkloadGroupProperties innerProperties; - /** Creates an instance of WorkloadGroupInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of WorkloadGroupInner class. + */ public WorkloadGroupInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private WorkloadGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the minResourcePercent property: The workload group minimum percentage resource. - * + * * @return the minResourcePercent value. */ public Integer minResourcePercent() { @@ -41,7 +92,7 @@ public Integer minResourcePercent() { /** * Set the minResourcePercent property: The workload group minimum percentage resource. - * + * * @param minResourcePercent the minResourcePercent value to set. * @return the WorkloadGroupInner object itself. */ @@ -55,7 +106,7 @@ public WorkloadGroupInner withMinResourcePercent(Integer minResourcePercent) { /** * Get the maxResourcePercent property: The workload group cap percentage resource. - * + * * @return the maxResourcePercent value. */ public Integer maxResourcePercent() { @@ -64,7 +115,7 @@ public Integer maxResourcePercent() { /** * Set the maxResourcePercent property: The workload group cap percentage resource. - * + * * @param maxResourcePercent the maxResourcePercent value to set. * @return the WorkloadGroupInner object itself. */ @@ -78,7 +129,7 @@ public WorkloadGroupInner withMaxResourcePercent(Integer maxResourcePercent) { /** * Get the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * + * * @return the minResourcePercentPerRequest value. */ public Double minResourcePercentPerRequest() { @@ -87,7 +138,7 @@ public Double minResourcePercentPerRequest() { /** * Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * + * * @param minResourcePercentPerRequest the minResourcePercentPerRequest value to set. * @return the WorkloadGroupInner object itself. */ @@ -101,7 +152,7 @@ public WorkloadGroupInner withMinResourcePercentPerRequest(Double minResourcePer /** * Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * + * * @return the maxResourcePercentPerRequest value. */ public Double maxResourcePercentPerRequest() { @@ -110,7 +161,7 @@ public Double maxResourcePercentPerRequest() { /** * Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * + * * @param maxResourcePercentPerRequest the maxResourcePercentPerRequest value to set. * @return the WorkloadGroupInner object itself. */ @@ -124,7 +175,7 @@ public WorkloadGroupInner withMaxResourcePercentPerRequest(Double maxResourcePer /** * Get the importance property: The workload group importance level. - * + * * @return the importance value. */ public String importance() { @@ -133,7 +184,7 @@ public String importance() { /** * Set the importance property: The workload group importance level. - * + * * @param importance the importance value to set. * @return the WorkloadGroupInner object itself. */ @@ -147,7 +198,7 @@ public WorkloadGroupInner withImportance(String importance) { /** * Get the queryExecutionTimeout property: The workload group query execution timeout. - * + * * @return the queryExecutionTimeout value. */ public Integer queryExecutionTimeout() { @@ -156,7 +207,7 @@ public Integer queryExecutionTimeout() { /** * Set the queryExecutionTimeout property: The workload group query execution timeout. - * + * * @param queryExecutionTimeout the queryExecutionTimeout value to set. * @return the WorkloadGroupInner object itself. */ @@ -170,7 +221,7 @@ public WorkloadGroupInner withQueryExecutionTimeout(Integer queryExecutionTimeou /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -178,4 +229,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkloadGroupInner. + */ + public static WorkloadGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadGroupInner deserializedWorkloadGroupInner = new WorkloadGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadGroupInner.innerProperties = WorkloadGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadGroupInner; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java index 4afd95886d609..72c6c91b62e7c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java @@ -5,54 +5,56 @@ package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload group definition. For more information look at sys.workload_management_workload_groups (DMV). */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Workload group definition. For more information look at sys.workload_management_workload_groups (DMV). + */ @Fluent -public final class WorkloadGroupProperties { +public final class WorkloadGroupProperties implements JsonSerializable { /* * The workload group minimum percentage resource. */ - @JsonProperty(value = "minResourcePercent", required = true) private int minResourcePercent; /* * The workload group cap percentage resource. */ - @JsonProperty(value = "maxResourcePercent", required = true) private int maxResourcePercent; /* * The workload group request minimum grant percentage. */ - @JsonProperty(value = "minResourcePercentPerRequest", required = true) private double minResourcePercentPerRequest; /* * The workload group request maximum grant percentage. */ - @JsonProperty(value = "maxResourcePercentPerRequest") private Double maxResourcePercentPerRequest; /* * The workload group importance level. */ - @JsonProperty(value = "importance") private String importance; /* * The workload group query execution timeout. */ - @JsonProperty(value = "queryExecutionTimeout") private Integer queryExecutionTimeout; - /** Creates an instance of WorkloadGroupProperties class. */ + /** + * Creates an instance of WorkloadGroupProperties class. + */ public WorkloadGroupProperties() { } /** * Get the minResourcePercent property: The workload group minimum percentage resource. - * + * * @return the minResourcePercent value. */ public int minResourcePercent() { @@ -61,7 +63,7 @@ public int minResourcePercent() { /** * Set the minResourcePercent property: The workload group minimum percentage resource. - * + * * @param minResourcePercent the minResourcePercent value to set. * @return the WorkloadGroupProperties object itself. */ @@ -72,7 +74,7 @@ public WorkloadGroupProperties withMinResourcePercent(int minResourcePercent) { /** * Get the maxResourcePercent property: The workload group cap percentage resource. - * + * * @return the maxResourcePercent value. */ public int maxResourcePercent() { @@ -81,7 +83,7 @@ public int maxResourcePercent() { /** * Set the maxResourcePercent property: The workload group cap percentage resource. - * + * * @param maxResourcePercent the maxResourcePercent value to set. * @return the WorkloadGroupProperties object itself. */ @@ -92,7 +94,7 @@ public WorkloadGroupProperties withMaxResourcePercent(int maxResourcePercent) { /** * Get the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * + * * @return the minResourcePercentPerRequest value. */ public double minResourcePercentPerRequest() { @@ -101,7 +103,7 @@ public double minResourcePercentPerRequest() { /** * Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * + * * @param minResourcePercentPerRequest the minResourcePercentPerRequest value to set. * @return the WorkloadGroupProperties object itself. */ @@ -112,7 +114,7 @@ public WorkloadGroupProperties withMinResourcePercentPerRequest(double minResour /** * Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * + * * @return the maxResourcePercentPerRequest value. */ public Double maxResourcePercentPerRequest() { @@ -121,7 +123,7 @@ public Double maxResourcePercentPerRequest() { /** * Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * + * * @param maxResourcePercentPerRequest the maxResourcePercentPerRequest value to set. * @return the WorkloadGroupProperties object itself. */ @@ -132,7 +134,7 @@ public WorkloadGroupProperties withMaxResourcePercentPerRequest(Double maxResour /** * Get the importance property: The workload group importance level. - * + * * @return the importance value. */ public String importance() { @@ -141,7 +143,7 @@ public String importance() { /** * Set the importance property: The workload group importance level. - * + * * @param importance the importance value to set. * @return the WorkloadGroupProperties object itself. */ @@ -152,7 +154,7 @@ public WorkloadGroupProperties withImportance(String importance) { /** * Get the queryExecutionTimeout property: The workload group query execution timeout. - * + * * @return the queryExecutionTimeout value. */ public Integer queryExecutionTimeout() { @@ -161,7 +163,7 @@ public Integer queryExecutionTimeout() { /** * Set the queryExecutionTimeout property: The workload group query execution timeout. - * + * * @param queryExecutionTimeout the queryExecutionTimeout value to set. * @return the WorkloadGroupProperties object itself. */ @@ -172,9 +174,62 @@ public WorkloadGroupProperties withQueryExecutionTimeout(Integer queryExecutionT /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("minResourcePercent", this.minResourcePercent); + jsonWriter.writeIntField("maxResourcePercent", this.maxResourcePercent); + jsonWriter.writeDoubleField("minResourcePercentPerRequest", this.minResourcePercentPerRequest); + jsonWriter.writeNumberField("maxResourcePercentPerRequest", this.maxResourcePercentPerRequest); + jsonWriter.writeStringField("importance", this.importance); + jsonWriter.writeNumberField("queryExecutionTimeout", this.queryExecutionTimeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadGroupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WorkloadGroupProperties. + */ + public static WorkloadGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadGroupProperties deserializedWorkloadGroupProperties = new WorkloadGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minResourcePercent".equals(fieldName)) { + deserializedWorkloadGroupProperties.minResourcePercent = reader.getInt(); + } else if ("maxResourcePercent".equals(fieldName)) { + deserializedWorkloadGroupProperties.maxResourcePercent = reader.getInt(); + } else if ("minResourcePercentPerRequest".equals(fieldName)) { + deserializedWorkloadGroupProperties.minResourcePercentPerRequest = reader.getDouble(); + } else if ("maxResourcePercentPerRequest".equals(fieldName)) { + deserializedWorkloadGroupProperties.maxResourcePercentPerRequest + = reader.getNullable(JsonReader::getDouble); + } else if ("importance".equals(fieldName)) { + deserializedWorkloadGroupProperties.importance = reader.getString(); + } else if ("queryExecutionTimeout".equals(fieldName)) { + deserializedWorkloadGroupProperties.queryExecutionTimeout = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadGroupProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java index 11815f51cc3d9..33b76c89c6c45 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java @@ -3,8 +3,8 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for SqlManagementClient. The Azure SQL Database management API provides a - * RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables - * you to create, retrieve, update, and delete databases. + * Package containing the inner data models for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java index 36b53689ddb05..8ade8e445304a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java @@ -3,8 +3,8 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for SqlManagementClient. The Azure SQL Database management API provides a - * RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables - * you to create, retrieve, update, and delete databases. + * Package containing the service clients for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.fluent; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java index 737a6d0ace6ad..16668c0dde5bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java @@ -43,24 +43,24 @@ * An instance of this class provides access to all the operations defined in BackupShortTermRetentionPoliciesClient. */ public final class BackupShortTermRetentionPoliciesClientImpl implements BackupShortTermRetentionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BackupShortTermRetentionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of BackupShortTermRetentionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BackupShortTermRetentionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - BackupShortTermRetentionPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(BackupShortTermRetentionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -71,107 +71,78 @@ public final class BackupShortTermRetentionPoliciesClientImpl implements BackupS @Host("{$host}") @ServiceInterface(name = "SqlManagementClientB") public interface BackupShortTermRetentionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's short term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -184,42 +155,23 @@ private Mono> listByDatabaseS return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -227,16 +179,14 @@ private Mono> listByDatabaseS * @throws 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 database's short term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -249,39 +199,23 @@ private Mono> listByDatabaseS return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -290,18 +224,17 @@ private Mono> listByDatabaseS * @return a database's short term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -311,8 +244,8 @@ public PagedFlux listByDatabaseAsync( * @return a database's short term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -320,9 +253,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,16 +264,16 @@ private PagedFlux listByDatabaseAsync( * @return a database's short term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -350,33 +283,31 @@ public PagedIterable listByDatabase( * @return a database's short term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's short term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's short term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,34 +323,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -427,21 +345,15 @@ public 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 a database's short term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's short term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ShortTermRetentionPolicyName policyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -457,31 +369,20 @@ private Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -491,17 +392,17 @@ private Mono> getWithResponseAsync * @return a database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, policyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -512,20 +413,16 @@ public Mono getAsync( * @return a database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, context).block(); } /** * Gets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -535,16 +432,16 @@ public Response getWithResponse( * @return a database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupShortTermRetentionPolicyInner get( - String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { + public BackupShortTermRetentionPolicyInner get(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName) { return getWithResponse(resourceGroupName, serverName, databaseName, policyName, Context.NONE).getValue(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -555,17 +452,11 @@ public BackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -581,10 +472,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -593,28 +482,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -626,18 +504,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ShortTermRetentionPolicyName policyName, + BackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -653,10 +525,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -665,25 +535,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -695,29 +555,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupShortTermRetentionPolicyInner.class, - BackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupShortTermRetentionPolicyInner.class, + BackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -730,32 +581,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupShortTermRetentionPolicyInner.class, - BackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, policyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupShortTermRetentionPolicyInner.class, + BackupShortTermRetentionPolicyInner.class, context); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -767,21 +607,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) .getSyncPoller(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -794,22 +630,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .getSyncPoller(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -820,22 +652,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -847,12 +674,8 @@ public Mono createOrUpdateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .last() @@ -861,9 +684,9 @@ private Mono createOrUpdateAsync( /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -874,20 +697,16 @@ private Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { + public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).block(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -899,12 +718,8 @@ public BackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, + public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .block(); @@ -912,9 +727,9 @@ public BackupShortTermRetentionPolicyInner createOrUpdate( /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -925,17 +740,11 @@ public BackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -951,10 +760,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -963,28 +770,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -996,18 +792,12 @@ public Mono>> updateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1023,10 +813,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1035,25 +823,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1065,29 +843,20 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, BackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupShortTermRetentionPolicyInner.class, - BackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + beginUpdateAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupShortTermRetentionPolicyInner.class, + BackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1100,31 +869,21 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { + beginUpdateAsync(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupShortTermRetentionPolicyInner.class, - BackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupShortTermRetentionPolicyInner.class, + BackupShortTermRetentionPolicyInner.class, context); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1136,19 +895,17 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) + .getSyncPoller(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1161,21 +918,17 @@ public SyncPoller, BackupShortTe */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupShortTermRetentionPolicyInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) + String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, + BackupShortTermRetentionPolicyInner parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .getSyncPoller(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1186,22 +939,17 @@ public SyncPoller, BackupShortTe * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1213,23 +961,18 @@ public Mono updateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, + private Mono updateAsync(String resourceGroupName, String serverName, + String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) - .last() + return beginUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1240,20 +983,16 @@ private Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters) { + public BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters) { return updateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).block(); } /** * Updates a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1265,90 +1004,64 @@ public BackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String serverName, - String databaseName, - ShortTermRetentionPolicyName policyName, - BackupShortTermRetentionPolicyInner parameters, - Context context) { + public BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serverName, String databaseName, + ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context) { return updateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java index 6419ffc613101..67024c4cb97d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java @@ -26,22 +26,28 @@ import com.azure.resourcemanager.sql.models.CapabilityGroup; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CapabilitiesClient. */ +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ public final class CapabilitiesClientImpl implements CapabilitiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CapabilitiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of CapabilitiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CapabilitiesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -52,68 +58,51 @@ public final class CapabilitiesClientImpl implements CapabilitiesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientC") public interface CapabilitiesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @QueryParam("include") CapabilityGroup include, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @QueryParam("include") CapabilityGroup include, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @param include If specified, restricts the response to only include the selected item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the subscription capabilities available for the specified location along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByLocationWithResponseAsync( - String locationName, CapabilityGroup include) { + public Mono> listByLocationWithResponseAsync(String locationName, + CapabilityGroup include) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - include, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, include, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @param include If specified, restricts the response to only include the selected item. * @param context The context to associate with this operation. @@ -121,48 +110,37 @@ public Mono> listByLocationWithResponseAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the subscription capabilities available for the specified location along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationWithResponseAsync( - String locationName, CapabilityGroup include, Context context) { + private Mono> listByLocationWithResponseAsync(String locationName, + CapabilityGroup include, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocation( - this.client.getEndpoint(), - locationName, - include, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.listByLocation(this.client.getEndpoint(), locationName, include, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the subscription capabilities available for the specified location on successful completion of {@link - * Mono}. + * @return the subscription capabilities available for the specified location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listByLocationAsync(String locationName) { @@ -172,7 +150,7 @@ public Mono listByLocationAsync(String locationName) /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @param include If specified, restricts the response to only include the selected item. * @param context The context to associate with this operation. @@ -182,14 +160,14 @@ public Mono listByLocationAsync(String locationName) * @return the subscription capabilities available for the specified location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByLocationWithResponse( - String locationName, CapabilityGroup include, Context context) { + public Response listByLocationWithResponse(String locationName, CapabilityGroup include, + Context context) { return listByLocationWithResponseAsync(locationName, include, context).block(); } /** * Gets the subscription capabilities available for the specified location. - * + * * @param locationName The location name whose capabilities are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java index 343392823d06f..4648b6892ea24 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java @@ -28,22 +28,28 @@ import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataMaskingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DataMaskingPoliciesClient. + */ public final class DataMaskingPoliciesClientImpl implements DataMaskingPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataMaskingPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DataMaskingPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DataMaskingPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DataMaskingPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DataMaskingPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -54,47 +60,35 @@ public final class DataMaskingPoliciesClientImpl implements DataMaskingPoliciesC @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DataMaskingPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataMaskingPolicyInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataMaskingPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); } /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -104,13 +98,11 @@ Mono> createOrUpdate( * @return the database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -127,34 +119,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -165,17 +144,11 @@ public Mono> getWithResponseAsync( * @return the database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -192,31 +165,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -226,17 +188,17 @@ private Mono> getWithResponseAsync( * @return the database data masking policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -247,21 +209,17 @@ public Mono getAsync( * @return the database data masking policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, context) .block(); } /** * Gets the database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -271,17 +229,17 @@ public Response getWithResponse( * @return the database data masking policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataMaskingPolicyInner get( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + public DataMaskingPolicyInner get(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName) { return getWithResponse(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, Context.NONE) .getValue(); } /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -292,17 +250,12 @@ public DataMaskingPolicyInner get( * @return a database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -319,10 +272,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -331,28 +282,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -364,18 +304,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a database data masking policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, + DataMaskingPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,10 +326,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -404,25 +336,16 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -433,22 +356,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a database data masking policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -460,23 +378,18 @@ public Mono createOrUpdateAsync( * @return a database data masking policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters, + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, parameters, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + parameters, context).block(); } /** * Creates or updates a database data masking policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -487,14 +400,9 @@ public Response createOrUpdateWithResponse( * @return a database data masking policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataMaskingPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - DataMaskingPolicyInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, parameters, Context.NONE) - .getValue(); + public DataMaskingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, DataMaskingPolicyInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java index 29c4dc4164e96..bcdbecab21cf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.sql.models.DataMaskingRuleListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataMaskingRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in DataMaskingRulesClient. + */ public final class DataMaskingRulesClientImpl implements DataMaskingRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataMaskingRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DataMaskingRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DataMaskingRulesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DataMaskingRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DataMaskingRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,76 +65,59 @@ public final class DataMaskingRulesClientImpl implements DataMaskingRulesClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DataMaskingRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules" - + "/{dataMaskingRuleName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, @PathParam("dataMaskingRuleName") String dataMaskingRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataMaskingRuleInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataMaskingRuleInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database data masking rules along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database data masking rules along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -145,43 +134,24 @@ private Mono> listByDatabaseSinglePageAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -189,21 +159,15 @@ private Mono> listByDatabaseSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database data masking rules along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database data masking rules along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,40 +184,23 @@ private Mono> listByDatabaseSinglePageAsync( .error(new IllegalArgumentException("Parameter dataMaskingPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -263,8 +210,8 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database data masking rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -272,9 +219,9 @@ public PagedFlux listByDatabaseAsync( /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -285,24 +232,17 @@ public PagedFlux listByDatabaseAsync( * @return a list of database data masking rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -312,17 +252,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of database data masking rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName)); } /** * Gets a list of database data masking rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. @@ -333,21 +273,17 @@ public PagedIterable listByDatabase( * @return a list of database data masking rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, context)); } /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -359,18 +295,12 @@ public PagedIterable listByDatabase( * @return a database data masking rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -391,10 +321,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -403,29 +331,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - dataMaskingRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, dataMaskingRuleName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -438,19 +354,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a database data masking rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, + DataMaskingRuleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -471,10 +380,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter dataMaskingRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -483,26 +390,16 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - dataMaskingRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, dataMaskingRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -514,23 +411,18 @@ private Mono> createOrUpdateWithResponseAsync( * @return a database data masking rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, dataMaskingRuleName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + dataMaskingRuleName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -543,30 +435,18 @@ public Mono createOrUpdateAsync( * @return a database data masking rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - dataMaskingRuleName, - parameters, - context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, + DataMaskingRuleInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + dataMaskingRuleName, parameters, context).block(); } /** * Creates or updates a database data masking rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -578,34 +458,21 @@ public Response createOrUpdateWithResponse( * @return a database data masking rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataMaskingRuleInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, - String dataMaskingRuleName, - DataMaskingRuleInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - serverName, - databaseName, - dataMaskingPolicyName, - dataMaskingRuleName, - parameters, - Context.NONE) - .getValue(); + public DataMaskingRuleInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DataMaskingPolicyName dataMaskingPolicyName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, + dataMaskingRuleName, parameters, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database data masking rules along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -613,62 +480,42 @@ private Mono> listByDatabaseNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 database data masking rules along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java index 651d5fc19af64..5983fbfb13faa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java @@ -37,24 +37,24 @@ */ public final class DataWarehouseUserActivitiesOperationsClientImpl implements DataWarehouseUserActivitiesOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataWarehouseUserActivitiesOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DataWarehouseUserActivitiesOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DataWarehouseUserActivitiesOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DataWarehouseUserActivitiesOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DataWarehouseUserActivitiesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,71 +65,54 @@ public final class DataWarehouseUserActivitiesOperationsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DataWarehouseUserActivitiesOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataWarehouseUserActivities") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataWarehouseUserActivityName") DataWarehouseUserActivityName dataWarehouseUserActivityName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -142,59 +125,38 @@ private Mono> listByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @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 user activities of a data warehouse along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -207,39 +169,23 @@ private Mono> listByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,18 +194,17 @@ private Mono> listByDatabaseSing * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -269,8 +214,8 @@ public PagedFlux listByDatabaseAsync( * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -278,9 +223,9 @@ private PagedFlux listByDatabaseAsync( /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,16 +234,16 @@ private PagedFlux listByDatabaseAsync( * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * List the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -308,36 +253,31 @@ public PagedIterable listByDatabase( * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with {@link - * Response} on successful completion of {@link Mono}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -350,40 +290,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (dataWarehouseUserActivityName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataWarehouseUserActivityName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter dataWarehouseUserActivityName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataWarehouseUserActivityName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataWarehouseUserActivityName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -391,21 +317,16 @@ public Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with {@link - * Response} on successful completion of {@link Mono}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName, + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -418,37 +339,25 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (dataWarehouseUserActivityName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataWarehouseUserActivityName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter dataWarehouseUserActivityName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - dataWarehouseUserActivityName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataWarehouseUserActivityName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -456,23 +365,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 the user activities of a data warehouse which includes running and suspended queries on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -480,25 +386,21 @@ public Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with {@link - * Response}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, context) .block(); } /** * Gets the user activities of a data warehouse which includes running and suspended queries. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. @@ -508,10 +410,7 @@ public Response getWithResponse( * @return the user activities of a data warehouse which includes running and suspended queries. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataWarehouseUserActivitiesInner get( - String resourceGroupName, - String serverName, - String databaseName, + public DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { return getWithResponse(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, Context.NONE) .getValue(); @@ -519,14 +418,13 @@ public DataWarehouseUserActivitiesInner get( /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -534,62 +432,42 @@ private Mono> listByDatabaseNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 user activities of a data warehouse along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java index f7885f1862e74..b1f724fe39bac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java @@ -39,24 +39,24 @@ */ public final class DatabaseAdvancedThreatProtectionSettingsClientImpl implements DatabaseAdvancedThreatProtectionSettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseAdvancedThreatProtectionSettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseAdvancedThreatProtectionSettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseAdvancedThreatProtectionSettingsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseAdvancedThreatProtectionSettingsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseAdvancedThreatProtectionSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,91 +67,66 @@ public final class DatabaseAdvancedThreatProtectionSettingsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAdvancedThreatProtectionSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings" - + "/{advancedThreatProtectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings" - + "/{advancedThreatProtectionName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseAdvancedThreatProtectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -164,42 +139,23 @@ private Mono> listByDatabas return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -207,16 +163,14 @@ private Mono> listByDatabas * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -229,39 +183,23 @@ private Mono> listByDatabas return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -270,18 +208,17 @@ private Mono> listByDatabas * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -291,8 +228,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -300,9 +237,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,16 +248,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of database's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -330,16 +267,16 @@ public PagedIterable listByDatabase( * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -347,19 +284,14 @@ public PagedIterable listByDatabase( * @throws 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 database's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -372,40 +304,26 @@ public Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -414,20 +332,15 @@ public Mono> getWithResponseAsyn * @throws 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 database's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -440,37 +353,25 @@ private Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -480,20 +381,17 @@ private Mono> getWithResponseAsy * @return a database's Advanced Threat Protection state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -504,21 +402,17 @@ public Mono getAsync( * @return a database's Advanced Threat Protection state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, context) .block(); } /** * Gets a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -528,10 +422,7 @@ public Response getWithResponse( * @return a database's Advanced Threat Protection state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseAdvancedThreatProtectionInner get( - String resourceGroupName, - String serverName, - String databaseName, + public DatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { return getWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, Context.NONE) .getValue(); @@ -539,9 +430,9 @@ public DatabaseAdvancedThreatProtectionInner get( /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -549,21 +440,16 @@ public DatabaseAdvancedThreatProtectionInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database Advanced Threat Protection along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database Advanced Threat Protection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters) { + String resourceGroupName, String serverName, String databaseName, + AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -576,16 +462,12 @@ public Mono> createOrUpdateWithR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -594,28 +476,17 @@ public Mono> createOrUpdateWithR } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advancedThreatProtectionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -624,22 +495,17 @@ public Mono> createOrUpdateWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database Advanced Threat Protection along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database Advanced Threat Protection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters, + String resourceGroupName, String serverName, String databaseName, + AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -652,16 +518,12 @@ private Mono> createOrUpdateWith return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -670,25 +532,16 @@ private Mono> createOrUpdateWith } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -699,22 +552,18 @@ private Mono> createOrUpdateWith * @return a database Advanced Threat Protection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, advancedThreatProtectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -726,23 +575,18 @@ public Mono createOrUpdateAsync( * @return a database Advanced Threat Protection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, advancedThreatProtectionName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, parameters, context).block(); } /** * Creates or updates a database's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -753,91 +597,66 @@ public Response createOrUpdateWithRespons * @return a database Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, + public DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, advancedThreatProtectionName, parameters, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, + parameters, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's Advanced Threat Protection configurations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's Advanced Threat Protection configurations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java index 6041473c2af5d..cbc97010bb3e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java @@ -28,22 +28,28 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseAdvisorsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseAdvisorsClient. + */ public final class DatabaseAdvisorsClientImpl implements DatabaseAdvisorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseAdvisorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseAdvisorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseAdvisorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseAdvisorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabaseAdvisorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -54,64 +60,43 @@ public final class DatabaseAdvisorsClientImpl implements DatabaseAdvisorsClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAdvisorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors/{advisorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("advisorName") String advisorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors/{advisorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("advisorName") String advisorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AdvisorInner parameters, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AdvisorInner parameters, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param expand The child resources to include in the response. @@ -121,13 +106,11 @@ Mono> update( * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByDatabaseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String expand) { + public Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -140,34 +123,21 @@ public Mono>> listByDatabaseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param expand The child resources to include in the response. @@ -178,13 +148,11 @@ public Mono>> listByDatabaseWithResponseAsync( * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listByDatabaseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String expand, Context context) { + private Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -197,31 +165,20 @@ private Mono>> listByDatabaseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,8 +187,8 @@ private Mono>> listByDatabaseWithResponseAsync( * @return a list of database advisors on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final String expand = null; return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -239,9 +196,9 @@ public Mono> listByDatabaseAsync( /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param expand The child resources to include in the response. @@ -252,16 +209,16 @@ public Mono> listByDatabaseAsync( * @return a list of database advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByDatabaseWithResponse( - String resourceGroupName, String serverName, String databaseName, String expand, Context context) { + public Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, + String databaseName, String expand, Context context) { return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand, context).block(); } /** * Gets a list of database advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,9 +234,9 @@ public List listByDatabase(String resourceGroupName, String server /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -289,13 +246,11 @@ public List listByDatabase(String resourceGroupName, String server * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -311,34 +266,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -349,13 +291,11 @@ public Mono> getWithResponseAsync( * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -371,31 +311,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -405,17 +334,17 @@ private Mono> getWithResponseAsync( * @return a database advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -426,16 +355,16 @@ public Mono getAsync( * @return a database advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context).block(); } /** * Gets a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -451,9 +380,9 @@ public AdvisorInner get(String resourceGroupName, String serverName, String data /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -461,17 +390,15 @@ public AdvisorInner get(String resourceGroupName, String serverName, String data * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -487,10 +414,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -499,28 +424,17 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -529,22 +443,15 @@ public 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - AdvisorInner parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -560,10 +467,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -572,25 +477,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -601,17 +496,17 @@ private Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -623,22 +518,17 @@ public Mono updateAsync( * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - AdvisorInner parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters, context) .block(); } /** * Updates a database advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -649,8 +539,8 @@ public Response updateWithResponse( * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner update( - String resourceGroupName, String serverName, String databaseName, String advisorName, AdvisorInner parameters) { + public AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters) { return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, parameters, Context.NONE) .getValue(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java index 733829f6e1865..9c6d8d777163b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java @@ -27,23 +27,28 @@ import com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseAutomaticTuningsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseAutomaticTuningsClient. + */ public final class DatabaseAutomaticTuningsClientImpl implements DatabaseAutomaticTuningsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseAutomaticTuningsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseAutomaticTuningsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseAutomaticTuningsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(DatabaseAutomaticTuningsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseAutomaticTuningsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -54,45 +59,32 @@ public final class DatabaseAutomaticTuningsClientImpl implements DatabaseAutomat @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAutomaticTuningsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/automaticTuning/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/automaticTuning/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseAutomaticTuningInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,13 +93,11 @@ Mono> update( * @return a database's automatic tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -120,33 +110,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -156,13 +134,11 @@ public Mono> getWithResponseAsync( * @return a database's automatic tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,30 +151,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,17 +173,17 @@ private Mono> getWithResponseAsync( * @return a database's automatic tuning on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -227,16 +193,16 @@ public Mono getAsync( * @return a database's automatic tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets a database's automatic tuning. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,9 +217,9 @@ public DatabaseAutomaticTuningInner get(String resourceGroupName, String serverN /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -263,13 +229,11 @@ public DatabaseAutomaticTuningInner get(String resourceGroupName, String serverN * @return database-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseAutomaticTuningInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -282,10 +246,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -295,26 +257,16 @@ public Mono> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -325,17 +277,11 @@ public Mono> updateWithResponseAsync( * @return database-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseAutomaticTuningInner parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseAutomaticTuningInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -348,10 +294,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -360,24 +304,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -387,17 +322,17 @@ private Mono> updateWithResponseAsync( * @return database-level Automatic Tuning on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseAutomaticTuningInner parameters) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -408,20 +343,16 @@ public Mono updateAsync( * @return database-level Automatic Tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseAutomaticTuningInner parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, DatabaseAutomaticTuningInner parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Update automatic tuning properties for target database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -431,8 +362,8 @@ public Response updateWithResponse( * @return database-level Automatic Tuning. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseAutomaticTuningInner update( - String resourceGroupName, String serverName, String databaseName, DatabaseAutomaticTuningInner parameters) { + public DatabaseAutomaticTuningInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseAutomaticTuningInner parameters) { return updateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java index 2f3ceec286b4a..f9a02994e9781 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java @@ -32,24 +32,28 @@ import com.azure.resourcemanager.sql.models.DatabaseBlobAuditingPolicyListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseBlobAuditingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseBlobAuditingPoliciesClient. + */ public final class DatabaseBlobAuditingPoliciesClientImpl implements DatabaseBlobAuditingPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseBlobAuditingPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseBlobAuditingPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseBlobAuditingPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseBlobAuditingPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseBlobAuditingPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,89 +64,66 @@ public final class DatabaseBlobAuditingPoliciesClientImpl implements DatabaseBlo @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseBlobAuditingPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/auditingSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseBlobAuditingPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -155,59 +136,38 @@ private Mono> listByDatabaseSingl return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,39 +180,23 @@ private Mono> listByDatabaseSingl return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,18 +205,17 @@ private Mono> listByDatabaseSingl * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -282,8 +225,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -291,9 +234,9 @@ private PagedFlux listByDatabaseAsync( /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,16 +245,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Lists auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -321,16 +264,16 @@ public PagedIterable listByDatabase( * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,13 +282,11 @@ public PagedIterable listByDatabase( * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -358,35 +299,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -396,13 +324,11 @@ public Mono> getWithResponseAsync( * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,32 +341,21 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,17 +364,17 @@ private Mono> getWithResponseAsync( * @return a database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -469,16 +384,16 @@ public Mono getAsync( * @return a database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -493,9 +408,9 @@ public DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serv /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -505,13 +420,11 @@ public DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serv * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -524,10 +437,8 @@ public Mono> createOrUpdateWithRespons return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -537,28 +448,17 @@ public Mono> createOrUpdateWithRespons final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -569,17 +469,11 @@ public Mono> createOrUpdateWithRespons * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseBlobAuditingPolicyInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -592,10 +486,8 @@ private Mono> createOrUpdateWithRespon return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -605,25 +497,16 @@ private Mono> createOrUpdateWithRespon final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -633,17 +516,17 @@ private Mono> createOrUpdateWithRespon * @return a database blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -654,21 +537,17 @@ public Mono createOrUpdateAsync( * @return a database blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - DatabaseBlobAuditingPolicyInner parameters, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context) .block(); } /** * Creates or updates a database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database blob auditing policy. @@ -678,22 +557,21 @@ public Response createOrUpdateWithResponse( * @return a database blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { + public DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -701,62 +579,42 @@ private Mono> listByDatabaseNextS return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java index 2a66e4fb1f807..d2cd62f7204a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java @@ -34,22 +34,28 @@ import java.util.stream.Collectors; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseColumnsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseColumnsClient. + */ public final class DatabaseColumnsClientImpl implements DatabaseColumnsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseColumnsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseColumnsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseColumnsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseColumnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabaseColumnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,97 +66,70 @@ public final class DatabaseColumnsClientImpl implements DatabaseColumnsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseColumnsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/columns") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam(value = "schema", multipleQueryParams = true) List schema, @QueryParam(value = "table", multipleQueryParams = true) List table, @QueryParam(value = "column", multipleQueryParams = true) List column, @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, - @QueryParam("$skiptoken") String skiptoken, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skiptoken") String skiptoken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTable( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") - @ExpectedResponses({200}) + Mono> listByTable(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByTableNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -158,20 +137,12 @@ Mono> listByTableNext( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -184,69 +155,42 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - List schemaConverted = - (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = - (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = - (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = - (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaConverted, - tableConverted, - columnConverted, - orderByConverted, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaConverted, tableConverted, columnConverted, orderByConverted, skiptoken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,21 +199,12 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -282,66 +217,42 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - List schemaConverted = - (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = - (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = - (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = - (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaConverted, - tableConverted, - columnConverted, - orderByConverted, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaConverted, + tableConverted, columnConverted, orderByConverted, skiptoken, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -349,27 +260,18 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, String skiptoken) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, schema, table, column, orderBy, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -378,31 +280,28 @@ public PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final List schema = null; final List table = null; final List column = null; final List orderBy = null; final String skiptoken = null; - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, schema, table, column, orderBy, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -411,28 +310,19 @@ public PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, schema, table, column, orderBy, skiptoken, context), + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,29 +331,28 @@ private PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { final List schema = null; final List table = null; final List column = null; final List orderBy = null; final String skiptoken = null; - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, serverName, databaseName, schema, table, column, orderBy, skiptoken)); + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, + column, orderBy, skiptoken)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,26 +361,18 @@ public PagedIterable listByDatabase( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, serverName, databaseName, schema, table, column, orderBy, skiptoken, context)); + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, + column, orderBy, skiptoken, context)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -503,18 +384,11 @@ public PagedIterable listByDatabase( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter) { + private Mono> listByTableSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String tableName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,45 +407,24 @@ private Mono> listByTableSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByTable( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByTable(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -584,19 +437,11 @@ private Mono> listByTableSinglePageAsync( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context) { + private Mono> listByTableSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String tableName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -615,42 +460,23 @@ private Mono> listByTableSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByTable( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByTable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, tableName, + filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -662,24 +488,17 @@ private Mono> listByTableSinglePageAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTableAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter) { - return new PagedFlux<>( - () -> - listByTableSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, filter), - nextLink -> listByTableNextSinglePageAsync(nextLink)); + public PagedFlux listByTableAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String filter) { + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, + tableName, filter), nextLink -> listByTableNextSinglePageAsync(nextLink)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -690,20 +509,18 @@ public PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTableAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName) { + public PagedFlux listByTableAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName) { final String filter = null; - return new PagedFlux<>( - () -> - listByTableSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, filter), - nextLink -> listByTableNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, + tableName, filter), nextLink -> listByTableNextSinglePageAsync(nextLink)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -716,26 +533,17 @@ public PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByTableAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context) { - return new PagedFlux<>( - () -> - listByTableSinglePageAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, filter, context), - nextLink -> listByTableNextSinglePageAsync(nextLink, context)); + private PagedFlux listByTableAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String filter, Context context) { + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, + tableName, filter, context), nextLink -> listByTableNextSinglePageAsync(nextLink, context)); } /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -746,8 +554,8 @@ private PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTable( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName) { + public PagedIterable listByTable(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName) { final String filter = null; return new PagedIterable<>( listByTableAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, filter)); @@ -755,9 +563,9 @@ public PagedIterable listByTable( /** * List database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -770,23 +578,17 @@ public PagedIterable listByTable( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTable( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context) { + public PagedIterable listByTable(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String filter, Context context) { return new PagedIterable<>( listByTableAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, filter, context)); } /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -798,18 +600,11 @@ public PagedIterable listByTable( * @return database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -831,36 +626,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -873,19 +654,11 @@ public Mono> getWithResponseAsync( * @return database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -907,33 +680,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -945,22 +705,17 @@ private Mono> getWithResponseAsync( * @return database column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -973,24 +728,17 @@ public Mono getAsync( * @return database column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + context).block(); } /** * Get database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1002,23 +750,16 @@ public Response getWithResponse( * @return database column. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseColumnInner get( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return getWithResponse( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, Context.NONE) - .getValue(); + public DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName) { + return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1030,31 +771,21 @@ private Mono> listByDatabaseNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1062,37 +793,26 @@ private Mono> listByDatabaseNextSinglePageAsy * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1104,31 +824,21 @@ private Mono> listByTableNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1141,23 +851,13 @@ private Mono> listByTableNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByTableNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java index 25c879ba1726f..f17fe7e59f204 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. + */ public final class DatabaseExtensionsOperationsClientImpl implements DatabaseExtensionsOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseExtensionsOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseExtensionsOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseExtensionsOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseExtensionsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseExtensionsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,88 +70,64 @@ public final class DatabaseExtensionsOperationsClientImpl implements DatabaseExt @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseExtensionsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extensions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extensions/{extensionName}") - @ExpectedResponses({200}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("extensionName") String extensionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("extensionName") String extensionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extensions/{extensionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("extensionName") String extensionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DatabaseExtensions parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("extensionName") String extensionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseExtensions parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -160,42 +140,24 @@ private Mono> listByDa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -203,16 +165,14 @@ private Mono> listByDa * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -225,39 +185,23 @@ private Mono> listByDa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,18 +210,17 @@ private Mono> listByDa * @return import export operation extensions list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -287,8 +230,8 @@ public PagedFlux listByDatabaseAsync * @return import export operation extensions list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -296,9 +239,9 @@ private PagedFlux listByDatabaseAsyn /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,16 +250,16 @@ private PagedFlux listByDatabaseAsyn * @return import export operation extensions list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * List database extension. This will return an empty list as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -326,16 +269,16 @@ public PagedIterable listByDatabase( * @return import export operation extensions list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -345,13 +288,11 @@ public PagedIterable listByDatabase( * @return a database extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String extensionName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String extensionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -367,32 +308,20 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - extensionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -403,13 +332,11 @@ public Mono> getWithResponseAsync( * @return a database extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String extensionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String extensionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -425,29 +352,19 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - extensionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, extensionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -464,9 +381,9 @@ public Mono getAsync(String resourceGroupName, String serverName, String d /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -477,16 +394,16 @@ public Mono getAsync(String resourceGroupName, String serverName, String d * @return a database extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String extensionName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String extensionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, extensionName, context).block(); } /** * Gets a database extension. This will return resource not found as it is not supported. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -501,9 +418,9 @@ public void get(String resourceGroupName, String serverName, String databaseName /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -511,21 +428,15 @@ public void get(String resourceGroupName, String serverName, String databaseName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Extension operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Extension operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -541,10 +452,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -553,28 +462,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - extensionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -583,22 +481,15 @@ public 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 Extension operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Extension operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String extensionName, DatabaseExtensions parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,10 +505,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -626,25 +515,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - extensionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -655,31 +534,23 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, + public + PollerFlux, ImportExportExtensionsOperationResultInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String extensionName, DatabaseExtensions parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, extensionName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportExtensionsOperationResultInner.class, - ImportExportExtensionsOperationResultInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, extensionName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ImportExportExtensionsOperationResultInner.class, + ImportExportExtensionsOperationResultInner.class, this.client.getContext()); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -691,34 +562,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context) { + private + PollerFlux, ImportExportExtensionsOperationResultInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String extensionName, + DatabaseExtensions parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, extensionName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportExtensionsOperationResultInner.class, - ImportExportExtensionsOperationResultInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, extensionName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ImportExportExtensionsOperationResultInner.class, + ImportExportExtensionsOperationResultInner.class, context); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -729,23 +590,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, + public + SyncPoller, ImportExportExtensionsOperationResultInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String extensionName, DatabaseExtensions parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters) .getSyncPoller(); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -757,24 +614,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ImportExportExtensionsOperationResultInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters, context) + public + SyncPoller, ImportExportExtensionsOperationResultInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String extensionName, + DatabaseExtensions parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters, context) .getSyncPoller(); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -785,22 +638,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an Extension operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String extensionName, DatabaseExtensions parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -812,13 +660,8 @@ public Mono createOrUpdateAsync( * @return an Extension operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String extensionName, DatabaseExtensions parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -826,9 +669,9 @@ private Mono createOrUpdateAsync( /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -839,20 +682,16 @@ private Mono createOrUpdateAsync( * @return an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportExtensionsOperationResultInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters) { + public ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters).block(); } /** * Perform a database extension operation, like database import, database export, or polybase import. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -864,91 +703,66 @@ public ImportExportExtensionsOperationResultInner createOrUpdate( * @return an Extension operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportExtensionsOperationResultInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String extensionName, - DatabaseExtensions parameters, - Context context) { + public ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, String extensionName, DatabaseExtensions parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, extensionName, parameters, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java index 033c6510191b6..ffee2cabfae93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java @@ -32,22 +32,28 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseOperationsClient. + */ public final class DatabaseOperationsClientImpl implements DatabaseOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,70 +64,53 @@ public final class DatabaseOperationsClientImpl implements DatabaseOperationsCli @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/operations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/operations/{operationId}/cancel") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("operationId") UUID operationId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> cancel(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -134,42 +123,23 @@ private Mono> listByDatabaseSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -177,16 +147,14 @@ private Mono> listByDatabaseSinglePageAsyn * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -199,39 +167,23 @@ private Mono> listByDatabaseSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,18 +192,17 @@ private Mono> listByDatabaseSinglePageAsyn * @return a list of operations performed on the database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -261,8 +212,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of operations performed on the database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -270,9 +221,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,16 +232,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of operations performed on the database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of operations performed on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -300,16 +251,16 @@ public PagedIterable listByDatabase( * @return a list of operations performed on the database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -319,13 +270,11 @@ public PagedIterable listByDatabase( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, UUID operationId) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, UUID operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -341,32 +290,20 @@ public Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -377,13 +314,11 @@ public Mono> cancelWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, UUID operationId, Context context) { + private Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, UUID operationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -399,29 +334,19 @@ private Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -438,9 +363,9 @@ public Mono cancelAsync(String resourceGroupName, String serverName, Strin /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -451,16 +376,16 @@ public Mono cancelAsync(String resourceGroupName, String serverName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String serverName, String databaseName, UUID operationId, Context context) { + public Response cancelWithResponse(String resourceGroupName, String serverName, String databaseName, + UUID operationId, Context context) { return cancelWithResponseAsync(resourceGroupName, serverName, databaseName, operationId, context).block(); } /** * Cancels the asynchronous operation on the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -475,14 +400,13 @@ public void cancel(String resourceGroupName, String serverName, String databaseN /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list database operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -490,62 +414,42 @@ private Mono> listByDatabaseNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list database operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java index ed5d30851f8f5..fac3c9a8e96ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java @@ -28,24 +28,28 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseRecommendedActionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseRecommendedActionsClient. + */ public final class DatabaseRecommendedActionsClientImpl implements DatabaseRecommendedActionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseRecommendedActionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseRecommendedActionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseRecommendedActionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseRecommendedActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseRecommendedActionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -56,85 +60,60 @@ public final class DatabaseRecommendedActionsClientImpl implements DatabaseRecom @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseRecommendedActionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByDatabaseAdvisor( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("advisorName") String advisorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> listByDatabaseAdvisor(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions" - + "/{recommendedActionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("advisorName") String advisorName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, @PathParam("recommendedActionName") String recommendedActionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions" - + "/{recommendedActionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("advisorName") String advisorName, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, @PathParam("recommendedActionName") String recommendedActionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RecommendedActionInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RecommendedActionInner parameters, @HeaderParam("Accept") String accept, Context context); } /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Database Recommended Actions along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByDatabaseAdvisorWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName) { + public Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String advisorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -150,34 +129,22 @@ public Mono>> listByDatabaseAdvisorWithRes return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabaseAdvisor( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabaseAdvisor(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -185,17 +152,15 @@ public Mono>> listByDatabaseAdvisorWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Database Recommended Actions along with {@link Response} on successful completion of {@link - * Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listByDatabaseAdvisorWithResponseAsync( String resourceGroupName, String serverName, String databaseName, String advisorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -211,31 +176,20 @@ private Mono>> listByDatabaseAdvisorWithRe return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseAdvisor( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.listByDatabaseAdvisor(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -245,17 +199,17 @@ private Mono>> listByDatabaseAdvisorWithRe * @return list of Database Recommended Actions on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByDatabaseAdvisorAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName) { + public Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName) { return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -266,17 +220,17 @@ public Mono> listByDatabaseAdvisorAsync( * @return list of Database Recommended Actions along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByDatabaseAdvisorWithResponse( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context) { + public Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, + String serverName, String databaseName, String advisorName, Context context) { return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context) .block(); } /** * Gets list of Database Recommended Actions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -286,17 +240,17 @@ public Response> listByDatabaseAdvisorWithResponse( * @return list of Database Recommended Actions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listByDatabaseAdvisor( - String resourceGroupName, String serverName, String databaseName, String advisorName) { + public List listByDatabaseAdvisor(String resourceGroupName, String serverName, + String databaseName, String advisorName) { return listByDatabaseAdvisorWithResponse(resourceGroupName, serverName, databaseName, advisorName, Context.NONE) .getValue(); } /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -307,17 +261,11 @@ public List listByDatabaseAdvisor( * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -337,35 +285,22 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter recommendedActionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - recommendedActionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -377,18 +312,11 @@ public Mono> getWithResponseAsync( * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -408,32 +336,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter recommendedActionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - recommendedActionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -444,21 +360,17 @@ private Mono> getWithResponseAsync( * @return a database recommended action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -470,23 +382,17 @@ public Mono getAsync( * @return a database recommended action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + context).block(); } /** * Gets a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -497,22 +403,17 @@ public Response getWithResponse( * @return a database recommended action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecommendedActionInner get( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName) { - return getWithResponse( - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, Context.NONE) - .getValue(); + public RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName) { + return getWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + Context.NONE).getValue(); } /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -522,21 +423,14 @@ public RecommendedActionInner 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 database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,10 +450,8 @@ public Mono> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter recommendedActionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -568,29 +460,17 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - recommendedActionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advisorName, recommendedActionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -601,22 +481,15 @@ public Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters, + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -636,10 +509,8 @@ private Mono> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter recommendedActionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -648,26 +519,16 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - advisorName, - recommendedActionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -679,23 +540,17 @@ private Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters) { - return updateWithResponseAsync( - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -708,24 +563,18 @@ public Mono updateAsync( * @return database, Server or Elastic Pool Recommended Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters, + public Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, Context context) { - return updateWithResponseAsync( - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, parameters, context) - .block(); + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters, context).block(); } /** * Updates a database recommended action. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. @@ -737,21 +586,9 @@ public Response updateWithResponse( * @return database, Server or Elastic Pool Recommended Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecommendedActionInner update( - String resourceGroupName, - String serverName, - String databaseName, - String advisorName, - String recommendedActionName, - RecommendedActionInner parameters) { - return updateWithResponse( - resourceGroupName, - serverName, - databaseName, - advisorName, - recommendedActionName, - parameters, - Context.NONE) - .getValue(); + public RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters) { + return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java index 3e78569f64301..92e6b950a2d10 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.DatabaseSchemaListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseSchemasClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseSchemasClient. + */ public final class DatabaseSchemasClientImpl implements DatabaseSchemasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseSchemasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseSchemasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseSchemasClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseSchemasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabaseSchemasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,56 +62,40 @@ public final class DatabaseSchemasClientImpl implements DatabaseSchemasClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseSchemasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -115,13 +105,11 @@ Mono> listByDatabaseNext( * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String filter) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -134,43 +122,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -181,13 +149,11 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -200,40 +166,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -243,18 +192,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -263,19 +211,18 @@ public PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final String filter = null; - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -286,8 +233,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -295,9 +242,9 @@ private PagedFlux listByDatabaseAsync( /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -306,17 +253,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { final String filter = null; return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); } /** * List database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -327,16 +274,16 @@ public PagedIterable listByDatabase( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, context)); } /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -346,13 +293,11 @@ public PagedIterable listByDatabase( * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -368,34 +313,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -406,13 +338,11 @@ public Mono> getWithResponseAsync( * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -428,31 +358,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -462,17 +381,17 @@ private Mono> getWithResponseAsync( * @return database schema on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -483,16 +402,16 @@ public Mono getAsync( * @return database schema along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String schemaName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, context).block(); } /** * Get database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -502,16 +421,15 @@ public Response getWithResponse( * @return database schema. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSchemaInner get( - String resourceGroupName, String serverName, String databaseName, String schemaName) { + public DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, + String schemaName) { return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -523,31 +441,21 @@ private Mono> listByDatabaseNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -555,29 +463,19 @@ private Mono> listByDatabaseNextSinglePageAsy * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java index 6a02598935aef..9ca40319385b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java @@ -33,26 +33,28 @@ import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. + */ public final class DatabaseSecurityAlertPoliciesClientImpl implements DatabaseSecurityAlertPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseSecurityAlertPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseSecurityAlertPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseSecurityAlertPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseSecurityAlertPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseSecurityAlertPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,89 +65,66 @@ public final class DatabaseSecurityAlertPoliciesClientImpl implements DatabaseSe @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseSecurityAlertPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/securityAlertPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseSecurityAlertPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -158,42 +137,23 @@ private Mono> listByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param context The context to associate with this operation. @@ -201,16 +161,14 @@ private Mono> listByDatabaseSing * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -223,39 +181,23 @@ private Mono> listByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,18 +206,17 @@ private Mono> listByDatabaseSing * @return a list of database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param context The context to associate with this operation. @@ -285,8 +226,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -294,9 +235,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,16 +246,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param context The context to associate with this operation. @@ -324,16 +265,16 @@ public PagedIterable listByDatabase( * @return a list of database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -343,16 +284,11 @@ public PagedIterable listByDatabase( * @return a database's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,39 +301,25 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -408,17 +330,11 @@ public Mono> getWithResponseAsync( * @return a database's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,36 +347,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -470,20 +374,17 @@ private Mono> getWithResponseAsync( * @return a database's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -494,21 +395,17 @@ public Mono getAsync( * @return a database's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, securityAlertPolicyName, context) .block(); } /** * Gets a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -518,10 +415,7 @@ public Response getWithResponse( * @return a database's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSecurityAlertPolicyInner get( - String resourceGroupName, - String serverName, - String databaseName, + public DatabaseSecurityAlertPolicyInner get(String resourceGroupName, String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { return getWithResponse(resourceGroupName, serverName, databaseName, securityAlertPolicyName, Context.NONE) .getValue(); @@ -529,9 +423,9 @@ public DatabaseSecurityAlertPolicyInner get( /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -542,17 +436,12 @@ public DatabaseSecurityAlertPolicyInner get( * @return a database security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -565,15 +454,12 @@ public Mono> createOrUpdateWithRespon return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -582,28 +468,17 @@ public Mono> createOrUpdateWithRespon } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -615,18 +490,12 @@ public Mono> createOrUpdateWithRespon * @return a database security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - DatabaseSecurityAlertPolicyInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, + DatabaseSecurityAlertPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -639,15 +508,12 @@ private Mono> createOrUpdateWithRespo return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -656,25 +522,16 @@ private Mono> createOrUpdateWithRespo } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -685,22 +542,18 @@ private Mono> createOrUpdateWithRespo * @return a database security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, securityAlertPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, securityAlertPolicyName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -712,23 +565,18 @@ public Mono createOrUpdateAsync( * @return a database security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - DatabaseSecurityAlertPolicyInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, securityAlertPolicyName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, + DatabaseSecurityAlertPolicyInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, securityAlertPolicyName, + parameters, context).block(); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -739,27 +587,22 @@ public Response createOrUpdateWithResponse( * @return a database security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public DatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, securityAlertPolicyName, parameters, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, securityAlertPolicyName, + parameters, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -767,62 +610,42 @@ private Mono> listByDatabaseNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java index db37f4b495f4f..65634f16032a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.DatabaseTableListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseTablesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseTablesClient. + */ public final class DatabaseTablesClientImpl implements DatabaseTablesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseTablesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseTablesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseTablesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseTablesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabaseTablesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,58 +62,40 @@ public final class DatabaseTablesClientImpl implements DatabaseTablesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseTablesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySchema( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBySchema(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySchemaNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -118,13 +106,11 @@ Mono> listBySchemaNext( * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String filter) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -140,44 +126,24 @@ private Mono> listBySchemaSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listBySchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listBySchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -189,18 +155,11 @@ private Mono> listBySchemaSinglePageAsync( * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String filter, - Context context) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -216,41 +175,23 @@ private Mono> listBySchemaSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listBySchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listBySchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -261,8 +202,8 @@ private Mono> listBySchemaSinglePageAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String filter) { + public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter) { return new PagedFlux<>( () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), nextLink -> listBySchemaNextSinglePageAsync(nextLink)); @@ -270,9 +211,9 @@ public PagedFlux listBySchemaAsync( /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -282,8 +223,8 @@ public PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName) { + public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName) { final String filter = null; return new PagedFlux<>( () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), @@ -292,9 +233,9 @@ public PagedFlux listBySchemaAsync( /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -306,13 +247,8 @@ public PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySchemaAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String filter, - Context context) { + private PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter, Context context) { return new PagedFlux<>( () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context), nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); @@ -320,9 +256,9 @@ private PagedFlux listBySchemaAsync( /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -332,17 +268,17 @@ private PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema( - String resourceGroupName, String serverName, String databaseName, String schemaName) { + public PagedIterable listBySchema(String resourceGroupName, String serverName, + String databaseName, String schemaName) { final String filter = null; return new PagedIterable<>(listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter)); } /** * List database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -354,22 +290,17 @@ public PagedIterable listBySchema( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String filter, - Context context) { + public PagedIterable listBySchema(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter, Context context) { return new PagedIterable<>( listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context)); } /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -380,13 +311,11 @@ public PagedIterable listBySchema( * @return database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -405,35 +334,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -445,18 +360,11 @@ public Mono> getWithResponseAsync( * @return database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -475,32 +383,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -511,17 +407,17 @@ private Mono> getWithResponseAsync( * @return database table on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -533,22 +429,17 @@ public Mono getAsync( * @return database table along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, context) .block(); } /** * Get database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -559,17 +450,16 @@ public Response getWithResponse( * @return database table. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseTableInner get( - String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName) { + public DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName) { return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -581,31 +471,21 @@ private Mono> listBySchemaNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -618,23 +498,13 @@ private Mono> listBySchemaNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java index aba27cd46f87c..73b85bc0d23a5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.DatabaseUsageListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabaseUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabaseUsagesClient. + */ public final class DatabaseUsagesClientImpl implements DatabaseUsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseUsagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseUsagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseUsagesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabaseUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabaseUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,38 +62,29 @@ public final class DatabaseUsagesClientImpl implements DatabaseUsagesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseUsagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/usages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,13 +93,11 @@ Mono> listByDatabaseNext( * @return database usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -115,42 +110,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -160,13 +136,11 @@ private Mono> listByDatabaseSinglePageAsync( * @return database usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -179,39 +153,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,18 +178,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return database usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -241,8 +198,8 @@ public PagedFlux listByDatabaseAsync( * @return database usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -250,9 +207,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,16 +218,16 @@ private PagedFlux listByDatabaseAsync( * @return database usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets database usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -280,21 +237,20 @@ public PagedIterable listByDatabase( * @return database usages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -302,62 +258,42 @@ private Mono> listByDatabaseNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java index d571e96ff8b12..b02f2d62b6cc1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java @@ -36,24 +36,24 @@ */ public final class DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl implements DatabaseVulnerabilityAssessmentRuleBaselinesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseVulnerabilityAssessmentRuleBaselinesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseVulnerabilityAssessmentRuleBaselinesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseVulnerabilityAssessmentRuleBaselinesService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,97 +64,72 @@ public final class DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentRuleBaselinesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,10 +142,8 @@ public Mono> getWithR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -179,63 +152,43 @@ public Mono> getWithR return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -248,10 +201,8 @@ private Mono> getWith return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -260,68 +211,51 @@ private Mono> getWith return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -329,86 +263,64 @@ public Mono getAsync( * @return a database's vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, context) - .block(); + public Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName, context).block(); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentRuleBaselineInner get( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - return getWithResponse( - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - Context.NONE) - .getValue(); + return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName, Context.NONE).getValue(); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline 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 a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -421,10 +333,8 @@ public Mono> createOr return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -433,10 +343,8 @@ public Mono> createOr return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -445,59 +353,40 @@ public Mono> createOr } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context) { + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -510,10 +399,8 @@ private Mono> createO return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -522,10 +409,8 @@ private Mono> createO return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -534,33 +419,22 @@ private Mono> createO } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -568,36 +442,25 @@ private Mono> createO * @return a database vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,37 +470,25 @@ public Mono createOrUpdateAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters, - context) - .block(); + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName, parameters, context).block(); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -645,55 +496,37 @@ public Response createOrUpdate * @return a database vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters, - Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName, parameters, Context.NONE).getValue(); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -706,10 +539,8 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -718,40 +549,27 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -759,19 +577,12 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -784,10 +595,8 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -796,66 +605,50 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - return deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName) - .flatMap(ignored -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName).flatMap(ignored -> Mono.empty()); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -863,49 +656,33 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName, context).block(); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public void delete(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - deleteWithResponse( - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - Context.NONE); + deleteWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName, Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java index cd5c80e9a45fb..855e225b7e7d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java @@ -44,24 +44,24 @@ */ public final class DatabaseVulnerabilityAssessmentScansClientImpl implements DatabaseVulnerabilityAssessmentScansClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseVulnerabilityAssessmentScansService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseVulnerabilityAssessmentScansClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseVulnerabilityAssessmentScansClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseVulnerabilityAssessmentScansService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseVulnerabilityAssessmentScansService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -72,95 +72,64 @@ public final class DatabaseVulnerabilityAssessmentScansClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentScansService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}/export") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> export( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> export(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}/initiateScan") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> initiateScan( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> initiateScan(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -168,19 +137,15 @@ Mono> listByDatabaseNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, + String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -193,49 +158,28 @@ private Mono> listByDataba return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -244,20 +188,15 @@ private Mono> listByDataba * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -270,46 +209,26 @@ private Mono> listByDataba return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -319,22 +238,17 @@ private Mono> listByDataba * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -345,24 +259,20 @@ public PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context), + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -372,20 +282,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -396,11 +303,8 @@ public PagedIterable listByDatabase( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context)); @@ -408,9 +312,9 @@ public PagedIterable listByDatabase( /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -419,20 +323,15 @@ public PagedIterable listByDatabase( * @throws 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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -445,44 +344,29 @@ public Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -492,21 +376,15 @@ public Mono> getWithResponseAsy * @throws 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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -519,41 +397,28 @@ private Mono> getWithResponseAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -564,21 +429,17 @@ private Mono> getWithResponseAs * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -590,23 +451,17 @@ public Mono getAsync( * @return a vulnerability assessment scan record of a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + context).block(); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -617,22 +472,17 @@ public Response getWithResponse( * @return a vulnerability assessment scan record of a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VulnerabilityAssessmentScanRecordInner get( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return getWithResponse( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, Context.NONE) - .getValue(); + public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + Context.NONE).getValue(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -641,20 +491,15 @@ public VulnerabilityAssessmentScanRecordInner 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> exportWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -667,44 +512,29 @@ public Mono> exportWit return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .export( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.export(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -714,21 +544,15 @@ public Mono> exportWit * @throws 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> exportWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -741,41 +565,28 @@ private Mono> exportWi return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .export( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -786,11 +597,8 @@ private Mono> exportWi * @return a database Vulnerability Assessment scan export resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono exportAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono exportAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { return exportWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -798,9 +606,9 @@ public Mono exportAsync( /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -812,23 +620,18 @@ public Mono exportAsync( * @return a database Vulnerability Assessment scan export resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response exportWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, + public Response exportWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { - return exportWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context) - .block(); + return exportWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + context).block(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -839,22 +642,17 @@ public Response exportWithRespo * @return a database Vulnerability Assessment scan export resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentScansExportInner export( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return exportWithResponse( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, Context.NONE) - .getValue(); + public DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return exportWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + Context.NONE).getValue(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -865,17 +663,11 @@ public DatabaseVulnerabilityAssessmentScansExportInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + public Mono>> initiateScanWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -888,42 +680,28 @@ public Mono>> initiateScanWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .initiateScan( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.initiateScan(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -935,18 +713,11 @@ public Mono>> initiateScanWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + private Mono>> initiateScanWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -959,39 +730,26 @@ private Mono>> initiateScanWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .initiateScan( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.initiateScan(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1002,26 +760,19 @@ private Mono>> initiateScanWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - Mono>> mono = - initiateScanWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + Mono>> mono = initiateScanWithResponseAsync(resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1033,27 +784,20 @@ public PollerFlux, Void> beginInitiateScanAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + private PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - initiateScanWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = initiateScanWithResponseAsync(resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1064,21 +808,18 @@ private PollerFlux, Void> beginInitiateScanAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return beginInitiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) + public SyncPoller, Void> beginInitiateScan(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return this + .beginInitiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) .getSyncPoller(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1090,23 +831,19 @@ public SyncPoller, Void> beginInitiateScan( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return beginInitiateScanAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context) + public SyncPoller, Void> beginInitiateScan(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return this + .beginInitiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + context) .getSyncPoller(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1117,12 +854,8 @@ public SyncPoller, Void> beginInitiateScan( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono initiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + public Mono initiateScanAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { return beginInitiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1130,9 +863,9 @@ public Mono initiateScanAsync( /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1144,24 +877,17 @@ public Mono initiateScanAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono initiateScanAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return beginInitiateScanAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono initiateScanAsync(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return beginInitiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1171,20 +897,16 @@ private Mono initiateScanAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void initiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + public void initiateScan(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { initiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId).block(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1195,91 +917,65 @@ public void initiateScan( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void initiateScan( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + public void initiateScan(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { initiateScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java index 7bb4df0432d0c..f2ff8fe8ea372 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java @@ -38,24 +38,24 @@ * An instance of this class provides access to all the operations defined in DatabaseVulnerabilityAssessmentsClient. */ public final class DatabaseVulnerabilityAssessmentsClientImpl implements DatabaseVulnerabilityAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabaseVulnerabilityAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabaseVulnerabilityAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabaseVulnerabilityAssessmentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DatabaseVulnerabilityAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DatabaseVulnerabilityAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,105 +66,77 @@ public final class DatabaseVulnerabilityAssessmentsClientImpl implements Databas @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseVulnerabilityAssessmentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,42 +149,23 @@ private Mono> listByDatabase return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @param context The context to associate with this operation. @@ -220,16 +173,14 @@ private Mono> listByDatabase * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -242,39 +193,23 @@ private Mono> listByDatabase return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,18 +218,17 @@ private Mono> listByDatabase * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @param context The context to associate with this operation. @@ -304,8 +238,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -313,9 +247,9 @@ private PagedFlux listByDatabaseAsync( /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,16 +258,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Lists the vulnerability assessment policies associated with a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment policies are defined. * @param context The context to associate with this operation. @@ -343,36 +277,31 @@ public PagedIterable listByDatabase( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -385,40 +314,26 @@ public Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -426,21 +341,16 @@ public Mono> getWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -453,37 +363,24 @@ private Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -493,20 +390,17 @@ private Mono> getWithResponseAsyn * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -517,21 +411,17 @@ public Mono getAsync( * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context) .block(); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -541,10 +431,7 @@ public Response getWithResponse( * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner get( - String resourceGroupName, - String serverName, - String databaseName, + public DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, Context.NONE) .getValue(); @@ -552,9 +439,9 @@ public DatabaseVulnerabilityAssessmentInner get( /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -566,16 +453,11 @@ public DatabaseVulnerabilityAssessmentInner get( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -588,16 +470,12 @@ public Mono> createOrUpdateWithRe return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -606,28 +484,17 @@ public Mono> createOrUpdateWithRe } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -640,17 +507,12 @@ public Mono> createOrUpdateWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -663,16 +525,12 @@ private Mono> createOrUpdateWithR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -681,25 +539,16 @@ private Mono> createOrUpdateWithR } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -710,22 +559,18 @@ private Mono> createOrUpdateWithR * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -737,23 +582,18 @@ public Mono createOrUpdateAsync( * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + parameters, context).block(); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -764,22 +604,18 @@ public Response createOrUpdateWithResponse * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, parameters, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + parameters, Context.NONE).getValue(); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -789,16 +625,11 @@ public DatabaseVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -811,38 +642,25 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -853,17 +671,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -876,35 +688,23 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -914,10 +714,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName) .flatMap(ignored -> Mono.empty()); @@ -925,9 +722,9 @@ public Mono deleteAsync( /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -938,22 +735,17 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, + context).block(); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -962,88 +754,64 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, + public void delete(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { deleteWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, Context.NONE); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java index e754adca43cf3..8523fcae969bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java @@ -46,22 +46,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in DatabasesClient. + */ public final class DatabasesClientImpl implements DatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -72,267 +78,170 @@ public final class DatabasesClientImpl implements DatabasesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @QueryParam("$skipToken") String skipToken, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @QueryParam("$skipToken") String skipToken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DatabaseInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DatabaseUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/export") - @ExpectedResponses({200, 202}) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseUpdate parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> export( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono>> export(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ExportDatabaseDefinition parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExportDatabaseDefinition parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/failover") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("replicaType") ReplicaType replicaType, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> failover(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("replicaType") ReplicaType replicaType, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/import") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importMethod( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono>> importMethod(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ImportExistingDatabaseDefinition parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/move") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> rename( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono> rename(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ResourceMoveDefinition parameters, - Context context); + @BodyParam("application/json") ResourceMoveDefinition parameters, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/pause") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> pause( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/resume") - @ExpectedResponses({200, 202}) + Mono>> pause(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/upgradeDataWarehouse") - @ExpectedResponses({200, 202}) + Mono>> resume(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeDataWarehouse( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}/databases") - @ExpectedResponses({200}) + Mono>> upgradeDataWarehouse(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByElasticPool( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/inaccessibleDatabases") - @ExpectedResponses({200}) + Mono> listByElasticPool(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInaccessibleByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listInaccessibleByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByElasticPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listInaccessibleByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,13 +250,11 @@ Mono> listInaccessibleByServerNext( * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, String skipToken) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + String skipToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,42 +264,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - skipToken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + skipToken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @param context The context to associate with this operation. @@ -402,13 +290,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, String skipToken, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + String skipToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -418,39 +304,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - skipToken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skipToken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -460,16 +330,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName, String skipToken) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -479,16 +348,15 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { final String skipToken = null; - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @param context The context to associate with this operation. @@ -498,18 +366,17 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri * @return a list of databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, String skipToken, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, String skipToken, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -524,9 +391,9 @@ public PagedIterable listByServer(String resourceGroupName, Strin /** * Gets a list of databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skipToken The skipToken parameter. * @param context The context to associate with this operation. @@ -536,16 +403,16 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @return a list of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, String skipToken, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, String skipToken, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skipToken, context)); } /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -554,13 +421,11 @@ public PagedIterable listByServer( * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -573,33 +438,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -609,13 +462,11 @@ public Mono> getWithResponseAsync( * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -628,30 +479,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -667,9 +508,9 @@ public Mono getAsync(String resourceGroupName, String serverName, /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -679,16 +520,16 @@ public Mono getAsync(String resourceGroupName, String serverName, * @return a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -703,9 +544,9 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -715,13 +556,11 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -734,10 +573,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -746,27 +583,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -777,13 +604,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -796,10 +621,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -808,24 +631,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -835,25 +649,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DatabaseInner.class, - DatabaseInner.class, - this.client.getContext()); + public PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -864,22 +672,20 @@ public PollerFlux, DatabaseInner> beginCreateOrUpdateA * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { + private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, context); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -889,16 +695,16 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -909,17 +715,17 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) + public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) .getSyncPoller(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -929,18 +735,17 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -951,18 +756,17 @@ public Mono createOrUpdateAsync( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -972,16 +776,16 @@ private Mono createOrUpdateAsync( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { + public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -992,16 +796,16 @@ public DatabaseInner createOrUpdate( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner createOrUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { + public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1010,13 +814,11 @@ public DatabaseInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1029,31 +831,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1063,13 +854,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1082,28 +871,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1112,20 +892,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, databaseName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1135,21 +913,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1158,16 +935,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1177,16 +954,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1196,16 +973,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1216,16 +992,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1239,9 +1014,9 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes the database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1256,9 +1031,9 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1268,13 +1043,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1287,10 +1060,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1300,26 +1071,16 @@ public Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1330,13 +1091,11 @@ public Mono>> updateWithResponseAsync( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1349,10 +1108,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1361,24 +1118,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1388,25 +1136,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DatabaseInner.class, - DatabaseInner.class, - this.client.getContext()); + public PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1417,22 +1159,20 @@ public PollerFlux, DatabaseInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginUpdateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context) { + private PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, context); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1442,16 +1182,16 @@ private PollerFlux, DatabaseInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1462,16 +1202,16 @@ public SyncPoller, DatabaseInner> beginUpdate( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1481,18 +1221,17 @@ public SyncPoller, DatabaseInner> beginUpdate( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1503,18 +1242,17 @@ public Mono updateAsync( * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1524,16 +1262,16 @@ private Mono updateAsync( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner update( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters) { + public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters) { return updateAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1544,33 +1282,31 @@ public DatabaseInner update( * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner update( - String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, Context context) { + public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters, Context context) { return updateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> exportWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters) { + public Mono>> exportWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ExportDatabaseDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1583,10 +1319,8 @@ public Mono>> exportWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1596,26 +1330,16 @@ public Mono>> exportWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .export( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1623,21 +1347,15 @@ public Mono>> exportWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> exportWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, - Context context) { + private Mono>> exportWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ExportDatabaseDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1650,10 +1368,8 @@ private Mono>> exportWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1662,24 +1378,15 @@ private Mono>> exportWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .export( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1691,23 +1398,18 @@ private Mono>> exportWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ImportExportOperationResultInner> beginExportAsync( String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters) { - Mono>> mono = - exportWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - this.client.getContext()); + Mono>> mono + = exportWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, this.client.getContext()); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1719,29 +1421,21 @@ public PollerFlux, ImportExportOper */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ImportExportOperationResultInner> beginExportAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, + String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - exportWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - context); + Mono>> mono + = exportWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, context); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1753,14 +1447,14 @@ private PollerFlux, ImportExportOpe @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> beginExport( String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters) { - return beginExportAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + return this.beginExportAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1772,19 +1466,16 @@ public SyncPoller, ImportExportOper */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> beginExport( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, + String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters, Context context) { - return beginExportAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + return this.beginExportAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1794,18 +1485,17 @@ public SyncPoller, ImportExportOper * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono exportAsync( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters) { - return beginExportAsync(resourceGroupName, serverName, databaseName, parameters) - .last() + public Mono exportAsync(String resourceGroupName, String serverName, + String databaseName, ExportDatabaseDefinition parameters) { + return beginExportAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1816,22 +1506,17 @@ public Mono exportAsync( * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono exportAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, - Context context) { - return beginExportAsync(resourceGroupName, serverName, databaseName, parameters, context) - .last() + private Mono exportAsync(String resourceGroupName, String serverName, + String databaseName, ExportDatabaseDefinition parameters, Context context) { + return beginExportAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1841,16 +1526,16 @@ private Mono exportAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner export( - String resourceGroupName, String serverName, String databaseName, ExportDatabaseDefinition parameters) { + public ImportExportOperationResultInner export(String resourceGroupName, String serverName, String databaseName, + ExportDatabaseDefinition parameters) { return exportAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** * Exports a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1861,20 +1546,16 @@ public ImportExportOperationResultInner export( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner export( - String resourceGroupName, - String serverName, - String databaseName, - ExportDatabaseDefinition parameters, - Context context) { + public ImportExportOperationResultInner export(String resourceGroupName, String serverName, String databaseName, + ExportDatabaseDefinition parameters, Context context) { return exportAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -1884,13 +1565,11 @@ public ImportExportOperationResultInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1903,32 +1582,20 @@ public Mono>> failoverWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - replicaType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, replicaType, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -1939,13 +1606,11 @@ public Mono>> failoverWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1958,29 +1623,19 @@ private Mono>> failoverWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - replicaType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, replicaType, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -1990,21 +1645,19 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2013,22 +1666,20 @@ public PollerFlux, Void> beginFailoverAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName) { + public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String databaseName) { final ReplicaType replicaType = null; - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -2039,21 +1690,20 @@ public PollerFlux, Void> beginFailoverAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context) { + private PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, databaseName, replicaType, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2062,17 +1712,17 @@ private PollerFlux, Void> beginFailoverAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String databaseName) { + public SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String databaseName) { final ReplicaType replicaType = null; - return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType).getSyncPoller(); + return this.beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType).getSyncPoller(); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -2083,16 +1733,17 @@ public SyncPoller, Void> beginFailover( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType, context).getSyncPoller(); + public SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String databaseName, ReplicaType replicaType, Context context) { + return this.beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType, context) + .getSyncPoller(); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -2102,18 +1753,17 @@ public SyncPoller, Void> beginFailover( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType) - .last() + public Mono failoverAsync(String resourceGroupName, String serverName, String databaseName, + ReplicaType replicaType) { + return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2124,16 +1774,15 @@ public Mono failoverAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono failoverAsync(String resourceGroupName, String serverName, String databaseName) { final ReplicaType replicaType = null; - return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType) - .last() + return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -2144,18 +1793,17 @@ public Mono failoverAsync(String resourceGroupName, String serverName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType, context) - .last() + private Mono failoverAsync(String resourceGroupName, String serverName, String databaseName, + ReplicaType replicaType, Context context) { + return beginFailoverAsync(resourceGroupName, serverName, databaseName, replicaType, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2170,9 +1818,9 @@ public void failover(String resourceGroupName, String serverName, String databas /** * Failovers a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. @@ -2182,33 +1830,31 @@ public void failover(String resourceGroupName, String serverName, String databas * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void failover( - String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, Context context) { + public void failover(String resourceGroupName, String serverName, String databaseName, ReplicaType replicaType, + Context context) { failoverAsync(resourceGroupName, serverName, databaseName, replicaType, context).block(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> importMethodWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters) { + public Mono>> importMethodWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2221,10 +1867,8 @@ public Mono>> importMethodWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2234,26 +1878,16 @@ public Mono>> importMethodWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .importMethod( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.importMethod(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2261,21 +1895,15 @@ public Mono>> importMethodWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> importMethodWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, - Context context) { + private Mono>> importMethodWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2288,10 +1916,8 @@ private Mono>> importMethodWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2300,24 +1926,15 @@ private Mono>> importMethodWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .importMethod( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.importMethod(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2328,28 +1945,20 @@ private Mono>> importMethodWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ImportExportOperationResultInner> - beginImportMethodAsync( - String resourceGroupName, - String serverName, - String databaseName, + beginImportMethodAsync(String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters) { - Mono>> mono = - importMethodWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - this.client.getContext()); + Mono>> mono + = importMethodWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, this.client.getContext()); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2361,30 +1970,21 @@ private Mono>> importMethodWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ImportExportOperationResultInner> - beginImportMethodAsync( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, - Context context) { + beginImportMethodAsync(String resourceGroupName, String serverName, String databaseName, + ImportExistingDatabaseDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - importMethodWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - context); + Mono>> mono + = importMethodWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, context); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2396,14 +1996,14 @@ private Mono>> importMethodWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> beginImportMethod( String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters) { - return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + return this.beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2415,19 +2015,17 @@ public SyncPoller, ImportExportOper */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> beginImportMethod( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, + String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters, Context context) { - return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + return this.beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters, context) + .getSyncPoller(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2437,18 +2035,17 @@ public SyncPoller, ImportExportOper * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono importMethodAsync( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters) { - return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters) - .last() + public Mono importMethodAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters) { + return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2459,22 +2056,17 @@ public Mono importMethodAsync( * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono importMethodAsync( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, - Context context) { - return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters, context) - .last() + private Mono importMethodAsync(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters, Context context) { + return beginImportMethodAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2484,16 +2076,16 @@ private Mono importMethodAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importMethod( - String resourceGroupName, String serverName, String databaseName, ImportExistingDatabaseDefinition parameters) { + public ImportExportOperationResultInner importMethod(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters) { return importMethodAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2504,20 +2096,16 @@ public ImportExportOperationResultInner importMethod( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importMethod( - String resourceGroupName, - String serverName, - String databaseName, - ImportExistingDatabaseDefinition parameters, - Context context) { + public ImportExportOperationResultInner importMethod(String resourceGroupName, String serverName, + String databaseName, ImportExistingDatabaseDefinition parameters, Context context) { return importMethodAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -2527,13 +2115,11 @@ public ImportExportOperationResultInner importMethod( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renameWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters) { + public Mono> renameWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ResourceMoveDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2546,10 +2132,8 @@ public Mono> renameWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2557,26 +2141,16 @@ public Mono> renameWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .rename( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.rename(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -2587,17 +2161,11 @@ public Mono> renameWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> renameWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ResourceMoveDefinition parameters, - Context context) { + private Mono> renameWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, ResourceMoveDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2610,10 +2178,8 @@ private Mono> renameWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2621,23 +2187,15 @@ private Mono> renameWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .rename( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.rename(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -2647,17 +2205,17 @@ private Mono> renameWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renameAsync( - String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters) { + public Mono renameAsync(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters) { return renameWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(ignored -> Mono.empty()); } /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -2668,20 +2226,16 @@ public Mono renameAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response renameWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ResourceMoveDefinition parameters, - Context context) { + public Response renameWithResponse(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters, Context context) { return renameWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Renames a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. @@ -2690,16 +2244,16 @@ public Response renameWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rename( - String resourceGroupName, String serverName, String databaseName, ResourceMoveDefinition parameters) { + public void rename(String resourceGroupName, String serverName, String databaseName, + ResourceMoveDefinition parameters) { renameWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2708,13 +2262,11 @@ public void rename( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> pauseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono>> pauseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2727,33 +2279,21 @@ public Mono>> pauseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .pause( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.pause(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -2763,13 +2303,11 @@ public Mono>> pauseWithResponseAsync( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> pauseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono>> pauseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2782,30 +2320,20 @@ private Mono>> pauseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .pause( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.pause(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2814,24 +2342,18 @@ private Mono>> pauseWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginPauseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PollerFlux, DatabaseInner> beginPauseAsync(String resourceGroupName, + String serverName, String databaseName) { Mono>> mono = pauseWithResponseAsync(resourceGroupName, serverName, databaseName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DatabaseInner.class, - DatabaseInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -2841,22 +2363,20 @@ public PollerFlux, DatabaseInner> beginPauseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginPauseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PollerFlux, DatabaseInner> beginPauseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - pauseWithResponseAsync(resourceGroupName, serverName, databaseName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + Mono>> mono + = pauseWithResponseAsync(resourceGroupName, serverName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, context); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2865,16 +2385,16 @@ private PollerFlux, DatabaseInner> beginPauseAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginPause( - String resourceGroupName, String serverName, String databaseName) { - return beginPauseAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); + public SyncPoller, DatabaseInner> beginPause(String resourceGroupName, String serverName, + String databaseName) { + return this.beginPauseAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -2884,16 +2404,16 @@ public SyncPoller, DatabaseInner> beginPause( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginPause( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginPauseAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); + public SyncPoller, DatabaseInner> beginPause(String resourceGroupName, String serverName, + String databaseName, Context context) { + return this.beginPauseAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2903,16 +2423,15 @@ public SyncPoller, DatabaseInner> beginPause( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono pauseAsync(String resourceGroupName, String serverName, String databaseName) { - return beginPauseAsync(resourceGroupName, serverName, databaseName) - .last() + return beginPauseAsync(resourceGroupName, serverName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -2922,18 +2441,17 @@ public Mono pauseAsync(String resourceGroupName, String serverNam * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono pauseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginPauseAsync(resourceGroupName, serverName, databaseName, context) - .last() + private Mono pauseAsync(String resourceGroupName, String serverName, String databaseName, + Context context) { + return beginPauseAsync(resourceGroupName, serverName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2948,9 +2466,9 @@ public DatabaseInner pause(String resourceGroupName, String serverName, String d /** * Pauses a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be paused. * @param context The context to associate with this operation. @@ -2966,9 +2484,9 @@ public DatabaseInner pause(String resourceGroupName, String serverName, String d /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2977,13 +2495,11 @@ public DatabaseInner pause(String resourceGroupName, String serverName, String d * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resumeWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2996,33 +2512,21 @@ public Mono>> resumeWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .resume( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.resume(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -3032,13 +2536,11 @@ public Mono>> resumeWithResponseAsync( * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3051,30 +2553,20 @@ private Mono>> resumeWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .resume( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.resume(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3083,24 +2575,18 @@ private Mono>> resumeWithResponseAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginResumeAsync( - String resourceGroupName, String serverName, String databaseName) { + public PollerFlux, DatabaseInner> beginResumeAsync(String resourceGroupName, + String serverName, String databaseName) { Mono>> mono = resumeWithResponseAsync(resourceGroupName, serverName, databaseName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DatabaseInner.class, - DatabaseInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -3110,22 +2596,20 @@ public PollerFlux, DatabaseInner> beginResumeAsync( * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginResumeAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PollerFlux, DatabaseInner> beginResumeAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - resumeWithResponseAsync(resourceGroupName, serverName, databaseName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + Mono>> mono + = resumeWithResponseAsync(resourceGroupName, serverName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, context); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3134,16 +2618,16 @@ private PollerFlux, DatabaseInner> beginResumeAsync( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginResume( - String resourceGroupName, String serverName, String databaseName) { - return beginResumeAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); + public SyncPoller, DatabaseInner> beginResume(String resourceGroupName, String serverName, + String databaseName) { + return this.beginResumeAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -3153,16 +2637,16 @@ public SyncPoller, DatabaseInner> beginResume( * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginResume( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginResumeAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); + public SyncPoller, DatabaseInner> beginResume(String resourceGroupName, String serverName, + String databaseName, Context context) { + return this.beginResumeAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3172,16 +2656,15 @@ public SyncPoller, DatabaseInner> beginResume( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono resumeAsync(String resourceGroupName, String serverName, String databaseName) { - return beginResumeAsync(resourceGroupName, serverName, databaseName) - .last() + return beginResumeAsync(resourceGroupName, serverName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -3191,18 +2674,17 @@ public Mono resumeAsync(String resourceGroupName, String serverNa * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginResumeAsync(resourceGroupName, serverName, databaseName, context) - .last() + private Mono resumeAsync(String resourceGroupName, String serverName, String databaseName, + Context context) { + return beginResumeAsync(resourceGroupName, serverName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3217,9 +2699,9 @@ public DatabaseInner resume(String resourceGroupName, String serverName, String /** * Resumes a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be resumed. * @param context The context to associate with this operation. @@ -3235,9 +2717,9 @@ public DatabaseInner resume(String resourceGroupName, String serverName, String /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3246,13 +2728,11 @@ public DatabaseInner resume(String resourceGroupName, String serverName, String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> upgradeDataWarehouseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono>> upgradeDataWarehouseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3265,31 +2745,20 @@ public Mono>> upgradeDataWarehouseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .upgradeDataWarehouse( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.upgradeDataWarehouse(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -3299,13 +2768,11 @@ public Mono>> upgradeDataWarehouseWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeDataWarehouseWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono>> upgradeDataWarehouseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3318,28 +2785,19 @@ private Mono>> upgradeDataWarehouseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .upgradeDataWarehouse( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.upgradeDataWarehouse(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3348,21 +2806,19 @@ private Mono>> upgradeDataWarehouseWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginUpgradeDataWarehouseAsync( - String resourceGroupName, String serverName, String databaseName) { - Mono>> mono = - upgradeDataWarehouseWithResponseAsync(resourceGroupName, serverName, databaseName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginUpgradeDataWarehouseAsync(String resourceGroupName, + String serverName, String databaseName) { + Mono>> mono + = upgradeDataWarehouseWithResponseAsync(resourceGroupName, serverName, databaseName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -3372,21 +2828,20 @@ public PollerFlux, Void> beginUpgradeDataWarehouseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpgradeDataWarehouseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PollerFlux, Void> beginUpgradeDataWarehouseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - upgradeDataWarehouseWithResponseAsync(resourceGroupName, serverName, databaseName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = upgradeDataWarehouseWithResponseAsync(resourceGroupName, serverName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3395,16 +2850,16 @@ private PollerFlux, Void> beginUpgradeDataWarehouseAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpgradeDataWarehouse( - String resourceGroupName, String serverName, String databaseName) { - return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); + public SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGroupName, String serverName, + String databaseName) { + return this.beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -3414,16 +2869,17 @@ public SyncPoller, Void> beginUpgradeDataWarehouse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpgradeDataWarehouse( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller(); + public SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGroupName, String serverName, + String databaseName, Context context) { + return this.beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName, context) + .getSyncPoller(); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3433,16 +2889,15 @@ public SyncPoller, Void> beginUpgradeDataWarehouse( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono upgradeDataWarehouseAsync(String resourceGroupName, String serverName, String databaseName) { - return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName) - .last() + return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -3452,18 +2907,17 @@ public Mono upgradeDataWarehouseAsync(String resourceGroupName, String ser * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeDataWarehouseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { - return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName, context) - .last() + private Mono upgradeDataWarehouseAsync(String resourceGroupName, String serverName, String databaseName, + Context context) { + return beginUpgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3477,9 +2931,9 @@ public void upgradeDataWarehouse(String resourceGroupName, String serverName, St /** * Upgrades a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to be upgraded. * @param context The context to associate with this operation. @@ -3488,32 +2942,30 @@ public void upgradeDataWarehouse(String resourceGroupName, String serverName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void upgradeDataWarehouse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public void upgradeDataWarehouse(String resourceGroupName, String serverName, String databaseName, + Context context) { upgradeDataWarehouseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of databases in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3527,42 +2979,23 @@ private Mono> listByElasticPoolSinglePageAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByElasticPool( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -3570,16 +3003,14 @@ private Mono> listByElasticPoolSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of databases in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3593,39 +3024,23 @@ private Mono> listByElasticPoolSinglePageAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByElasticPool( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3634,18 +3049,17 @@ private Mono> listByElasticPoolSinglePageAsync( * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName) { - return new PagedFlux<>( - () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), + public PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName) { + return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); } /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -3655,8 +3069,8 @@ public PagedFlux listByElasticPoolAsync( * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { return new PagedFlux<>( () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName, context), nextLink -> listByElasticPoolNextSinglePageAsync(nextLink, context)); @@ -3664,9 +3078,9 @@ private PagedFlux listByElasticPoolAsync( /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3675,16 +3089,16 @@ private PagedFlux listByElasticPoolAsync( * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName) { + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName) { return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName)); } /** * Gets a list of databases in an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -3694,31 +3108,29 @@ public PagedIterable listByElasticPool( * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, context)); } /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listInaccessibleByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3728,57 +3140,37 @@ private Mono> listInaccessibleByServerSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listInaccessibleByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listInaccessibleByServer(this.client.getEndpoint(), resourceGroupName, + serverName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listInaccessibleByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3788,38 +3180,23 @@ private Mono> listInaccessibleByServerSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listInaccessibleByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listInaccessibleByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3828,16 +3205,15 @@ private Mono> listInaccessibleByServerSinglePageAsy */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3846,18 +3222,17 @@ public PagedFlux listInaccessibleByServerAsync(String resourceGro * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInaccessibleByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3871,9 +3246,9 @@ public PagedIterable listInaccessibleByServer(String resourceGrou /** * Gets a list of inaccessible databases in a logical server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3882,16 +3257,15 @@ public PagedIterable listInaccessibleByServer(String resourceGrou * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInaccessibleByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listInaccessibleByServerAsync(resourceGroupName, serverName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3903,31 +3277,21 @@ private Mono> listByServerNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -3940,31 +3304,20 @@ private Mono> listByServerNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3976,31 +3329,21 @@ private Mono> listByElasticPoolNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -4013,31 +3356,20 @@ private Mono> listByElasticPoolNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4049,32 +3381,22 @@ private Mono> listInaccessibleByServerNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -4082,29 +3404,19 @@ private Mono> listInaccessibleByServerNextSinglePag * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listInaccessibleByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java index c399658a0025a..b1975e04b37c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java @@ -36,22 +36,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeletedServersClient. */ +/** + * An instance of this class provides access to all the operations defined in DeletedServersClient. + */ public final class DeletedServersClientImpl implements DeletedServersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DeletedServersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DeletedServersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DeletedServersClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(DeletedServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DeletedServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -62,172 +68,115 @@ public final class DeletedServersClientImpl implements DeletedServersClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DeletedServersService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers" - + "/{deletedServerName}") - @ExpectedResponses({200}) + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("deletedServerName") String deletedServerName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers" - + "/{deletedServerName}/recover") - @ExpectedResponses({200, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("deletedServerName") String deletedServerName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> recover( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("deletedServerName") String deletedServerName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono>> recover(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("deletedServerName") String deletedServerName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all deleted servers in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all deleted servers in a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all deleted servers in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. @@ -239,7 +188,7 @@ public PagedFlux listAsync() { /** * Gets a list of all deleted servers in a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -248,13 +197,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all deleted servers in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. @@ -266,7 +215,7 @@ public PagedIterable list() { /** * Gets a list of all deleted servers in a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -280,108 +229,73 @@ public PagedIterable list(Context context) { /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of deleted servers for a location along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of deleted servers for a location along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Context context) { + private Mono> listByLocationSinglePageAsync(String locationName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -390,13 +304,13 @@ private Mono> listByLocationSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String locationName) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,14 +320,13 @@ public PagedFlux listByLocationAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String locationName, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, context), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -427,7 +340,7 @@ public PagedIterable listByLocation(String locationName) { /** * Gets a list of deleted servers for a location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -442,7 +355,7 @@ public PagedIterable listByLocation(String locationName, Con /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,10 +366,8 @@ public PagedIterable listByLocation(String locationName, Con @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String locationName, String deletedServerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -466,30 +377,19 @@ public Mono> getWithResponseAsync(String locationNa .error(new IllegalArgumentException("Parameter deletedServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - locationName, - deletedServerName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -499,13 +399,11 @@ public Mono> getWithResponseAsync(String locationNa * @return a deleted server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String deletedServerName, Context context) { + private Mono> getWithResponseAsync(String locationName, String deletedServerName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -515,27 +413,18 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter deletedServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - locationName, - deletedServerName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), locationName, deletedServerName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -550,7 +439,7 @@ public Mono getAsync(String locationName, String deletedServ /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -560,14 +449,14 @@ public Mono getAsync(String locationName, String deletedServ * @return a deleted server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String locationName, String deletedServerName, Context context) { + public Response getWithResponse(String locationName, String deletedServerName, + Context context) { return getWithResponseAsync(locationName, deletedServerName, context).block(); } /** * Gets a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -582,7 +471,7 @@ public DeletedServerInner get(String locationName, String deletedServerName) { /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -593,10 +482,8 @@ public DeletedServerInner get(String locationName, String deletedServerName) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> recoverWithResponseAsync(String locationName, String deletedServerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -606,30 +493,19 @@ public Mono>> recoverWithResponseAsync(String location .error(new IllegalArgumentException("Parameter deletedServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .recover( - this.client.getEndpoint(), - locationName, - deletedServerName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.recover(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -639,13 +515,11 @@ public Mono>> recoverWithResponseAsync(String location * @return a deleted server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> recoverWithResponseAsync( - String locationName, String deletedServerName, Context context) { + private Mono>> recoverWithResponseAsync(String locationName, String deletedServerName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -655,27 +529,18 @@ private Mono>> recoverWithResponseAsync( .error(new IllegalArgumentException("Parameter deletedServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .recover( - this.client.getEndpoint(), - locationName, - deletedServerName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.recover(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -684,22 +549,16 @@ private Mono>> recoverWithResponseAsync( * @return the {@link PollerFlux} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DeletedServerInner> beginRecoverAsync( - String locationName, String deletedServerName) { + public PollerFlux, DeletedServerInner> beginRecoverAsync(String locationName, + String deletedServerName) { Mono>> mono = recoverWithResponseAsync(locationName, deletedServerName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DeletedServerInner.class, - DeletedServerInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeletedServerInner.class, DeletedServerInner.class, this.client.getContext()); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -709,19 +568,17 @@ public PollerFlux, DeletedServerInner> beginRecov * @return the {@link PollerFlux} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DeletedServerInner> beginRecoverAsync( - String locationName, String deletedServerName, Context context) { + private PollerFlux, DeletedServerInner> beginRecoverAsync(String locationName, + String deletedServerName, Context context) { context = this.client.mergeContext(context); Mono>> mono = recoverWithResponseAsync(locationName, deletedServerName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DeletedServerInner.class, DeletedServerInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DeletedServerInner.class, DeletedServerInner.class, context); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -730,14 +587,14 @@ private PollerFlux, DeletedServerInner> beginReco * @return the {@link SyncPoller} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeletedServerInner> beginRecover( - String locationName, String deletedServerName) { - return beginRecoverAsync(locationName, deletedServerName).getSyncPoller(); + public SyncPoller, DeletedServerInner> beginRecover(String locationName, + String deletedServerName) { + return this.beginRecoverAsync(locationName, deletedServerName).getSyncPoller(); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -747,14 +604,14 @@ public SyncPoller, DeletedServerInner> beginRecov * @return the {@link SyncPoller} for polling of a deleted server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DeletedServerInner> beginRecover( - String locationName, String deletedServerName, Context context) { - return beginRecoverAsync(locationName, deletedServerName, context).getSyncPoller(); + public SyncPoller, DeletedServerInner> beginRecover(String locationName, + String deletedServerName, Context context) { + return this.beginRecoverAsync(locationName, deletedServerName, context).getSyncPoller(); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -769,7 +626,7 @@ public Mono recoverAsync(String locationName, String deleted /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -780,14 +637,13 @@ public Mono recoverAsync(String locationName, String deleted */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono recoverAsync(String locationName, String deletedServerName, Context context) { - return beginRecoverAsync(locationName, deletedServerName, context) - .last() + return beginRecoverAsync(locationName, deletedServerName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -802,7 +658,7 @@ public DeletedServerInner recover(String locationName, String deletedServerName) /** * Recovers a deleted server. - * + * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. * @param context The context to associate with this operation. @@ -818,9 +674,8 @@ public DeletedServerInner recover(String locationName, String deletedServerName, /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -832,31 +687,20 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -869,31 +713,20 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -905,31 +738,21 @@ private Mono> listByLocationNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -937,29 +760,19 @@ private Mono> listByLocationNextSinglePageAsyn * @return a list of deleted servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java index 4ca8cb4c41837..c7fba278143e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java @@ -39,26 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DistributedAvailabilityGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in DistributedAvailabilityGroupsClient. + */ public final class DistributedAvailabilityGroupsClientImpl implements DistributedAvailabilityGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DistributedAvailabilityGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of DistributedAvailabilityGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DistributedAvailabilityGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - DistributedAvailabilityGroupsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(DistributedAvailabilityGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,121 +71,89 @@ public final class DistributedAvailabilityGroupsClientImpl implements Distribute @Host("{$host}") @ServiceInterface(name = "SqlManagementClientD") public interface DistributedAvailabilityGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/distributedAvailabilityGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/distributedAvailabilityGroups" - + "/{distributedAvailabilityGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/distributedAvailabilityGroups" - + "/{distributedAvailabilityGroupName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/distributedAvailabilityGroups" - + "/{distributedAvailabilityGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/distributedAvailabilityGroups" - + "/{distributedAvailabilityGroupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of a distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -194,57 +164,37 @@ private Mono> listByInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of a distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -255,38 +205,23 @@ private Mono> listByInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -294,18 +229,17 @@ private Mono> listByInstanceSin * @return a list of a distributed availability groups in instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,18 +248,17 @@ public PagedFlux listByInstanceAsync( * @return a list of a distributed availability groups in instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -333,16 +266,16 @@ private PagedFlux listByInstanceAsync( * @return a list of a distributed availability groups in instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of a distributed availability groups in instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,32 +284,30 @@ public PagedIterable listByInstance( * @return a list of a distributed availability groups in instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 distributed availability group info along with {@link Response} on successful completion of {@link - * Mono}. + * @return a distributed availability group info along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -387,59 +318,41 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a distributed availability group info along with {@link Response} on successful completion of {@link - * Mono}. + * @return a distributed availability group info along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -450,36 +363,25 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -488,17 +390,17 @@ private Mono> getWithResponseAsync( * @return a distributed availability group info on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -508,20 +410,17 @@ public Mono getAsync( * @return a distributed availability group info along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) .block(); } /** * Gets a distributed availability group info. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -530,17 +429,17 @@ public Response getWithResponse( * @return a distributed availability group info. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner get( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { + public DistributedAvailabilityGroupInner get(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { return getWithResponse(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, Context.NONE) .getValue(); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -548,19 +447,15 @@ public DistributedAvailabilityGroupInner 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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -571,16 +466,12 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -589,27 +480,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, distributedAvailabilityGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -618,20 +499,15 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -642,16 +518,12 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -660,24 +532,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -685,33 +549,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DistributedAvailabilityGroupInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, + DistributedAvailabilityGroupInner.class, this.client.getContext()); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -720,35 +575,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DistributedAvailabilityGroupInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, + DistributedAvailabilityGroupInner.class, context); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -756,25 +601,23 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DistributedAvailabilityGroupInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, + parameters) .getSyncPoller(); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -783,52 +626,45 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DistributedAvailabilityGroupInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, + parameters, context) .getSyncPoller(); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -836,27 +672,22 @@ public 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 distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -866,20 +697,17 @@ private Mono createOrUpdateAsync( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { + public DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .block(); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -890,22 +718,17 @@ public DistributedAvailabilityGroupInner createOrUpdate( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) - .block(); + public DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + context).block(); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -914,13 +737,11 @@ public DistributedAvailabilityGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -931,37 +752,25 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -971,16 +780,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -991,34 +795,23 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1027,21 +820,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -1051,24 +842,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1077,17 +864,17 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) .getSyncPoller(); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -1097,20 +884,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) .getSyncPoller(); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1119,18 +903,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) - .last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -1140,11 +923,8 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - Context context) { + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1152,9 +932,9 @@ private Mono deleteAsync( /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1168,9 +948,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -1179,19 +959,16 @@ public void delete(String resourceGroupName, String managedInstanceName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + public void delete(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, Context context) { deleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context).block(); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1199,19 +976,15 @@ 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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1222,16 +995,12 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1240,27 +1009,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1269,20 +1028,15 @@ public Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1293,16 +1047,12 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (distributedAvailabilityGroupName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter distributedAvailabilityGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1311,24 +1061,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - distributedAvailabilityGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1336,33 +1078,24 @@ private Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DistributedAvailabilityGroupInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, - this.client.getContext()); + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, + DistributedAvailabilityGroupInner.class, this.client.getContext()); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1371,35 +1104,25 @@ private Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DistributedAvailabilityGroupInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, - context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, + DistributedAvailabilityGroupInner.class, context); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1407,23 +1130,22 @@ private Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + return this + .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .getSyncPoller(); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1432,40 +1154,35 @@ public SyncPoller, DistributedAvai * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) + String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { + return this + .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + context) .getSyncPoller(); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1473,9 +1190,9 @@ public Mono updateAsync( /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1483,27 +1200,21 @@ public 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 distributed availability group between box and Sql Managed Instance on successful completion of {@link - * Mono}. + * @return distributed availability group between box and Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1513,20 +1224,17 @@ private Mono updateAsync( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner update( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { + public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .block(); } /** * Updates a distributed availability group replication mode. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -1537,27 +1245,21 @@ public DistributedAvailabilityGroupInner update( * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner update( - String resourceGroupName, - String managedInstanceName, - String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, - Context context) { - return updateAsync( - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) - .block(); + public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -1565,62 +1267,42 @@ private Mono> listByInstanceNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java index 374532b62635c..ba81ffff43b15 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java @@ -32,23 +32,28 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ElasticPoolOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ElasticPoolOperationsClient. + */ public final class ElasticPoolOperationsClientImpl implements ElasticPoolOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ElasticPoolOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ElasticPoolOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ElasticPoolOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ElasticPoolOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ElasticPoolOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -59,70 +64,53 @@ public final class ElasticPoolOperationsClientImpl implements ElasticPoolOperati @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface ElasticPoolOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}/operations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByElasticPool( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByElasticPool(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("operationId") UUID operationId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> cancel(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByElasticPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the elastic pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -136,42 +124,23 @@ private Mono> listByElasticPoolSinglePa .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByElasticPool( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param context The context to associate with this operation. @@ -179,16 +148,14 @@ private Mono> listByElasticPoolSinglePa * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the elastic pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -202,39 +169,23 @@ private Mono> listByElasticPoolSinglePa .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByElasticPool( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,18 +194,17 @@ private Mono> listByElasticPoolSinglePa * @return a list of operations performed on the elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName) { - return new PagedFlux<>( - () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), + public PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName) { + return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); } /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param context The context to associate with this operation. @@ -264,8 +214,8 @@ public PagedFlux listByElasticPoolAsync( * @return a list of operations performed on the elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByElasticPoolAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { return new PagedFlux<>( () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName, context), nextLink -> listByElasticPoolNextSinglePageAsync(nextLink, context)); @@ -273,9 +223,9 @@ private PagedFlux listByElasticPoolAsync( /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,16 +234,16 @@ private PagedFlux listByElasticPoolAsync( * @return a list of operations performed on the elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName) { + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName) { return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName)); } /** * Gets a list of operations performed on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param context The context to associate with this operation. @@ -303,16 +253,16 @@ public PagedIterable listByElasticPool( * @return a list of operations performed on the elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, context)); } /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -322,13 +272,11 @@ public PagedIterable listByElasticPool( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, UUID operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -345,32 +293,20 @@ public Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -381,13 +317,11 @@ public Mono> cancelWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId, Context context) { + private Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, UUID operationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -404,29 +338,19 @@ private Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -436,17 +360,17 @@ private Mono> cancelWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelAsync( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId) { + public Mono cancelAsync(String resourceGroupName, String serverName, String elasticPoolName, + UUID operationId) { return cancelWithResponseAsync(resourceGroupName, serverName, elasticPoolName, operationId) .flatMap(ignored -> Mono.empty()); } /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -457,16 +381,16 @@ public Mono cancelAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String serverName, String elasticPoolName, UUID operationId, Context context) { + public Response cancelWithResponse(String resourceGroupName, String serverName, String elasticPoolName, + UUID operationId, Context context) { return cancelWithResponseAsync(resourceGroupName, serverName, elasticPoolName, operationId, context).block(); } /** * Cancels the asynchronous operation on the elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. @@ -481,14 +405,13 @@ public void cancel(String resourceGroupName, String serverName, String elasticPo /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list elastic pool operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByElasticPoolNextSinglePageAsync(String nextLink) { @@ -496,62 +419,42 @@ private Mono> listByElasticPoolNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list elastic pool operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByElasticPoolNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java index 84eca3d0ba1af..cbd813e48011a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java @@ -41,22 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ElasticPoolsClient. */ +/** + * An instance of this class provides access to all the operations defined in ElasticPoolsClient. + */ public final class ElasticPoolsClientImpl implements ElasticPoolsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ElasticPoolsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ElasticPoolsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ElasticPoolsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ElasticPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ElasticPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,118 +73,76 @@ public final class ElasticPoolsClientImpl implements ElasticPoolsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface ElasticPoolsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @QueryParam("$skip") Long skip, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @QueryParam("$skip") Long skip, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ElasticPoolInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ElasticPoolInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ElasticPoolUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/elasticPools/{elasticPoolName}/failover") - @ExpectedResponses({200, 202}) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ElasticPoolUpdate parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono>> failover(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -187,13 +151,11 @@ Mono> listByServerNext( * @return all elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Long skip) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Long skip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,42 +165,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - skip, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skip, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @param context The context to associate with this operation. @@ -248,13 +191,11 @@ private Mono> listByServerSinglePageAsync( * @return all elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Long skip, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Long skip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -264,39 +205,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - skip, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skip, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -306,16 +231,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -325,16 +249,15 @@ public PagedFlux listByServerAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { final Long skip = null; - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @param context The context to associate with this operation. @@ -344,18 +267,17 @@ public PagedFlux listByServerAsync(String resourceGroupName, S * @return all elastic pools in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Long skip, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, skip, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -370,9 +292,9 @@ public PagedIterable listByServer(String resourceGroupName, St /** * Gets all elastic pools in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param skip The number of elements in the collection to skip. * @param context The context to associate with this operation. @@ -382,16 +304,16 @@ public PagedIterable listByServer(String resourceGroupName, St * @return all elastic pools in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Long skip, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skip, context)); } /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -400,13 +322,11 @@ public PagedIterable listByServer( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -420,33 +340,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -456,13 +364,11 @@ public Mono> getWithResponseAsync( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -476,30 +382,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -515,9 +411,9 @@ public Mono getAsync(String resourceGroupName, String serverNa /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -527,16 +423,16 @@ public Mono getAsync(String resourceGroupName, String serverNa * @return an elastic pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context).block(); } /** * Gets an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -551,9 +447,9 @@ public ElasticPoolInner get(String resourceGroupName, String serverName, String /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -563,13 +459,11 @@ public ElasticPoolInner get(String resourceGroupName, String serverName, String * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -583,10 +477,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -595,27 +487,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -626,17 +508,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -650,10 +526,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -662,24 +536,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -689,25 +554,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ElasticPoolInner.class, - ElasticPoolInner.class, - this.client.getContext()); + public PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, this.client.getContext()); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -719,25 +578,20 @@ public PollerFlux, ElasticPoolInner> beginCreateOrU */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, + String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ElasticPoolInner.class, ElasticPoolInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, context); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -747,16 +601,17 @@ private PollerFlux, ElasticPoolInner> beginCreateOr * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).getSyncPoller(); + public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters) + .getSyncPoller(); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -767,21 +622,17 @@ public SyncPoller, ElasticPoolInner> beginCreateOrU * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) + public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) .getSyncPoller(); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -791,18 +642,17 @@ public SyncPoller, ElasticPoolInner> beginCreateOrU * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -813,22 +663,17 @@ public Mono createOrUpdateAsync( * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -838,16 +683,16 @@ private Mono createOrUpdateAsync( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner createOrUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters) { + public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); } /** * Creates or updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -858,20 +703,16 @@ public ElasticPoolInner createOrUpdate( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner createOrUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolInner parameters, - Context context) { + public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -880,13 +721,11 @@ public ElasticPoolInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -900,31 +739,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -934,13 +762,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -954,28 +780,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -984,20 +801,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String elasticPoolName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, elasticPoolName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1007,21 +822,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1030,16 +844,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String elasticPoolName) { - return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String elasticPoolName) { + return this.beginDeleteAsync(resourceGroupName, serverName, elasticPoolName).getSyncPoller(); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1049,16 +863,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, elasticPoolName, context).getSyncPoller(); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1068,16 +882,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String elasticPoolName) { - return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1087,18 +900,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String elasticPoolName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, elasticPoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1112,9 +924,9 @@ public void delete(String resourceGroupName, String serverName, String elasticPo /** * Deletes an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1129,9 +941,9 @@ public void delete(String resourceGroupName, String serverName, String elasticPo /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1141,13 +953,11 @@ public void delete(String resourceGroupName, String serverName, String elasticPo * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1161,10 +971,8 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1174,26 +982,16 @@ public Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1204,17 +1002,11 @@ public Mono>> updateWithResponseAsync( * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1228,10 +1020,8 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1240,24 +1030,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1267,25 +1048,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ElasticPoolInner> beginUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ElasticPoolInner.class, - ElasticPoolInner.class, - this.client.getContext()); + public PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, this.client.getContext()); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1296,26 +1071,20 @@ public PollerFlux, ElasticPoolInner> beginUpdateAsy * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ElasticPoolInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context) { + private PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ElasticPoolInner.class, ElasticPoolInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, context); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1325,16 +1094,16 @@ private PollerFlux, ElasticPoolInner> beginUpdateAs * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginUpdate( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).getSyncPoller(); + public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).getSyncPoller(); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1345,20 +1114,17 @@ public SyncPoller, ElasticPoolInner> beginUpdate( * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginUpdate( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).getSyncPoller(); + public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) + .getSyncPoller(); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1368,18 +1134,17 @@ public SyncPoller, ElasticPoolInner> beginUpdate( * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1390,22 +1155,17 @@ public Mono updateAsync( * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1415,16 +1175,16 @@ private Mono updateAsync( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner update( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters) { return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); } /** * Updates an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool update parameters. @@ -1435,20 +1195,16 @@ public ElasticPoolInner update( * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner update( - String resourceGroupName, - String serverName, - String elasticPoolName, - ElasticPoolUpdate parameters, - Context context) { + public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context) { return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1457,13 +1213,11 @@ public ElasticPoolInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1477,31 +1231,20 @@ public Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -1511,13 +1254,11 @@ public Mono>> failoverWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1531,28 +1272,19 @@ private Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter elasticPoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - elasticPoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1561,21 +1293,19 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String elasticPoolName) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, elasticPoolName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String elasticPoolName) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, elasticPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -1585,21 +1315,20 @@ public PollerFlux, Void> beginFailoverAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { + private PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1608,16 +1337,16 @@ private PollerFlux, Void> beginFailoverAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String elasticPoolName) { - return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName).getSyncPoller(); + public SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String elasticPoolName) { + return this.beginFailoverAsync(resourceGroupName, serverName, elasticPoolName).getSyncPoller(); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -1627,16 +1356,16 @@ public SyncPoller, Void> beginFailover( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginFailover( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName, context).getSyncPoller(); + public SyncPoller, Void> beginFailover(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { + return this.beginFailoverAsync(resourceGroupName, serverName, elasticPoolName, context).getSyncPoller(); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1646,16 +1375,15 @@ public SyncPoller, Void> beginFailover( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono failoverAsync(String resourceGroupName, String serverName, String elasticPoolName) { - return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName) - .last() + return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -1665,18 +1393,17 @@ public Mono failoverAsync(String resourceGroupName, String serverName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String serverName, String elasticPoolName, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName, context) - .last() + private Mono failoverAsync(String resourceGroupName, String serverName, String elasticPoolName, + Context context) { + return beginFailoverAsync(resourceGroupName, serverName, elasticPoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1690,9 +1417,9 @@ public void failover(String resourceGroupName, String serverName, String elastic /** * Failovers an elastic pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool to failover. * @param context The context to associate with this operation. @@ -1707,14 +1434,13 @@ public void failover(String resourceGroupName, String serverName, String elastic /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of an elastic pool list request along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1722,37 +1448,27 @@ private Mono> listByServerNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 result of an elastic pool list request along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { @@ -1760,23 +1476,13 @@ private Mono> listByServerNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java index c24cdf05b642e..c2349bc235049 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java @@ -39,23 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. */ +/** + * An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. + */ public final class EncryptionProtectorsClientImpl implements EncryptionProtectorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final EncryptionProtectorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of EncryptionProtectorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ EncryptionProtectorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(EncryptionProtectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(EncryptionProtectorsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,100 +71,73 @@ public final class EncryptionProtectorsClientImpl implements EncryptionProtector @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface EncryptionProtectorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/encryptionProtector") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EncryptionProtectorInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EncryptionProtectorInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revalidate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> revalidate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server encryption protectors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,57 +147,37 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server encryption protectors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -229,38 +187,23 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -269,16 +212,15 @@ private Mono> listByServerSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,18 +229,17 @@ public PagedFlux listByServerAsync(String resourceGrou * @return a list of server encryption protectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,9 +253,9 @@ public PagedIterable listByServer(String resourceGroup /** * Gets a list of server encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,16 +264,16 @@ public PagedIterable listByServer(String resourceGroup * @return a list of server encryption protectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,13 +282,11 @@ public PagedIterable listByServer( * @return a server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,38 +296,25 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -398,13 +324,11 @@ public Mono> getWithResponseAsync( * @return a server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -414,35 +338,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,17 +364,17 @@ private Mono> getWithResponseAsync( * @return a server encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { + public Mono getAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { return getWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -471,16 +384,16 @@ public Mono getAsync( * @return a server encryption protector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName, context).block(); } /** * Gets a server encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,16 +402,16 @@ public Response getWithResponse( * @return a server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EncryptionProtectorInner get( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { + public EncryptionProtectorInner get(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { return getWithResponse(resourceGroupName, serverName, encryptionProtectorName, Context.NONE).getValue(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -508,16 +421,11 @@ public EncryptionProtectorInner get( * @return the server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -527,15 +435,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -544,27 +449,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -575,17 +470,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return the server encryption protector along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -595,15 +485,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -612,24 +499,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -640,27 +518,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, EncryptionProtectorInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - EncryptionProtectorInner.class, - EncryptionProtectorInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EncryptionProtectorInner.class, EncryptionProtectorInner.class, + this.client.getContext()); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -672,30 +543,20 @@ public PollerFlux, EncryptionProtectorInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, EncryptionProtectorInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context) { + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, + EncryptionProtectorInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, encryptionProtectorName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - EncryptionProtectorInner.class, - EncryptionProtectorInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + encryptionProtectorName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EncryptionProtectorInner.class, EncryptionProtectorInner.class, context); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -706,19 +567,17 @@ private PollerFlux, EncryptionProtectorInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters) .getSyncPoller(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -730,20 +589,18 @@ public SyncPoller, EncryptionProtectorInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EncryptionProtectorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters, context) + String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, + EncryptionProtectorInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters, context) .getSyncPoller(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -753,21 +610,17 @@ public SyncPoller, EncryptionProtectorInner * @return the server encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -778,12 +631,8 @@ public Mono createOrUpdateAsync( * @return the server encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -791,9 +640,9 @@ private Mono createOrUpdateAsync( /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -803,19 +652,16 @@ private Mono createOrUpdateAsync( * @return the server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters) { + public EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters).block(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -826,20 +672,16 @@ public EncryptionProtectorInner createOrUpdate( * @return the server encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String serverName, - EncryptionProtectorName encryptionProtectorName, - EncryptionProtectorInner parameters, - Context context) { + public EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters, context).block(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -848,13 +690,11 @@ public EncryptionProtectorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> revalidateWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { + public Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -864,36 +704,24 @@ public Mono>> revalidateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .revalidate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.revalidate(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -903,13 +731,11 @@ public Mono>> revalidateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revalidateWithResponseAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { + private Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -919,33 +745,23 @@ private Mono>> revalidateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .revalidate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.revalidate(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -954,21 +770,19 @@ private Mono>> revalidateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { - Mono>> mono = - revalidateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { + Mono>> mono + = revalidateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -978,21 +792,20 @@ public PollerFlux, Void> beginRevalidateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { + private PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - revalidateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = revalidateWithResponseAsync(resourceGroupName, serverName, encryptionProtectorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1001,16 +814,16 @@ private PollerFlux, Void> beginRevalidateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { - return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName).getSyncPoller(); + public SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { + return this.beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName).getSyncPoller(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1020,16 +833,17 @@ public SyncPoller, Void> beginRevalidate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { - return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName, context).getSyncPoller(); + public SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { + return this.beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName, context) + .getSyncPoller(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1038,18 +852,17 @@ public SyncPoller, Void> beginRevalidate( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono revalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { - return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName) - .last() + public Mono revalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { + return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1059,18 +872,17 @@ public Mono revalidateAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revalidateAsync( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { - return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName, context) - .last() + private Mono revalidateAsync(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName, Context context) { + return beginRevalidateAsync(resourceGroupName, serverName, encryptionProtectorName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1078,16 +890,16 @@ private Mono revalidateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName) { + public void revalidate(String resourceGroupName, String serverName, + EncryptionProtectorName encryptionProtectorName) { revalidateAsync(resourceGroupName, serverName, encryptionProtectorName).block(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1096,21 +908,20 @@ public void revalidate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate( - String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, Context context) { + public void revalidate(String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, + Context context) { revalidateAsync(resourceGroupName, serverName, encryptionProtectorName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server encryption protectors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1118,62 +929,42 @@ private Mono> listByServerNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server encryption protectors along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java index e0ad5b8322a3f..d8e750985f510 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.sql.models.EndpointCertificateListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in EndpointCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in EndpointCertificatesClient. + */ public final class EndpointCertificatesClientImpl implements EndpointCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final EndpointCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of EndpointCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ EndpointCertificatesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(EndpointCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(EndpointCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,68 +62,53 @@ public final class EndpointCertificatesClientImpl implements EndpointCertificate @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface EndpointCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/endpointCertificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("endpointType") String endpointType, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointType") String endpointType, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -129,57 +119,37 @@ private Mono> listByInstanceSinglePageAs .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,38 +160,23 @@ private Mono> listByInstanceSinglePageAs .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,18 +184,17 @@ private Mono> listByInstanceSinglePageAs * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,18 +203,17 @@ public PagedFlux listByInstanceAsync( * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -268,16 +221,16 @@ private PagedFlux listByInstanceAsync( * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * List certificates used on endpoints on the target instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,32 +239,30 @@ public PagedIterable listByInstance( * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String endpointType) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String endpointType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -325,33 +276,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - endpointType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + endpointType, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @param context The context to associate with this operation. @@ -359,16 +298,14 @@ public 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 certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String endpointType, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String endpointType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,30 +319,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter endpointType is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - endpointType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, endpointType, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,17 +341,17 @@ private Mono> getWithResponseAsync( * @return a certificate used on the endpoint with the given id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String endpointType) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String endpointType) { return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @param context The context to associate with this operation. @@ -434,16 +361,16 @@ public Mono getAsync( * @return a certificate used on the endpoint with the given id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String endpointType, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String endpointType, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType, context).block(); } /** * Gets a certificate used on the endpoint with the given id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,14 +385,13 @@ public EndpointCertificateInner get(String resourceGroupName, String managedInst /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -473,62 +399,42 @@ private Mono> listByInstanceNextSinglePa return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java index a655c903e04fe..1182140d7ecde 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java @@ -38,24 +38,24 @@ */ public final class ExtendedDatabaseBlobAuditingPoliciesClientImpl implements ExtendedDatabaseBlobAuditingPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExtendedDatabaseBlobAuditingPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ExtendedDatabaseBlobAuditingPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExtendedDatabaseBlobAuditingPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ExtendedDatabaseBlobAuditingPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ExtendedDatabaseBlobAuditingPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,89 +66,66 @@ public final class ExtendedDatabaseBlobAuditingPoliciesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface ExtendedDatabaseBlobAuditingPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extendedAuditingSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtendedDatabaseBlobAuditingPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,42 +138,24 @@ private Mono> listByDatab return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -204,16 +163,14 @@ private Mono> listByDatab * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -226,39 +183,23 @@ private Mono> listByDatab return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,18 +208,17 @@ private Mono> listByDatab * @return a list of database extended auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -288,8 +228,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database extended auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -297,9 +237,9 @@ private PagedFlux listByDatabaseAsync( /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,16 +248,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Lists extended auditing settings of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -327,32 +267,30 @@ public PagedIterable listByDatabase( * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extended database's blob auditing policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,35 +303,22 @@ public Mono> getWithResponseAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -401,16 +326,14 @@ public Mono> getWithResponseAs * @throws 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 extended database's blob auditing policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -423,32 +346,21 @@ private Mono> getWithResponseA return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -457,17 +369,17 @@ private Mono> getWithResponseA * @return an extended database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -477,16 +389,16 @@ public Mono getAsync( * @return an extended database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,36 +407,32 @@ public Response getWithResponse( * @return an extended database's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedDatabaseBlobAuditingPolicyInner get( - String resourceGroupName, String serverName, String databaseName) { + public ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, + String databaseName) { return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extended database blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended database blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, + String resourceGroupName, String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -537,10 +445,8 @@ public Mono> createOrUpdateWit return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -550,28 +456,17 @@ public Mono> createOrUpdateWit final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -579,21 +474,16 @@ public Mono> createOrUpdateWit * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extended database blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended database blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, - Context context) { + String resourceGroupName, String serverName, String databaseName, + ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -606,10 +496,8 @@ private Mono> createOrUpdateWi return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -619,25 +507,16 @@ private Mono> createOrUpdateWi final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -647,20 +526,17 @@ private Mono> createOrUpdateWi * @return an extended database blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -671,21 +547,17 @@ public Mono createOrUpdateAsync( * @return an extended database blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context) .block(); } /** * Creates or updates an extended database's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The extended database blob auditing policy. @@ -695,89 +567,66 @@ public Response createOrUpdateWithRespo * @return an extended database blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - ExtendedDatabaseBlobAuditingPolicyInner parameters) { + public ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java index 5a5dc75af6297..b5120d487cd0e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java @@ -41,24 +41,24 @@ * An instance of this class provides access to all the operations defined in ExtendedServerBlobAuditingPoliciesClient. */ public final class ExtendedServerBlobAuditingPoliciesClientImpl implements ExtendedServerBlobAuditingPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExtendedServerBlobAuditingPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ExtendedServerBlobAuditingPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExtendedServerBlobAuditingPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ExtendedServerBlobAuditingPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ExtendedServerBlobAuditingPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,85 +69,63 @@ public final class ExtendedServerBlobAuditingPoliciesClientImpl implements Exten @Host("{$host}") @ServiceInterface(name = "SqlManagementClientE") public interface ExtendedServerBlobAuditingPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/extendedAuditingSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtendedServerBlobAuditingPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -157,57 +135,37 @@ private Mono> listByServerS return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -217,38 +175,23 @@ private Mono> listByServerS return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -256,18 +199,17 @@ private Mono> listByServerS * @return a list of server extended auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -276,18 +218,17 @@ public PagedFlux listByServerAsync( * @return a list of server extended auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -295,16 +236,16 @@ private PagedFlux listByServerAsync( * @return a list of server extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, + String serverName) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Lists extended auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -313,31 +254,29 @@ public PagedIterable listByServer( * @return a list of server extended auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extended server's blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server's blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -347,50 +286,36 @@ public Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended server's blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server's blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -400,31 +325,21 @@ private Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -438,9 +353,9 @@ public Mono getAsync(String resourceGroup /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,16 +364,16 @@ public Mono getAsync(String resourceGroup * @return an extended server's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, context).block(); } /** * Gets an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -472,25 +387,23 @@ public ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, Strin /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 extended server blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -500,10 +413,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -513,47 +424,32 @@ public Mono>> createOrUpdateWithResponseAsync( final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended server blob auditing policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return an extended server blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, ExtendedServerBlobAuditingPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -563,10 +459,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -576,24 +470,15 @@ private Mono>> createOrUpdateWithResponseAsync( final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,25 +488,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExtendedServerBlobAuditingPolicyInner.class, - ExtendedServerBlobAuditingPolicyInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ExtendedServerBlobAuditingPolicyInner.class, + ExtendedServerBlobAuditingPolicyInner.class, this.client.getContext()); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -632,29 +512,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExtendedServerBlobAuditingPolicyInner.class, - ExtendedServerBlobAuditingPolicyInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ExtendedServerBlobAuditingPolicyInner.class, + ExtendedServerBlobAuditingPolicyInner.class, context); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -664,16 +536,16 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + beginCreateOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -684,19 +556,16 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + beginCreateOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -705,18 +574,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an extended server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -726,21 +594,17 @@ public Mono createOrUpdateAsync( * @return an extended server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -749,16 +613,16 @@ private Mono createOrUpdateAsync( * @return an extended server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { + public ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); } /** * Creates or updates an extended server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. @@ -768,88 +632,64 @@ public ExtendedServerBlobAuditingPolicyInner createOrUpdate( * @return an extended server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { + public ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink) { + private Mono> + listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java index 4cb5f62bf5e6b..057cafb910195 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java @@ -41,22 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FailoverGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in FailoverGroupsClient. + */ public final class FailoverGroupsClientImpl implements FailoverGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FailoverGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of FailoverGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FailoverGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(FailoverGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(FailoverGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,134 +73,91 @@ public final class FailoverGroupsClientImpl implements FailoverGroupsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientF") public interface FailoverGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FailoverGroupInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FailoverGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FailoverGroupUpdate parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FailoverGroupUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}/failover") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> failover(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> forceFailoverAllowDataLoss( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> forceFailoverAllowDataLoss(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -202,13 +165,11 @@ Mono> listByServerNext( * @return a list of failover groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -218,41 +179,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,13 +204,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of failover groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -277,38 +218,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -317,16 +243,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,18 +260,17 @@ public PagedFlux listByServerAsync(String resourceGroupName, * @return a list of failover groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -360,9 +284,9 @@ public PagedIterable listByServer(String resourceGroupName, /** * Lists the failover groups in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -371,16 +295,16 @@ public PagedIterable listByServer(String resourceGroupName, * @return a list of failover groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -389,13 +313,11 @@ public PagedIterable listByServer( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,33 +331,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -445,13 +355,11 @@ public Mono> getWithResponseAsync( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -465,30 +373,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,9 +402,9 @@ public Mono getAsync(String resourceGroupName, String server /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -516,16 +414,16 @@ public Mono getAsync(String resourceGroupName, String server * @return a failover group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,9 +438,9 @@ public FailoverGroupInner get(String resourceGroupName, String serverName, Strin /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -552,13 +450,11 @@ public FailoverGroupInner get(String resourceGroupName, String serverName, Strin * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -572,10 +468,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -584,27 +478,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -615,17 +499,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -639,10 +517,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -651,24 +527,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -680,23 +547,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, FailoverGroupInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FailoverGroupInner.class, - FailoverGroupInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -708,25 +569,20 @@ public PollerFlux, FailoverGroupInner> beginCreat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FailoverGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, + String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, context); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -736,16 +592,17 @@ private PollerFlux, FailoverGroupInner> beginCrea * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters) + .getSyncPoller(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -756,21 +613,17 @@ public SyncPoller, FailoverGroupInner> beginCreat * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) + public SyncPoller, FailoverGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) .getSyncPoller(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -780,18 +633,17 @@ public SyncPoller, FailoverGroupInner> beginCreat * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -802,22 +654,17 @@ public Mono createOrUpdateAsync( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -827,16 +674,16 @@ private Mono createOrUpdateAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner createOrUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupInner parameters) { + public FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).block(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -847,20 +694,16 @@ public FailoverGroupInner createOrUpdate( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupInner parameters, - Context context) { + public FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).block(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -869,13 +712,11 @@ public FailoverGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -889,31 +730,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -923,13 +753,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -943,28 +771,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -973,21 +792,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String failoverGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -997,21 +814,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1020,16 +836,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String failoverGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName) { + return this.beginDeleteAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1039,16 +855,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1058,16 +874,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String failoverGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1077,18 +892,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String failoverGroupName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1102,9 +916,9 @@ public void delete(String resourceGroupName, String serverName, String failoverG /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1119,9 +933,9 @@ public void delete(String resourceGroupName, String serverName, String failoverG /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1131,13 +945,11 @@ public void delete(String resourceGroupName, String serverName, String failoverG * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1151,10 +963,8 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1164,26 +974,16 @@ public Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1194,17 +994,11 @@ public Mono>> updateWithResponseAsync( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1218,10 +1012,8 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1230,24 +1022,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1257,25 +1040,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginUpdateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FailoverGroupInner.class, - FailoverGroupInner.class, - this.client.getContext()); + public PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1286,26 +1063,20 @@ public PollerFlux, FailoverGroupInner> beginUpdat * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context) { + private PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, context); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1315,16 +1086,16 @@ private PollerFlux, FailoverGroupInner> beginUpda * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginUpdate( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).getSyncPoller(); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1335,20 +1106,17 @@ public SyncPoller, FailoverGroupInner> beginUpdat * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) + .getSyncPoller(); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1358,18 +1126,17 @@ public SyncPoller, FailoverGroupInner> beginUpdat * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1380,22 +1147,17 @@ public Mono updateAsync( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1405,16 +1167,16 @@ private Mono updateAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner update( - String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters) { return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters).block(); } /** * Updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -1425,20 +1187,16 @@ public FailoverGroupInner update( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner update( - String resourceGroupName, - String serverName, - String failoverGroupName, - FailoverGroupUpdate parameters, - Context context) { + public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context) { return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).block(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1447,13 +1205,11 @@ public FailoverGroupInner update( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1467,33 +1223,21 @@ public Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1503,13 +1247,11 @@ public Mono>> failoverWithResponseAsync( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1523,30 +1265,20 @@ private Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1555,25 +1287,19 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String serverName, String failoverGroupName) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FailoverGroupInner.class, - FailoverGroupInner.class, - this.client.getContext()); + public PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, + String serverName, String failoverGroupName) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1583,22 +1309,20 @@ public PollerFlux, FailoverGroupInner> beginFailo * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, + String serverName, String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, context); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1607,16 +1331,16 @@ private PollerFlux, FailoverGroupInner> beginFail * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginFailover( - String resourceGroupName, String serverName, String failoverGroupName) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName) { + return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1626,16 +1350,16 @@ public SyncPoller, FailoverGroupInner> beginFailo * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginFailover( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName, Context context) { + return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1644,18 +1368,17 @@ public SyncPoller, FailoverGroupInner> beginFailo * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync( - String resourceGroupName, String serverName, String failoverGroupName) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName) - .last() + public Mono failoverAsync(String resourceGroupName, String serverName, + String failoverGroupName) { + return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1665,18 +1388,17 @@ public Mono failoverAsync( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context) - .last() + private Mono failoverAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { + return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1691,9 +1413,9 @@ public FailoverGroupInner failover(String resourceGroupName, String serverName, /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1703,16 +1425,16 @@ public FailoverGroupInner failover(String resourceGroupName, String serverName, * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner failover( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + public FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName, + Context context) { return failoverAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1721,13 +1443,11 @@ public FailoverGroupInner failover( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName) { + public Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String serverName, String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1741,33 +1461,22 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .forceFailoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1777,13 +1486,11 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String serverName, String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1797,30 +1504,20 @@ private Mono>> forceFailoverAllowDataLossWithResponseA .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .forceFailoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - serverName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1829,25 +1526,19 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginForceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName) { - Mono>> mono = - forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FailoverGroupInner.class, - FailoverGroupInner.class, - this.client.getContext()); + public PollerFlux, FailoverGroupInner> + beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { + Mono>> mono + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1860,19 +1551,17 @@ public PollerFlux, FailoverGroupInner> beginForce private PollerFlux, FailoverGroupInner> beginForceFailoverAllowDataLossAsync( String resourceGroupName, String serverName, String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); + Mono>> mono + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FailoverGroupInner.class, FailoverGroupInner.class, context); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1881,16 +1570,17 @@ private PollerFlux, FailoverGroupInner> beginForc * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); + public SyncPoller, FailoverGroupInner> + beginForceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName) { + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName) + .getSyncPoller(); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1902,15 +1592,15 @@ public SyncPoller, FailoverGroupInner> beginForce @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss( String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context) + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context) .getSyncPoller(); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1919,18 +1609,17 @@ public SyncPoller, FailoverGroupInner> beginForce * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName) - .last() + public Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, + String failoverGroupName) { + return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1940,18 +1629,17 @@ public Mono forceFailoverAllowDataLossAsync( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context) - .last() + private Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { + return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1960,16 +1648,16 @@ private Mono forceFailoverAllowDataLossAsync( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName) { + public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, + String failoverGroupName) { return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).block(); } /** * Fails over from the current primary server to this server. This operation might result in data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1979,16 +1667,15 @@ public FailoverGroupInner forceFailoverAllowDataLoss( * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2000,31 +1687,21 @@ private Mono> listByServerNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2037,23 +1714,13 @@ private Mono> listByServerNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java index 766ba3b6f5f5c..52c97a7cbd761 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java @@ -34,22 +34,28 @@ import com.azure.resourcemanager.sql.models.FirewallRuleListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in FirewallRulesClient. + */ public final class FirewallRulesClientImpl implements FirewallRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FirewallRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of FirewallRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FirewallRulesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,101 +66,67 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientF") public interface FirewallRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/firewallRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/firewallRules") - @ExpectedResponses({200, 202}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> replace( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FirewallRuleList parameters, - @HeaderParam("Accept") String accept, + Mono> replace(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FirewallRuleList parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FirewallRuleInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({200, 204}) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") FirewallRuleInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -162,13 +134,11 @@ Mono> listByServerNext( * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -178,41 +148,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,13 +173,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -237,38 +187,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -277,16 +212,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,18 +229,17 @@ public PagedFlux listByServerAsync(String resourceGroupName, * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -320,9 +253,9 @@ public PagedIterable listByServer(String resourceGroupName, S /** * Gets a list of firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -337,24 +270,22 @@ public PagedIterable listByServer(String resourceGroupName, S /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> replaceWithResponseAsync( - String resourceGroupName, String serverName, FirewallRuleList parameters) { + public Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -364,10 +295,8 @@ public Mono> replaceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -376,28 +305,18 @@ public Mono> replaceWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .replace( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.replace(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -405,13 +324,11 @@ public Mono> replaceWithResponseAsync( * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replaceWithResponseAsync( - String resourceGroupName, String serverName, FirewallRuleList parameters, Context context) { + private Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -421,10 +338,8 @@ private Mono> replaceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -433,44 +348,36 @@ private Mono> replaceWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .replace( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.replace(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono replaceAsync( - String resourceGroupName, String serverName, FirewallRuleList parameters) { + public Mono replaceAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters) { return replaceWithResponseAsync(resourceGroupName, serverName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -478,18 +385,18 @@ public Mono replaceAsync( * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response replaceWithResponse( - String resourceGroupName, String serverName, FirewallRuleList parameters, Context context) { + public Response replaceWithResponse(String resourceGroupName, String serverName, + FirewallRuleList parameters, Context context) { return replaceWithResponseAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Replaces all firewall rules on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters A list of server firewall rules. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -502,9 +409,9 @@ public FirewallRuleInner replace(String resourceGroupName, String serverName, Fi /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -513,13 +420,11 @@ public FirewallRuleInner replace(String resourceGroupName, String serverName, Fi * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,33 +438,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -569,13 +462,11 @@ public Mono> getWithResponseAsync( * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -589,30 +480,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -628,9 +509,9 @@ public Mono getAsync(String resourceGroupName, String serverN /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -640,16 +521,16 @@ public Mono getAsync(String resourceGroupName, String serverN * @return a firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** * Gets a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -664,9 +545,9 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -676,13 +557,11 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, FirewallRuleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -696,10 +575,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -708,27 +585,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -739,17 +606,11 @@ public Mono> createOrUpdateWithResponseAsync( * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, FirewallRuleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -763,10 +624,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -775,24 +634,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -802,17 +652,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -823,21 +673,17 @@ public Mono createOrUpdateAsync( * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String firewallRuleName, - FirewallRuleInner parameters, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters, context) .block(); } /** * Creates or updates a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating a firewall rule. @@ -847,17 +693,17 @@ public Response createOrUpdateWithResponse( * @return a server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { + public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters) { return createOrUpdateWithResponse(resourceGroupName, serverName, firewallRuleName, parameters, Context.NONE) .getValue(); } /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -866,13 +712,11 @@ public FirewallRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -886,31 +730,20 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -920,13 +753,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -940,28 +771,19 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -977,9 +799,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -989,16 +811,16 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** * Deletes a firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1012,14 +834,13 @@ public void delete(String resourceGroupName, String serverName, String firewallR /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list firewall rules request along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1027,37 +848,27 @@ private Mono> listByServerNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list firewall rules request along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { @@ -1065,23 +876,13 @@ private Mono> listByServerNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java index 6928dbab6ec39..97d75921ea011 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. + */ public final class GeoBackupPoliciesClientImpl implements GeoBackupPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GeoBackupPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of GeoBackupPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GeoBackupPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(GeoBackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(GeoBackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,89 +65,66 @@ public final class GeoBackupPoliciesClientImpl implements GeoBackupPoliciesClien @Host("{$host}") @ServiceInterface(name = "SqlManagementClientG") public interface GeoBackupPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/geoBackupPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("geoBackupPolicyName") GeoBackupPolicyName geoBackupPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("geoBackupPolicyName") GeoBackupPolicyName geoBackupPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GeoBackupPolicyInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GeoBackupPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -154,42 +137,23 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -197,16 +161,14 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -219,88 +181,70 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedFlux}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, serverName, databaseName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedFlux}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, serverName, databaseName, context), + private PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedIterable}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String serverName, String databaseName) { @@ -309,29 +253,29 @@ public PagedIterable list(String resourceGroupName, String /** * Gets a list of Geo backup policies for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Geo backup policies for the given database resource as paginated response with {@link - * PagedIterable}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable list(String resourceGroupName, String serverName, String databaseName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -339,16 +283,14 @@ public PagedIterable 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 Geo backup policy for the given database resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,34 +307,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter geoBackupPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - geoBackupPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -401,20 +330,14 @@ public 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 Geo backup policy for the given database resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,31 +354,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter geoBackupPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - geoBackupPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, geoBackupPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -465,17 +377,17 @@ private Mono> getWithResponseAsync( * @return a Geo backup policy for the given database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -486,20 +398,16 @@ public Mono getAsync( * @return a Geo backup policy for the given database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, context).block(); } /** * Gets a Geo backup policy for the given database resource. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -509,17 +417,17 @@ public Response getWithResponse( * @return a Geo backup policy for the given database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GeoBackupPolicyInner get( - String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName) { + public GeoBackupPolicyInner get(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName) { return getWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, Context.NONE) .getValue(); } /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -530,17 +438,12 @@ public GeoBackupPolicyInner get( * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -557,10 +460,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter geoBackupPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -569,28 +470,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - geoBackupPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -602,18 +492,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, + GeoBackupPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -630,10 +514,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter geoBackupPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -642,25 +524,16 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - geoBackupPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -671,22 +544,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a Geo backup policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -698,23 +566,18 @@ public Mono createOrUpdateAsync( * @return a Geo backup policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters, + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, + parameters, context).block(); } /** * Create or update a database default Geo backup policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -725,27 +588,21 @@ public Response createOrUpdateWithResponse( * @return a Geo backup policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GeoBackupPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, Context.NONE) - .getValue(); + public GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 geo backup policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list of geo backup policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -753,37 +610,26 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 geo backup policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list of geo backup policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -791,23 +637,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java index e0563411e9b61..305455b747d56 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.sql.models.IPv6FirewallRuleListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in IPv6FirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in IPv6FirewallRulesClient. + */ public final class IPv6FirewallRulesClientImpl implements IPv6FirewallRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final IPv6FirewallRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of IPv6FirewallRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ IPv6FirewallRulesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(IPv6FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(IPv6FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,85 +65,58 @@ public final class IPv6FirewallRulesClientImpl implements IPv6FirewallRulesClien @Host("{$host}") @ServiceInterface(name = "SqlManagementClientI") public interface IPv6FirewallRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/ipv6FirewallRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/ipv6FirewallRules/{firewallRuleName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/ipv6FirewallRules/{firewallRuleName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") IPv6FirewallRuleInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") IPv6FirewallRuleInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/ipv6FirewallRules/{firewallRuleName}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -145,13 +124,11 @@ Mono> listByServerNext( * @return a list of IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,41 +138,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,13 +163,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,38 +177,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -260,16 +202,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,18 +219,17 @@ public PagedFlux listByServerAsync(String resourceGroupNa * @return a list of IPv6 firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -303,9 +243,9 @@ public PagedIterable listByServer(String resourceGroupNam /** * Gets a list of IPv6 firewall rules. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,16 +254,16 @@ public PagedIterable listByServer(String resourceGroupNam * @return a list of IPv6 firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -332,13 +272,11 @@ public PagedIterable listByServer( * @return an IPv6 firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -352,33 +290,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -388,13 +314,11 @@ public Mono> getWithResponseAsync( * @return an IPv6 firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -408,30 +332,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -447,9 +361,9 @@ public Mono getAsync(String resourceGroupName, String ser /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -459,16 +373,16 @@ public Mono getAsync(String resourceGroupName, String ser * @return an IPv6 firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** * Gets an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,9 +397,9 @@ public IPv6FirewallRuleInner get(String resourceGroupName, String serverName, St /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -495,13 +409,11 @@ public IPv6FirewallRuleInner get(String resourceGroupName, String serverName, St * @return an IPv6 server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -515,10 +427,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -527,27 +437,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -558,17 +458,11 @@ public Mono> createOrUpdateWithResponseAsync( * @return an IPv6 server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String firewallRuleName, - IPv6FirewallRuleInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -582,10 +476,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -594,24 +486,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -621,17 +504,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return an IPv6 server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String firewallRuleName, IPv6FirewallRuleInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -642,21 +525,17 @@ public Mono createOrUpdateAsync( * @return an IPv6 server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String firewallRuleName, - IPv6FirewallRuleInner parameters, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, IPv6FirewallRuleInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters, context) .block(); } /** * Creates or updates an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -666,17 +545,17 @@ public Response createOrUpdateWithResponse( * @return an IPv6 server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IPv6FirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String firewallRuleName, IPv6FirewallRuleInner parameters) { + public IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + IPv6FirewallRuleInner parameters) { return createOrUpdateWithResponse(resourceGroupName, serverName, firewallRuleName, parameters, Context.NONE) .getValue(); } /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -685,13 +564,11 @@ public IPv6FirewallRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -705,31 +582,20 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -739,13 +605,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -759,28 +623,19 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - firewallRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -796,9 +651,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -808,16 +663,16 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String firewallRuleName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** * Deletes an IPv6 firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -831,14 +686,13 @@ public void delete(String resourceGroupName, String serverName, String firewallR /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list IPv6 firewall rules request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -846,62 +700,42 @@ private Mono> listByServerNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list IPv6 firewall rules request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java index 17bf7686484b0..8f76cf19b383f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java @@ -39,23 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. + */ public final class InstanceFailoverGroupsClientImpl implements InstanceFailoverGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final InstanceFailoverGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of InstanceFailoverGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ InstanceFailoverGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(InstanceFailoverGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(InstanceFailoverGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,132 +71,93 @@ public final class InstanceFailoverGroupsClientImpl implements InstanceFailoverG @Host("{$host}") @ServiceInterface(name = "SqlManagementClientI") public interface InstanceFailoverGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups/{failoverGroupName}") - @ExpectedResponses({200}) + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups/{failoverGroupName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") InstanceFailoverGroupInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") InstanceFailoverGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups/{failoverGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> failover(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> forceFailoverAllowDataLoss( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> forceFailoverAllowDataLoss(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("failoverGroupName") String failoverGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName) { + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -201,57 +167,37 @@ private Mono> listByLocationSinglePage return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName, Context context) { + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -261,38 +207,23 @@ private Mono> listByLocationSinglePage return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -301,16 +232,15 @@ private Mono> listByLocationSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,18 +249,17 @@ public PagedFlux listByLocationAsync(String resource * @return a list of instance failover groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync( - String resourceGroupName, String locationName, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), + private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -344,9 +273,9 @@ public PagedIterable listByLocation(String resourceG /** * Lists the failover groups in a location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -355,16 +284,16 @@ public PagedIterable listByLocation(String resourceG * @return a list of instance failover groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation( - String resourceGroupName, String locationName, Context context) { + public PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context) { return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,13 +302,11 @@ public PagedIterable listByLocation( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -393,33 +320,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -429,13 +344,11 @@ public Mono> getWithResponseAsync( * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -449,30 +362,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -481,17 +384,17 @@ private Mono> getWithResponseAsync( * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String locationName, String failoverGroupName) { + public Mono getAsync(String resourceGroupName, String locationName, + String failoverGroupName) { return getWithResponseAsync(resourceGroupName, locationName, failoverGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -501,16 +404,16 @@ public Mono getAsync( * @return a failover group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { return getWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context).block(); } /** * Gets a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,9 +428,9 @@ public InstanceFailoverGroupInner get(String resourceGroupName, String locationN /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -537,16 +440,11 @@ public InstanceFailoverGroupInner get(String resourceGroupName, String locationN * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -560,10 +458,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -572,27 +468,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -603,17 +489,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -627,10 +507,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -639,24 +517,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -667,27 +536,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, InstanceFailoverGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, + String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, locationName, failoverGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, locationName, failoverGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, + this.client.getContext()); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -699,29 +561,20 @@ public PollerFlux, InstanceFailoverGroupI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InstanceFailoverGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, + String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, locationName, failoverGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, locationName, failoverGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, context); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -732,18 +585,17 @@ private PollerFlux, InstanceFailoverGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InstanceFailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, + String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters) + .getSyncPoller(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -755,20 +607,17 @@ public SyncPoller, InstanceFailoverGroupI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InstanceFailoverGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, + String resourceGroupName, String locationName, String failoverGroupName, InstanceFailoverGroupInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters, context) .getSyncPoller(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -778,21 +627,17 @@ public SyncPoller, InstanceFailoverGroupI * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -803,22 +648,17 @@ public Mono createOrUpdateAsync( * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -828,19 +668,16 @@ private Mono createOrUpdateAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner createOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters) { + public InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters).block(); } /** * Creates or updates a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -851,20 +688,16 @@ public InstanceFailoverGroupInner createOrUpdate( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner createOrUpdate( - String resourceGroupName, - String locationName, - String failoverGroupName, - InstanceFailoverGroupInner parameters, - Context context) { + public InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locationName, + String failoverGroupName, InstanceFailoverGroupInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters, context).block(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -873,13 +706,11 @@ public InstanceFailoverGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -893,31 +724,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -927,13 +747,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -947,28 +765,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -977,21 +786,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String failoverGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, locationName, failoverGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String failoverGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, locationName, failoverGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1001,21 +808,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1024,16 +830,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String failoverGroupName) { - return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String failoverGroupName) { + return this.beginDeleteAsync(resourceGroupName, locationName, failoverGroupName).getSyncPoller(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1043,16 +849,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, locationName, failoverGroupName, context).getSyncPoller(); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1062,16 +868,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String locationName, String failoverGroupName) { - return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName) - .last() + return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1081,18 +886,17 @@ public Mono deleteAsync(String resourceGroupName, String locationName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String locationName, String failoverGroupName, + Context context) { + return beginDeleteAsync(resourceGroupName, locationName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1106,9 +910,9 @@ public void delete(String resourceGroupName, String locationName, String failove /** * Deletes a failover group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1123,9 +927,9 @@ public void delete(String resourceGroupName, String locationName, String failove /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1134,13 +938,11 @@ public void delete(String resourceGroupName, String locationName, String failove * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1154,33 +956,21 @@ public Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1190,13 +980,11 @@ public Mono>> failoverWithResponseAsync( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1210,30 +998,20 @@ private Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1242,25 +1020,20 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, InstanceFailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String locationName, String failoverGroupName) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, locationName, failoverGroupName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - this.client.getContext()); + public PollerFlux, InstanceFailoverGroupInner> + beginFailoverAsync(String resourceGroupName, String locationName, String failoverGroupName) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, locationName, failoverGroupName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, + this.client.getContext()); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1270,26 +1043,20 @@ public PollerFlux, InstanceFailoverGroupI * @return the {@link PollerFlux} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InstanceFailoverGroupInner> beginFailoverAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private PollerFlux, InstanceFailoverGroupInner> + beginFailoverAsync(String resourceGroupName, String locationName, String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, context); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1298,16 +1065,16 @@ private PollerFlux, InstanceFailoverGroup * @return the {@link SyncPoller} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstanceFailoverGroupInner> beginFailover( - String resourceGroupName, String locationName, String failoverGroupName) { - return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName).getSyncPoller(); + public SyncPoller, InstanceFailoverGroupInner> + beginFailover(String resourceGroupName, String locationName, String failoverGroupName) { + return this.beginFailoverAsync(resourceGroupName, locationName, failoverGroupName).getSyncPoller(); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1317,16 +1084,16 @@ public SyncPoller, InstanceFailoverGroupI * @return the {@link SyncPoller} for polling of an instance failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstanceFailoverGroupInner> beginFailover( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName, context).getSyncPoller(); + public SyncPoller, InstanceFailoverGroupInner> + beginFailover(String resourceGroupName, String locationName, String failoverGroupName, Context context) { + return this.beginFailoverAsync(resourceGroupName, locationName, failoverGroupName, context).getSyncPoller(); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1335,18 +1102,17 @@ public SyncPoller, InstanceFailoverGroupI * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync( - String resourceGroupName, String locationName, String failoverGroupName) { - return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName) - .last() + public Mono failoverAsync(String resourceGroupName, String locationName, + String failoverGroupName) { + return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1356,18 +1122,17 @@ public Mono failoverAsync( * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName, context) - .last() + private Mono failoverAsync(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { + return beginFailoverAsync(resourceGroupName, locationName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1376,16 +1141,16 @@ private Mono failoverAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner failover( - String resourceGroupName, String locationName, String failoverGroupName) { + public InstanceFailoverGroupInner failover(String resourceGroupName, String locationName, + String failoverGroupName) { return failoverAsync(resourceGroupName, locationName, failoverGroupName).block(); } /** * Fails over from the current primary managed instance to this managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1395,17 +1160,17 @@ public InstanceFailoverGroupInner failover( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner failover( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + public InstanceFailoverGroupInner failover(String resourceGroupName, String locationName, String failoverGroupName, + Context context) { return failoverAsync(resourceGroupName, locationName, failoverGroupName, context).block(); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1414,13 +1179,11 @@ public InstanceFailoverGroupInner failover( * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName) { + public Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1434,34 +1197,23 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .forceFailoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, + locationName, failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1471,13 +1223,11 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs * @return an instance failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> forceFailoverAllowDataLossWithResponseAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + private Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, + String locationName, String failoverGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1491,31 +1241,21 @@ private Mono>> forceFailoverAllowDataLossWithResponseA .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .forceFailoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - locationName, - failoverGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1526,24 +1266,19 @@ private Mono>> forceFailoverAllowDataLossWithResponseA @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, InstanceFailoverGroupInner> beginForceFailoverAllowDataLossAsync(String resourceGroupName, String locationName, String failoverGroupName) { - Mono>> mono = - forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, locationName, failoverGroupName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - this.client.getContext()); + Mono>> mono + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, locationName, failoverGroupName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, + this.client.getContext()); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1554,27 +1289,21 @@ private Mono>> forceFailoverAllowDataLossWithResponseA */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InstanceFailoverGroupInner> - beginForceFailoverAllowDataLossAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + beginForceFailoverAllowDataLossAsync(String resourceGroupName, String locationName, String failoverGroupName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstanceFailoverGroupInner.class, - InstanceFailoverGroupInner.class, - context); + Mono>> mono + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, locationName, failoverGroupName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InstanceFailoverGroupInner.class, InstanceFailoverGroupInner.class, context); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1585,15 +1314,16 @@ private Mono>> forceFailoverAllowDataLossWithResponseA @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InstanceFailoverGroupInner> beginForceFailoverAllowDataLoss(String resourceGroupName, String locationName, String failoverGroupName) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName).getSyncPoller(); + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName) + .getSyncPoller(); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1604,18 +1334,18 @@ private Mono>> forceFailoverAllowDataLossWithResponseA */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InstanceFailoverGroupInner> - beginForceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName, context) + beginForceFailoverAllowDataLoss(String resourceGroupName, String locationName, String failoverGroupName, + Context context) { + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName, context) .getSyncPoller(); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1624,19 +1354,18 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String locationName, String failoverGroupName) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName) - .last() + public Mono forceFailoverAllowDataLossAsync(String resourceGroupName, + String locationName, String failoverGroupName) { + return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1646,19 +1375,18 @@ public Mono forceFailoverAllowDataLossAsync( * @return an instance failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono forceFailoverAllowDataLossAsync( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName, context) - .last() + private Mono forceFailoverAllowDataLossAsync(String resourceGroupName, + String locationName, String failoverGroupName, Context context) { + return beginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1667,17 +1395,17 @@ private Mono forceFailoverAllowDataLossAsync( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName) { + public InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String locationName, + String failoverGroupName) { return forceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName).block(); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1687,21 +1415,20 @@ public InstanceFailoverGroupInner forceFailoverAllowDataLoss( * @return an instance failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstanceFailoverGroupInner forceFailoverAllowDataLoss( - String resourceGroupName, String locationName, String failoverGroupName, Context context) { + public InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String locationName, + String failoverGroupName, Context context) { return forceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -1709,62 +1436,42 @@ private Mono> listByLocationNextSingle return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java index ee6c39c7ae2e1..543fa779866ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java @@ -43,26 +43,29 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in InstancePoolsClient. */ -public final class InstancePoolsClientImpl - implements InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete, - InstancePoolsClient { - /** The proxy service used to perform REST calls. */ +/** + * An instance of this class provides access to all the operations defined in InstancePoolsClient. + */ +public final class InstancePoolsClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, InstancePoolsClient { + /** + * The proxy service used to perform REST calls. + */ private final InstancePoolsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of InstancePoolsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ InstancePoolsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(InstancePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(InstancePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -73,203 +76,136 @@ public final class InstancePoolsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientI") public interface InstancePoolsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}") - @ExpectedResponses({200, 201, 202}) + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") InstancePoolInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}") - @ExpectedResponses({200, 202, 204}) + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InstancePoolInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}") - @ExpectedResponses({200, 202}) + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") InstancePoolUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InstancePoolUpdate parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all instance pools 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 a list of all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all instance pools 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 a list of all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all instance pools 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 a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. @@ -281,7 +217,7 @@ public PagedFlux listAsync() { /** * Gets a list of all instance pools 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. @@ -290,13 +226,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all instance pools 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 a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. @@ -308,7 +244,7 @@ public PagedIterable list() { /** * Gets a list of all instance pools 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. @@ -322,114 +258,79 @@ public PagedIterable list(Context context) { /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -437,16 +338,15 @@ private Mono> listByResourceGroupSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -455,16 +355,15 @@ public PagedFlux listByResourceGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -477,9 +376,9 @@ public PagedIterable listByResourceGroup(String resourceGroup /** * Gets a list of instance pools in the resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -493,9 +392,9 @@ public PagedIterable listByResourceGroup(String resourceGroup /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -503,13 +402,11 @@ public PagedIterable listByResourceGroup(String resourceGroup * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String instancePoolName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -520,32 +417,21 @@ public Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + instancePoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -554,13 +440,11 @@ public Mono> getByResourceGroupWithResponseAsync( * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String instancePoolName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -571,29 +455,20 @@ private Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -608,9 +483,9 @@ public Mono getByResourceGroupAsync(String resourceGroupName, /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -619,16 +494,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, * @return an instance pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String instancePoolName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, instancePoolName, context).block(); } /** * Gets an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -642,9 +517,9 @@ public InstancePoolInner getByResourceGroup(String resourceGroupName, String ins /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -653,13 +528,11 @@ public InstancePoolInner getByResourceGroup(String resourceGroupName, String ins * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -670,10 +543,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -683,25 +554,16 @@ public Mono>> createOrUpdateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -711,13 +573,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -728,10 +588,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -740,23 +598,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -765,25 +615,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstancePoolInner.class, - InstancePoolInner.class, - this.client.getContext()); + public PollerFlux, InstancePoolInner> + beginCreateOrUpdateAsync(String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, this.client.getContext()); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -796,19 +640,17 @@ public PollerFlux, InstancePoolInner> beginCreateO private PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync( String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), InstancePoolInner.class, InstancePoolInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, context); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -817,16 +659,16 @@ private PollerFlux, InstancePoolInner> beginCreate * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginCreateOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -836,16 +678,16 @@ public SyncPoller, InstancePoolInner> beginCreateO * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginCreateOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -854,18 +696,17 @@ public SyncPoller, InstancePoolInner> beginCreateO * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -875,18 +716,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -895,16 +735,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner createOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { + public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters) { return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters).block(); } /** * Creates or updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -914,16 +754,16 @@ public InstancePoolInner createOrUpdate( * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner createOrUpdate( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { + public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).block(); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -933,10 +773,8 @@ public InstancePoolInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String instancePoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -947,30 +785,20 @@ public Mono>> deleteWithResponseAsync(String resourceG .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -979,13 +807,11 @@ public Mono>> deleteWithResponseAsync(String resourceG * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String instancePoolName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String instancePoolName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -996,27 +822,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1026,17 +844,15 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String instancePoolName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, instancePoolName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1045,20 +861,19 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String instancePoolName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String instancePoolName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, instancePoolName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1067,14 +882,14 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String instancePoolName) { - return beginDeleteAsync(resourceGroupName, instancePoolName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, instancePoolName).getSyncPoller(); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1083,16 +898,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String instancePoolName, Context context) { - return beginDeleteAsync(resourceGroupName, instancePoolName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String instancePoolName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, instancePoolName, context).getSyncPoller(); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1101,16 +916,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String instancePoolName) { - return beginDeleteAsync(resourceGroupName, instancePoolName) - .last() + return beginDeleteAsync(resourceGroupName, instancePoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1120,16 +934,15 @@ public Mono deleteAsync(String resourceGroupName, String instancePoolName) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String instancePoolName, Context context) { - return beginDeleteAsync(resourceGroupName, instancePoolName, context) - .last() + return beginDeleteAsync(resourceGroupName, instancePoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1142,9 +955,9 @@ public void delete(String resourceGroupName, String instancePoolName) { /** * Deletes an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be deleted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1158,9 +971,9 @@ public void delete(String resourceGroupName, String instancePoolName, Context co /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1169,13 +982,11 @@ public void delete(String resourceGroupName, String instancePoolName, Context co * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1186,10 +997,8 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1198,26 +1007,16 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -1227,13 +1026,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1244,10 +1041,8 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1256,23 +1051,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1281,25 +1068,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, InstancePoolInner> beginUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, instancePoolName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InstancePoolInner.class, - InstancePoolInner.class, - this.client.getContext()); + public PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, this.client.getContext()); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -1309,22 +1090,20 @@ public PollerFlux, InstancePoolInner> beginUpdateA * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InstancePoolInner> beginUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context) { + private PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), InstancePoolInner.class, InstancePoolInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, context); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1333,16 +1112,16 @@ private PollerFlux, InstancePoolInner> beginUpdate * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginUpdate( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -1352,16 +1131,16 @@ public SyncPoller, InstancePoolInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginUpdate( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1370,18 +1149,17 @@ public SyncPoller, InstancePoolInner> beginUpdate( * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters) { + return beginUpdateAsync(resourceGroupName, instancePoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -1391,18 +1169,17 @@ public Mono updateAsync( * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1417,9 +1194,9 @@ public InstancePoolInner update(String resourceGroupName, String instancePoolNam /** * Updates an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. @@ -1429,21 +1206,20 @@ public InstancePoolInner update(String resourceGroupName, String instancePoolNam * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner update( - String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, Context context) { + public InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, + Context context) { return updateAsync(resourceGroupName, instancePoolName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1451,37 +1227,26 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1489,36 +1254,25 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1526,63 +1280,43 @@ private Mono> listByResourceGroupNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java index 803c55477fa39..b2964d50a8ff2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobAgentsClient. + */ public final class JobAgentsClientImpl implements JobAgentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobAgentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobAgentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobAgentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,117 +72,80 @@ public final class JobAgentsClientImpl implements JobAgentsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobAgentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobAgentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobAgentInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobAgentUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobAgentUpdate parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of job agents in a server along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of job agents in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -186,57 +155,37 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of job agents in a server along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of job agents in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -246,38 +195,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -286,16 +220,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,16 +238,15 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -328,9 +260,9 @@ public PagedIterable listByServer(String resourceGroupName, Strin /** * Gets a list of job agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -345,9 +277,9 @@ public PagedIterable listByServer(String resourceGroupName, Strin /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -356,13 +288,11 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @return a job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -375,33 +305,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -411,13 +329,11 @@ public Mono> getWithResponseAsync( * @return a job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -430,30 +346,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -469,9 +375,9 @@ public Mono getAsync(String resourceGroupName, String serverName, /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -481,16 +387,16 @@ public Mono getAsync(String resourceGroupName, String serverName, * @return a job agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, context).block(); } /** * Gets a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,9 +411,9 @@ public JobAgentInner get(String resourceGroupName, String serverName, String job /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -517,13 +423,11 @@ public JobAgentInner get(String resourceGroupName, String serverName, String job * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -536,10 +440,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -548,27 +450,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -579,13 +471,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -598,10 +488,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -610,24 +498,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -637,25 +516,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobAgentInner.class, - JobAgentInner.class, - this.client.getContext()); + public PollerFlux, JobAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, this.client.getContext()); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -666,22 +539,20 @@ public PollerFlux, JobAgentInner> beginCreateOrUpdateA * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context) { + private PollerFlux, JobAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobAgentInner.class, JobAgentInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, context); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -691,16 +562,16 @@ private PollerFlux, JobAgentInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); + public SyncPoller, JobAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -711,17 +582,17 @@ public SyncPoller, JobAgentInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context) + public SyncPoller, JobAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, JobAgentInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context) .getSyncPoller(); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -731,18 +602,17 @@ public SyncPoller, JobAgentInner> beginCreateOrUpdate( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -753,18 +623,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -774,16 +643,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters) { + public JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).block(); } /** * Creates or updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. @@ -794,16 +663,16 @@ public JobAgentInner createOrUpdate( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentInner parameters, Context context) { + public JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + JobAgentInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).block(); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -812,13 +681,11 @@ public JobAgentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -831,31 +698,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -865,13 +721,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -884,28 +738,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -914,20 +759,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String jobAgentName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -937,21 +780,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -960,16 +802,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String jobAgentName) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String jobAgentName) { + return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName).getSyncPoller(); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -979,16 +821,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String jobAgentName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).getSyncPoller(); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -998,16 +840,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, jobAgentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -1018,16 +859,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1041,9 +881,9 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN /** * Deletes a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be deleted. * @param context The context to associate with this operation. @@ -1058,9 +898,9 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1070,13 +910,11 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1089,10 +927,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1102,26 +938,16 @@ public Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1132,13 +958,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1151,10 +975,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1163,24 +985,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1190,25 +1003,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobAgentInner> beginUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobAgentInner.class, - JobAgentInner.class, - this.client.getContext()); + public PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, this.client.getContext()); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1219,22 +1026,20 @@ public PollerFlux, JobAgentInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobAgentInner> beginUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { + private PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobAgentInner.class, JobAgentInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, context); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1244,16 +1049,16 @@ private PollerFlux, JobAgentInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); + public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1264,16 +1069,16 @@ public SyncPoller, JobAgentInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginUpdate( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).getSyncPoller(); + public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).getSyncPoller(); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1283,18 +1088,17 @@ public SyncPoller, JobAgentInner> beginUpdate( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1305,18 +1109,17 @@ public Mono updateAsync( * @return an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1326,16 +1129,16 @@ private Mono updateAsync( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner update( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters) { + public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters) { return updateAsync(resourceGroupName, serverName, jobAgentName, parameters).block(); } /** * Updates a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be updated. * @param parameters The update to the job agent. @@ -1346,16 +1149,15 @@ public JobAgentInner update( * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner update( - String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { + public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters, Context context) { return updateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1367,31 +1169,21 @@ private Mono> listByServerNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1404,23 +1196,13 @@ private Mono> listByServerNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java index d211741994585..3c7487a42f09f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.sql.models.JobCredentialListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobCredentialsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobCredentialsClient. + */ public final class JobCredentialsClientImpl implements JobCredentialsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobCredentialsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobCredentialsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobCredentialsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobCredentialsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobCredentialsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,89 +65,60 @@ public final class JobCredentialsClientImpl implements JobCredentialsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobCredentialsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/credentials") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") - @ExpectedResponses({200}) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("credentialName") String credentialName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("credentialName") String credentialName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobCredentialInner parameters, - @HeaderParam("Accept") String accept, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobCredentialInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("credentialName") String credentialName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,13 +127,11 @@ Mono> listByAgentNext( * @return a list of jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,42 +144,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -214,13 +170,11 @@ private Mono> listByAgentSinglePageAsync( * @return a list of jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,39 +187,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,18 +212,17 @@ private Mono> listByAgentSinglePageAsync( * @return a list of jobs credentials as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -295,18 +232,17 @@ public PagedFlux listByAgentAsync( * @return a list of jobs credentials as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,16 +251,16 @@ private PagedFlux listByAgentAsync( * @return a list of jobs credentials as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); } /** * Gets a list of jobs credentials. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -334,16 +270,16 @@ public PagedIterable listByAgent( * @return a list of jobs credentials as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, Context context) { return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); } /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -353,13 +289,11 @@ public PagedIterable listByAgent( * @return a jobs credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -375,34 +309,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -413,13 +334,11 @@ public Mono> getWithResponseAsync( * @return a jobs credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -435,31 +354,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, credentialName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -469,17 +377,17 @@ private Mono> getWithResponseAsync( * @return a jobs credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String credentialName) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -490,16 +398,16 @@ public Mono getAsync( * @return a jobs credential along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName, context).block(); } /** * Gets a jobs credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -509,16 +417,16 @@ public Response getWithResponse( * @return a jobs credential. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobCredentialInner get( - String resourceGroupName, String serverName, String jobAgentName, String credentialName) { + public JobCredentialInner get(String resourceGroupName, String serverName, String jobAgentName, + String credentialName) { return getWithResponse(resourceGroupName, serverName, jobAgentName, credentialName, Context.NONE).getValue(); } /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -527,20 +435,14 @@ public JobCredentialInner 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 stored credential that can be used by a job to connect to target databases along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String credentialName, JobCredentialInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,10 +458,8 @@ public Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -568,28 +468,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -599,21 +488,14 @@ public Mono> createOrUpdateWithResponseAsync( * @throws 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 stored credential that can be used by a job to connect to target databases along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String credentialName, JobCredentialInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -629,10 +511,8 @@ private Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -641,25 +521,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -668,24 +538,20 @@ private Mono> createOrUpdateWithResponseAsync( * @throws 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 stored credential that can be used by a job to connect to target databases on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, JobCredentialInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -697,23 +563,17 @@ public Mono createOrUpdateAsync( * @return a stored credential that can be used by a job to connect to target databases along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, credentialName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, JobCredentialInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName, parameters, + context).block(); } /** * Creates or updates a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -724,22 +584,17 @@ public Response createOrUpdateWithResponse( * @return a stored credential that can be used by a job to connect to target databases. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobCredentialInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String credentialName, - JobCredentialInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, jobAgentName, credentialName, parameters, Context.NONE) - .getValue(); + public JobCredentialInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, JobCredentialInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, jobAgentName, credentialName, parameters, + Context.NONE).getValue(); } /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -749,13 +604,11 @@ public JobCredentialInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -771,32 +624,20 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -807,13 +648,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String credentialName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -829,29 +668,19 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter credentialName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - credentialName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, credentialName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -861,17 +690,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String jobAgentName, String credentialName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, + String credentialName) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName) .flatMap(ignored -> Mono.empty()); } /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -882,16 +711,16 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String credentialName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String credentialName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName, context).block(); } /** * Deletes a job credential. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. @@ -906,9 +735,8 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -920,31 +748,21 @@ private Mono> listByAgentNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -957,23 +775,13 @@ private Mono> listByAgentNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java index 35569b2544c75..389525302c7d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java @@ -39,22 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobExecutionsClient. + */ public final class JobExecutionsClientImpl implements JobExecutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobExecutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobExecutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobExecutionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,149 +71,95 @@ public final class JobExecutionsClientImpl implements JobExecutionsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobExecutionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/executions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, - @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, + Mono> listByJob(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, - @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> cancel(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -223,22 +175,12 @@ Mono> listByJobNext( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -251,49 +193,24 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -310,23 +227,12 @@ private Mono> listByAgentSinglePageAsync( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -339,46 +245,24 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -394,38 +278,19 @@ private Mono> listByAgentSinglePageAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top) { - return new PagedFlux<>( - () -> - listByAgentSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, + createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,8 +299,8 @@ public PagedFlux listByAgentAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName) { + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -443,27 +308,16 @@ public PagedFlux listByAgentAsync( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedFlux<>( - () -> - listByAgentSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, + createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -480,40 +334,20 @@ public PagedFlux listByAgentAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { return new PagedFlux<>( - () -> - listByAgentSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context), + () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, + endTimeMin, endTimeMax, isActive, skip, top, context), nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -522,8 +356,8 @@ private PagedFlux listByAgentAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -531,25 +365,15 @@ public PagedIterable listByAgent( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedIterable<>( - listByAgentAsync( - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top)); + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** * Lists all executions in a job agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param createTimeMin If specified, only job executions created at or after the specified time are included. @@ -566,38 +390,18 @@ public PagedIterable listByAgent( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, - String serverName, - String jobAgentName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { - return new PagedIterable<>( - listByAgentAsync( - resourceGroupName, - serverName, - jobAgentName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context)); + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -614,23 +418,12 @@ public PagedIterable listByAgent( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -646,50 +439,24 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -707,24 +474,12 @@ private Mono> listByJobSinglePageAsync( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -740,47 +495,24 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -797,40 +529,20 @@ private Mono> listByJobSinglePageAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top) { + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { return new PagedFlux<>( - () -> - listByJobSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -840,8 +552,8 @@ public PagedFlux listByJobAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -850,27 +562,16 @@ public PagedFlux listByJobAsync( final Long skip = null; final Long top = null; return new PagedFlux<>( - () -> - listByJobSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -888,42 +589,20 @@ public PagedFlux listByJobAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { return new PagedFlux<>( - () -> - listByJobSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context), + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), nextLink -> listByJobNextSinglePageAsync(nextLink, context)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -933,8 +612,8 @@ private PagedFlux listByJobAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -942,26 +621,15 @@ public PagedIterable listByJob( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedIterable<>( - listByJobAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top)); + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** * Lists a job's executions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -979,40 +647,18 @@ public PagedIterable listByJob( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { - return new PagedIterable<>( - listByJobAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context)); + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1023,13 +669,11 @@ public PagedIterable listByJob( * @return a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1048,35 +692,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1088,18 +718,11 @@ public Mono> getWithResponseAsync( * @return a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1118,32 +741,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1154,17 +765,17 @@ private Mono> getWithResponseAsync( * @return a job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1176,22 +787,17 @@ public Mono getAsync( * @return a job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .block(); } /** * Gets a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1202,17 +808,17 @@ public Response getWithResponse( * @return a job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId) { return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE) .getValue(); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1223,13 +829,11 @@ public JobExecutionInner get( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1248,35 +852,22 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1288,18 +879,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1318,32 +902,20 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1356,23 +928,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobExecutionInner.class, - JobExecutionInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, this.client.getContext()); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1385,27 +951,20 @@ public PollerFlux, JobExecutionInner> beginCreateO */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, + String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobExecutionInner.class, JobExecutionInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, context); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1416,17 +975,17 @@ private PollerFlux, JobExecutionInner> beginCreate * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) + public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) .getSyncPoller(); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1438,22 +997,18 @@ public SyncPoller, JobExecutionInner> beginCreateO * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .getSyncPoller(); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1464,18 +1019,17 @@ public SyncPoller, JobExecutionInner> beginCreateO * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1487,13 +1041,8 @@ public Mono createOrUpdateAsync( * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1501,9 +1050,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1514,16 +1063,16 @@ private Mono createOrUpdateAsync( * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).block(); } /** * Creates or updates a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1535,22 +1084,17 @@ public JobExecutionInner createOrUpdate( * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .block(); } /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1561,13 +1105,11 @@ public JobExecutionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1586,33 +1128,21 @@ public Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1624,18 +1154,11 @@ public Mono> cancelWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + private Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1654,30 +1177,19 @@ private Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1688,17 +1200,17 @@ private Mono> cancelWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public Mono cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId) { return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) .flatMap(ignored -> Mono.empty()); } /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1710,22 +1222,17 @@ public Mono cancelAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - Context context) { + public Response cancelWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context) { return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .block(); } /** * Requests cancellation of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1735,16 +1242,16 @@ public Response cancelWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public void cancel(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId) { cancelWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1754,13 +1261,11 @@ public void cancel( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1776,34 +1281,21 @@ public Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1814,13 +1306,11 @@ public Mono>> createWithResponseAsync( * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1836,31 +1326,20 @@ private Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1870,25 +1349,19 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobExecutionInner> beginCreateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobExecutionInner.class, - JobExecutionInner.class, - this.client.getContext()); + public PollerFlux, JobExecutionInner> beginCreateAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, this.client.getContext()); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1899,22 +1372,20 @@ public PollerFlux, JobExecutionInner> beginCreateA * @return the {@link PollerFlux} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionInner> beginCreateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private PollerFlux, JobExecutionInner> beginCreateAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobExecutionInner.class, JobExecutionInner.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, context); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1924,16 +1395,16 @@ private PollerFlux, JobExecutionInner> beginCreate * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreate( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { - return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName).getSyncPoller(); + public SyncPoller, JobExecutionInner> beginCreate(String resourceGroupName, + String serverName, String jobAgentName, String jobName) { + return this.beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName).getSyncPoller(); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1944,16 +1415,16 @@ public SyncPoller, JobExecutionInner> beginCreate( * @return the {@link SyncPoller} for polling of an execution of a job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { - return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName, context).getSyncPoller(); + public SyncPoller, JobExecutionInner> beginCreate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, Context context) { + return this.beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName, context).getSyncPoller(); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1963,18 +1434,17 @@ public SyncPoller, JobExecutionInner> beginCreate( * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { - return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName) - .last() + public Mono createAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1985,18 +1455,17 @@ public Mono createAsync( * @return an execution of a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { - return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName, context) - .last() + private Mono createAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { + return beginCreateAsync(resourceGroupName, serverName, jobAgentName, jobName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -2012,9 +1481,9 @@ public JobExecutionInner create(String resourceGroupName, String serverName, Str /** * Starts an elastic job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -2025,16 +1494,15 @@ public JobExecutionInner create(String resourceGroupName, String serverName, Str * @return an execution of a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner create( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + public JobExecutionInner create(String resourceGroupName, String serverName, String jobAgentName, String jobName, + Context context) { return createAsync(resourceGroupName, serverName, jobAgentName, jobName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2046,31 +1514,21 @@ private Mono> listByAgentNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2083,31 +1541,20 @@ private Mono> listByAgentNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2119,31 +1566,21 @@ private Mono> listByJobNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2156,23 +1593,13 @@ private Mono> listByJobNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByJobNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java index e361f0767e34c..4a0f66aa97551 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java @@ -32,22 +32,28 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobStepExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobStepExecutionsClient. + */ public final class JobStepExecutionsClientImpl implements JobStepExecutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobStepExecutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobStepExecutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobStepExecutionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobStepExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobStepExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -58,66 +64,45 @@ public final class JobStepExecutionsClientImpl implements JobStepExecutionsClien @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobStepExecutionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobExecution( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + Mono> listByJobExecution(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, - @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("stepName") String stepName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobExecutionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -135,24 +120,13 @@ Mono> listByJobExecutionNext( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,51 +145,24 @@ private Mono> listByJobExecutionSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByJobExecution( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, + skip, top, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -234,25 +181,13 @@ private Mono> listByJobExecutionSinglePageAsync * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -271,48 +206,24 @@ private Mono> listByJobExecutionSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByJobExecution( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -330,42 +241,21 @@ private Mono> listByJobExecutionSinglePageAsync * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink)); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -376,8 +266,8 @@ public PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobExecutionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -386,28 +276,16 @@ public PagedFlux listByJobExecutionAsync( final Long skip = null; final Long top = null; return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink)); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -426,44 +304,21 @@ public PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink, context)); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -474,8 +329,8 @@ private PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJobExecution( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -483,27 +338,15 @@ public PagedIterable listByJobExecution( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedIterable<>( - listByJobExecutionAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top)); + return new PagedIterable<>(listByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** * Lists the step executions of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -522,42 +365,19 @@ public PagedIterable listByJobExecution( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJobExecution( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { - return new PagedIterable<>( - listByJobExecutionAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context)); + public PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { + return new PagedIterable<>(listByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -569,18 +389,11 @@ public PagedIterable listByJobExecution( * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -602,36 +415,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -644,19 +443,11 @@ public Mono> getWithResponseAsync( * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -678,33 +469,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -716,22 +494,17 @@ private Mono> getWithResponseAsync( * @return a step execution of a job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -744,24 +517,17 @@ public Mono getAsync( * @return a step execution of a job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + context).block(); } /** * Gets a step execution of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -773,23 +539,16 @@ public Response getWithResponse( * @return a step execution of a job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName) { - return getWithResponse( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, Context.NONE) - .getValue(); + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName) { + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -801,32 +560,22 @@ private Mono> listByJobExecutionNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -834,29 +583,19 @@ private Mono> listByJobExecutionNextSinglePageA * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByJobExecutionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java index bde8a48880ecc..aa19c9dd20b9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java @@ -33,17 +33,23 @@ import com.azure.resourcemanager.sql.models.JobStepListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobStepsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobStepsClient. + */ public final class JobStepsClientImpl implements JobStepsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobStepsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobStepsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobStepsClientImpl(SqlManagementClientImpl client) { @@ -58,140 +64,89 @@ public final class JobStepsClientImpl implements JobStepsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobStepsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByJob(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobStepInner parameters, - @HeaderParam("Accept") String accept, - Context context); + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobStepInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVersion( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobVersion") int jobVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByVersion(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobVersion") int jobVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByVersion( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobVersion") int jobVersion, - @PathParam("stepName") String stepName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByVersion(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobVersion") int jobVersion, @PathParam("stepName") String stepName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByJobNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVersionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -199,16 +154,14 @@ Mono> listByVersionNext( * @throws 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 job steps for a job's current version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -224,43 +177,23 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -269,16 +202,14 @@ private Mono> listByJobSinglePageAsync( * @throws 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 job steps for a job's current version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -294,40 +225,23 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -337,18 +251,17 @@ private Mono> listByJobSinglePageAsync( * @return all job steps for a job's current version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -359,8 +272,8 @@ public PagedFlux listByJobAsync( * @return all job steps for a job's current version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return new PagedFlux<>( () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), nextLink -> listByJobNextSinglePageAsync(nextLink, context)); @@ -368,9 +281,9 @@ private PagedFlux listByJobAsync( /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -380,16 +293,16 @@ private PagedFlux listByJobAsync( * @return all job steps for a job's current version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); } /** * Gets all job steps for a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -400,16 +313,16 @@ public PagedIterable listByJob( * @return all job steps for a job's current version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); } /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -417,17 +330,15 @@ public PagedIterable listByJob( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job step in a job's current version along with {@link Response} on successful completion of {@link - * Mono}. + * @return a job step in a job's current version along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -446,35 +357,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -483,22 +380,15 @@ public 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 a job step in a job's current version along with {@link Response} on successful completion of {@link - * Mono}. + * @return a job step in a job's current version along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -517,32 +407,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, stepName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -553,17 +431,17 @@ private Mono> getWithResponseAsync( * @return a job step in a job's current version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -575,21 +453,16 @@ public Mono getAsync( * @return a job step in a job's current version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, context).block(); } /** * Gets a job step in a job's current version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -600,16 +473,16 @@ public Response getWithResponse( * @return a job step in a job's current version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobStepInner get( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public JobStepInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName) { return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, stepName, Context.NONE).getValue(); } /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -621,18 +494,11 @@ public JobStepInner get( * @return a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, JobStepInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -651,10 +517,8 @@ public Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -663,29 +527,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -698,19 +550,11 @@ public Mono> createOrUpdateWithResponseAsync( * @return a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, JobStepInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -729,10 +573,8 @@ private Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -741,26 +583,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -772,23 +603,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a job step on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, JobStepInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -801,24 +626,17 @@ public Mono createOrUpdateAsync( * @return a job step along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, JobStepInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, + parameters, context).block(); } /** * Creates or updates a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -830,23 +648,17 @@ public Response createOrUpdateWithResponse( * @return a job step. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobStepInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - JobStepInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters, Context.NONE) - .getValue(); + public JobStepInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName, JobStepInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, jobAgentName, jobName, stepName, parameters, + Context.NONE).getValue(); } /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -857,13 +669,11 @@ public JobStepInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -882,33 +692,20 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -920,18 +717,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, String stepName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -950,30 +740,19 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, stepName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -984,17 +763,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName) .flatMap(ignored -> Mono.empty()); } /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1006,21 +785,16 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - String stepName, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, String stepName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, stepName, context).block(); } /** * Deletes a job step. This will implicitly create a new job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1030,16 +804,16 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName) { + public void delete(String resourceGroupName, String serverName, String jobAgentName, String jobName, + String stepName) { deleteWithResponse(resourceGroupName, serverName, jobAgentName, jobName, stepName, Context.NONE); } /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1048,16 +822,14 @@ 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 job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVersionSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1073,44 +845,24 @@ private Mono> listByVersionSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByVersion( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobVersion, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1120,21 +872,14 @@ private Mono> listByVersionSinglePageAsync( * @throws 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 job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVersionSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context) { + private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1150,41 +895,23 @@ private Mono> listByVersionSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByVersion( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1195,8 +922,8 @@ private Mono> listByVersionSinglePageAsync( * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByVersionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + public PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { return new PagedFlux<>( () -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion), nextLink -> listByVersionNextSinglePageAsync(nextLink)); @@ -1204,9 +931,9 @@ public PagedFlux listByVersionAsync( /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1218,24 +945,17 @@ public PagedFlux listByVersionAsync( * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVersionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context) { - return new PagedFlux<>( - () -> - listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context), - nextLink -> listByVersionNextSinglePageAsync(nextLink, context)); + private PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { + return new PagedFlux<>(() -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, context), nextLink -> listByVersionNextSinglePageAsync(nextLink, context)); } /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1246,17 +966,17 @@ private PagedFlux listByVersionAsync( * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVersion( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { return new PagedIterable<>( listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion)); } /** * Gets all job steps in the specified job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1268,22 +988,17 @@ public PagedIterable listByVersion( * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVersion( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context) { + public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { return new PagedIterable<>( listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context)); } /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1295,18 +1010,11 @@ public PagedIterable listByVersion( * @return the specified version of a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByVersionWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName) { + public Mono> getByVersionWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, String stepName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1325,36 +1033,22 @@ public Mono> getByVersionWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByVersion( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByVersion(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobVersion, stepName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1367,19 +1061,11 @@ public Mono> getByVersionWithResponseAsync( * @return the specified version of a job step along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByVersionWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName, - Context context) { + private Mono> getByVersionWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, String stepName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1398,33 +1084,20 @@ private Mono> getByVersionWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByVersion( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - stepName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1436,22 +1109,17 @@ private Mono> getByVersionWithResponseAsync( * @return the specified version of a job step on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByVersionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName) { + public Mono getByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, String stepName) { return getByVersionWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1464,24 +1132,17 @@ public Mono getByVersionAsync( * @return the specified version of a job step along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByVersionWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName, - Context context) { - return getByVersionWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, context) - .block(); + public Response getByVersionWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, String stepName, Context context) { + return getByVersionWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, + context).block(); } /** * Gets the specified version of a job step. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -1493,23 +1154,16 @@ public Response getByVersionWithResponse( * @return the specified version of a job step. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobStepInner getByVersion( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - String stepName) { - return getByVersionWithResponse( - resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, Context.NONE) - .getValue(); + public JobStepInner getByVersion(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion, String stepName) { + return getByVersionWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1521,31 +1175,21 @@ private Mono> listByJobNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1558,31 +1202,20 @@ private Mono> listByJobNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByJobNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1594,31 +1227,21 @@ private Mono> listByVersionNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByVersionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1631,23 +1254,13 @@ private Mono> listByVersionNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByVersionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByVersionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java index 184502aeb3d47..5a13e4ff2bf9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java @@ -32,22 +32,28 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobTargetExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobTargetExecutionsClient. + */ public final class JobTargetExecutionsClientImpl implements JobTargetExecutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobTargetExecutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobTargetExecutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobTargetExecutionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobTargetExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(JobTargetExecutionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,105 +64,68 @@ public final class JobTargetExecutionsClientImpl implements JobTargetExecutionsC @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobTargetExecutionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}" - + "/targets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByStep( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("stepName") String stepName, + Mono> listByStep(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, - @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}" - + "/targets/{targetId}") - @ExpectedResponses({200}) + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @PathParam("stepName") String stepName, - @PathParam("targetId") UUID targetId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, + @PathParam("targetId") UUID targetId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobExecution( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, - @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + Mono> listByJobExecution(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, - @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByStepNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobExecutionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -175,25 +144,13 @@ Mono> listByJobExecutionNext( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByStepSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top) { + private Mono> listByStepSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, String stepName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -215,52 +172,24 @@ private Mono> listByStepSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByStep( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByStep(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, + isActive, skip, top, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -280,26 +209,13 @@ private Mono> listByStepSinglePageAsync( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByStepSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private Mono> listByStepSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, String stepName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -321,49 +237,24 @@ private Mono> listByStepSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByStep( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByStep(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -382,44 +273,21 @@ private Mono> listByStepSinglePageAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByStepAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + public PagedFlux listByStepAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { return new PagedFlux<>( - () -> - listByStepSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByStepSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByStepNextSinglePageAsync(nextLink)); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -431,13 +299,8 @@ public PagedFlux listByStepAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByStepAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName) { + public PagedFlux listByStepAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -446,29 +309,16 @@ public PagedFlux listByStepAsync( final Long skip = null; final Long top = null; return new PagedFlux<>( - () -> - listByStepSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByStepSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByStepNextSinglePageAsync(nextLink)); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -488,46 +338,21 @@ public PagedFlux listByStepAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByStepAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private PagedFlux listByStepAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { return new PagedFlux<>( - () -> - listByStepSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context), + () -> listByStepSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), nextLink -> listByStepNextSinglePageAsync(nextLink, context)); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -539,13 +364,8 @@ private PagedFlux listByStepAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByStep( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName) { + public PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -553,28 +373,15 @@ public PagedIterable listByStep( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedIterable<>( - listByStepAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top)); + return new PagedIterable<>(listByStepAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** * Lists the target executions of a job step execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -594,44 +401,19 @@ public PagedIterable listByStep( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByStep( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { - return new PagedIterable<>( - listByStepAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context)); + public PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { + return new PagedIterable<>(listByStepAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -644,19 +426,11 @@ public PagedIterable listByStep( * @return a target execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -681,37 +455,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter targetId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - targetId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, stepName, targetId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -725,20 +484,11 @@ public Mono> getWithResponseAsync( * @return a target execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -763,34 +513,21 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter targetId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - stepName, - targetId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, stepName, targetId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -803,24 +540,17 @@ private Mono> getWithResponseAsync( * @return a target execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId) { - return getWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + targetId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -834,25 +564,17 @@ public Mono getAsync( * @return a target execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + targetId, context).block(); } /** * Gets a target execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -865,24 +587,17 @@ public Response getWithResponse( * @return a target execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - String stepName, - UUID targetId) { - return getWithResponse( - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, Context.NONE) - .getValue(); + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId) { + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, + Context.NONE).getValue(); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -900,24 +615,13 @@ public JobExecutionInner get( * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -936,51 +640,24 @@ private Mono> listByJobExecutionSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByJobExecution( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, + skip, top, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -999,25 +676,13 @@ private Mono> listByJobExecutionSinglePageAsync * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionSinglePageAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1036,48 +701,24 @@ private Mono> listByJobExecutionSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByJobExecution( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1095,42 +736,21 @@ private Mono> listByJobExecutionSinglePageAsync * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, + public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink)); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1141,8 +761,8 @@ public PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobExecutionAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -1151,28 +771,16 @@ public PagedFlux listByJobExecutionAsync( final Long skip = null; final Long top = null; return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink)); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1191,44 +799,21 @@ public PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobExecutionAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { + private PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { return new PagedFlux<>( - () -> - listByJobExecutionSinglePageAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context), + () -> listByJobExecutionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), nextLink -> listByJobExecutionNextSinglePageAsync(nextLink, context)); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1239,8 +824,8 @@ private PagedFlux listByJobExecutionAsync( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJobExecution( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + public PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { final OffsetDateTime createTimeMin = null; final OffsetDateTime createTimeMax = null; final OffsetDateTime endTimeMin = null; @@ -1248,27 +833,15 @@ public PagedIterable listByJobExecution( final Boolean isActive = null; final Long skip = null; final Long top = null; - return new PagedIterable<>( - listByJobExecutionAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top)); + return new PagedIterable<>(listByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** * Lists target executions for all steps of a job execution. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -1287,42 +860,18 @@ public PagedIterable listByJobExecution( * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJobExecution( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - UUID jobExecutionId, - OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, - Boolean isActive, - Long skip, - Long top, - Context context) { - return new PagedIterable<>( - listByJobExecutionAsync( - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - createTimeMin, - createTimeMax, - endTimeMin, - endTimeMax, - isActive, - skip, - top, - context)); + public PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top, Context context) { + return new PagedIterable<>(listByJobExecutionAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1334,31 +883,21 @@ private Mono> listByStepNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByStepNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1371,31 +910,20 @@ private Mono> listByStepNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByStepNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByStepNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1407,32 +935,22 @@ private Mono> listByJobExecutionNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1440,29 +958,19 @@ private Mono> listByJobExecutionNextSinglePageA * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobExecutionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByJobExecutionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByJobExecutionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java index 0cb082711433a..443950ea50653 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java @@ -33,22 +33,28 @@ import com.azure.resourcemanager.sql.models.JobTargetGroupListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobTargetGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobTargetGroupsClient. + */ public final class JobTargetGroupsClientImpl implements JobTargetGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobTargetGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobTargetGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobTargetGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobTargetGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobTargetGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,89 +65,60 @@ public final class JobTargetGroupsClientImpl implements JobTargetGroupsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobTargetGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/targetGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") - @ExpectedResponses({200}) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("targetGroupName") String targetGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("targetGroupName") String targetGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobTargetGroupInner parameters, - @HeaderParam("Accept") String accept, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobTargetGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") - @ExpectedResponses({200, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("targetGroupName") String targetGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,13 +127,11 @@ Mono> listByAgentNext( * @return all target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,42 +144,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -214,13 +170,11 @@ private Mono> listByAgentSinglePageAsync( * @return all target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,39 +187,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,18 +212,17 @@ private Mono> listByAgentSinglePageAsync( * @return all target groups in an agent as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -295,18 +232,17 @@ public PagedFlux listByAgentAsync( * @return all target groups in an agent as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,16 +251,16 @@ private PagedFlux listByAgentAsync( * @return all target groups in an agent as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); } /** * Gets all target groups in an agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -334,16 +270,16 @@ public PagedIterable listByAgent( * @return all target groups in an agent as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, Context context) { return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); } /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -353,13 +289,11 @@ public PagedIterable listByAgent( * @return a target group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -376,34 +310,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -414,13 +335,11 @@ public Mono> getWithResponseAsync( * @return a target group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -437,31 +356,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, targetGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -471,17 +379,17 @@ private Mono> getWithResponseAsync( * @return a target group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -492,16 +400,16 @@ public Mono getAsync( * @return a target group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, context).block(); } /** * Gets a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -511,16 +419,16 @@ public Response getWithResponse( * @return a target group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobTargetGroupInner get( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { + public JobTargetGroupInner get(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName) { return getWithResponse(resourceGroupName, serverName, jobAgentName, targetGroupName, Context.NONE).getValue(); } /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -531,17 +439,11 @@ public JobTargetGroupInner get( * @return a group of job targets along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String targetGroupName, JobTargetGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -558,10 +460,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -570,28 +470,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -603,18 +492,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a group of job targets along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String targetGroupName, JobTargetGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -631,10 +514,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -643,25 +524,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -672,21 +543,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a group of job targets on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, JobTargetGroupInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -698,23 +565,17 @@ public Mono createOrUpdateAsync( * @return a group of job targets along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, JobTargetGroupInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, + context).block(); } /** * Creates or updates a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -725,22 +586,17 @@ public Response createOrUpdateWithResponse( * @return a group of job targets. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobTargetGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String jobAgentName, - String targetGroupName, - JobTargetGroupInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, Context.NONE) - .getValue(); + public JobTargetGroupInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, JobTargetGroupInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, jobAgentName, targetGroupName, parameters, + Context.NONE).getValue(); } /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -750,13 +606,11 @@ public JobTargetGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -773,32 +627,20 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -809,13 +651,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String targetGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -832,29 +672,19 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter targetGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - targetGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, targetGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -864,17 +694,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName) .flatMap(ignored -> Mono.empty()); } /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -885,16 +715,16 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String targetGroupName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, context).block(); } /** * Deletes a target group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. @@ -909,9 +739,8 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -923,31 +752,21 @@ private Mono> listByAgentNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -960,23 +779,13 @@ private Mono> listByAgentNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java index 534a6b470dc87..c1c4a9a01f354 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.JobVersionListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobVersionsClient. + */ public final class JobVersionsClientImpl implements JobVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobVersionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobVersionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(JobVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,57 +62,40 @@ public final class JobVersionsClientImpl implements JobVersionsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByJob(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("jobVersion") int jobVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobVersion") int jobVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -116,13 +105,11 @@ Mono> listByJobNext( * @return all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -138,43 +125,23 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -185,13 +152,11 @@ private Mono> listByJobSinglePageAsync( * @return all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -207,40 +172,23 @@ private Mono> listByJobSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByJob( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -250,18 +198,17 @@ private Mono> listByJobSinglePageAsync( * @return all versions of a job as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -272,8 +219,8 @@ public PagedFlux listByJobAsync( * @return all versions of a job as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return new PagedFlux<>( () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), nextLink -> listByJobNextSinglePageAsync(nextLink, context)); @@ -281,9 +228,9 @@ private PagedFlux listByJobAsync( /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -293,16 +240,16 @@ private PagedFlux listByJobAsync( * @return all versions of a job as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); } /** * Gets all versions of a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -313,16 +260,16 @@ public PagedIterable listByJob( * @return all versions of a job as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); } /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -333,13 +280,11 @@ public PagedIterable listByJob( * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -355,35 +300,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobVersion, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -395,18 +326,11 @@ public Mono> getWithResponseAsync( * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -422,32 +346,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -458,17 +370,17 @@ private Mono> getWithResponseAsync( * @return a job version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -480,21 +392,16 @@ public Mono getAsync( * @return a job version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - int jobVersion, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context).block(); } /** * Gets a job version. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -505,17 +412,16 @@ public Response getWithResponse( * @return a job version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobVersionInner get( - String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion) { + public JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion) { return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -527,31 +433,21 @@ private Mono> listByJobNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -564,23 +460,13 @@ private Mono> listByJobNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByJobNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java index a86e1c9a4affb..79defab5c8e55 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java @@ -33,17 +33,23 @@ import com.azure.resourcemanager.sql.models.JobListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public final class JobsClientImpl implements JobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of JobsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobsClientImpl(SqlManagementClientImpl client) { @@ -58,89 +64,58 @@ public final class JobsClientImpl implements JobsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientJ") public interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") - @ExpectedResponses({200}) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") - @ExpectedResponses({200, 204}) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobInner parameters, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByAgentNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,13 +124,11 @@ Mono> listByAgentNext( * @return a list of jobs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,42 +141,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -213,13 +167,11 @@ private Mono> listByAgentSinglePageAsync( * @return a list of jobs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -232,39 +184,23 @@ private Mono> listByAgentSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByAgent( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,16 +210,15 @@ private Mono> listByAgentSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -293,18 +228,17 @@ public PagedFlux listByAgentAsync(String resourceGroupName, String ser * @return a list of jobs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync( - String resourceGroupName, String serverName, String jobAgentName, Context context) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, + Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); } /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,9 +253,9 @@ public PagedIterable listByAgent(String resourceGroupName, String serv /** * Gets a list of jobs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param context The context to associate with this operation. @@ -331,16 +265,16 @@ public PagedIterable listByAgent(String resourceGroupName, String serv * @return a list of jobs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent( - String resourceGroupName, String serverName, String jobAgentName, Context context) { + public PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context) { return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); } /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -350,13 +284,11 @@ public PagedIterable listByAgent( * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -372,34 +304,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -410,13 +329,11 @@ public Mono> getWithResponseAsync( * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -432,31 +349,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -473,9 +379,9 @@ public Mono getAsync(String resourceGroupName, String serverName, Stri /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -486,16 +392,16 @@ public Mono getAsync(String resourceGroupName, String serverName, Stri * @return a job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, context).block(); } /** * Gets a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -511,9 +417,9 @@ public JobInner get(String resourceGroupName, String serverName, String jobAgent /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -524,13 +430,11 @@ public JobInner get(String resourceGroupName, String serverName, String jobAgent * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, JobInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -546,10 +450,8 @@ public Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -558,28 +460,17 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -591,18 +482,11 @@ public Mono> createOrUpdateWithResponseAsync( * @return a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - JobInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, JobInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -618,10 +502,8 @@ private Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -630,25 +512,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -659,17 +531,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, JobInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -681,23 +553,17 @@ public Mono createOrUpdateAsync( * @return a job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String jobAgentName, - String jobName, - JobInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, jobAgentName, jobName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String jobAgentName, String jobName, JobInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, parameters, + context).block(); } /** * Creates or updates a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. @@ -708,18 +574,17 @@ public Response createOrUpdateWithResponse( * @return a job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner createOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String jobName, JobInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, jobAgentName, jobName, parameters, Context.NONE) - .getValue(); + public JobInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, String jobName, + JobInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, jobAgentName, jobName, parameters, + Context.NONE).getValue(); } /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -729,13 +594,11 @@ public JobInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -751,32 +614,20 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -787,13 +638,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -809,29 +658,19 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - jobAgentName, - jobName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -848,9 +687,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -861,16 +700,16 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String jobAgentName, String jobName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, context).block(); } /** * Deletes a job. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to delete. @@ -885,9 +724,8 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -899,31 +737,21 @@ private Mono> listByAgentNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -936,23 +764,13 @@ private Mono> listByAgentNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java index 0f4d9d8230509..a6cf2c410576c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java @@ -39,26 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LedgerDigestUploadsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LedgerDigestUploadsOperationsClient. + */ public final class LedgerDigestUploadsOperationsClientImpl implements LedgerDigestUploadsOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LedgerDigestUploadsOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of LedgerDigestUploadsOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LedgerDigestUploadsOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - LedgerDigestUploadsOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(LedgerDigestUploadsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,106 +71,77 @@ public final class LedgerDigestUploadsOperationsClientImpl implements LedgerDige @Host("{$host}") @ServiceInterface(name = "SqlManagementClientL") public interface LedgerDigestUploadsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/ledgerDigestUploads") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LedgerDigestUploadsInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LedgerDigestUploadsInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disable( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> disable(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -181,42 +154,23 @@ private Mono> listByDatabaseSinglePageAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -224,16 +178,14 @@ private Mono> listByDatabaseSinglePageAs * @throws 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 ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -246,39 +198,23 @@ private Mono> listByDatabaseSinglePageAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,18 +223,17 @@ private Mono> listByDatabaseSinglePageAs * @return all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -308,8 +243,8 @@ public PagedFlux listByDatabaseAsync( * @return all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -317,9 +252,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -328,16 +263,16 @@ private PagedFlux listByDatabaseAsync( * @return all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets all ledger digest upload settings on a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -347,16 +282,16 @@ public PagedIterable listByDatabase( * @return all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -364,16 +299,14 @@ public PagedIterable listByDatabase( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -390,34 +323,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -426,20 +346,14 @@ public 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 the current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -456,31 +370,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -490,17 +393,17 @@ private Mono> getWithResponseAsync( * @return the current ledger digest upload configuration for a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -511,20 +414,16 @@ public Mono getAsync( * @return the current ledger digest upload configuration for a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context).block(); } /** * Gets the current ledger digest upload configuration for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -534,39 +433,33 @@ public Response getWithResponse( * @return the current ledger digest upload configuration for a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LedgerDigestUploadsInner get( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { + public LedgerDigestUploadsInner get(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads) { return getWithResponse(resourceGroupName, serverName, databaseName, ledgerDigestUploads, Context.NONE) .getValue(); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -583,10 +476,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -595,52 +486,35 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, + LedgerDigestUploadsInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -657,10 +531,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -669,29 +541,20 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -699,33 +562,24 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LedgerDigestUploadsInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LedgerDigestUploadsInner.class, - LedgerDigestUploadsInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, ledgerDigestUploads, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LedgerDigestUploadsInner.class, LedgerDigestUploadsInner.class, + this.client.getContext()); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -734,35 +588,24 @@ public PollerFlux, LedgerDigestUploadsInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LedgerDigestUploadsInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context) { + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, + LedgerDigestUploadsInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LedgerDigestUploadsInner.class, - LedgerDigestUploadsInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, ledgerDigestUploads, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LedgerDigestUploadsInner.class, LedgerDigestUploadsInner.class, context); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -770,24 +613,22 @@ private PollerFlux, LedgerDigestUploadsInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters) .getSyncPoller(); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -796,38 +637,31 @@ public SyncPoller, LedgerDigestUploadsInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, context) + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, + LedgerDigestUploadsInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, + context) .getSyncPoller(); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -835,13 +669,13 @@ public Mono createOrUpdateAsync( /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -849,53 +683,43 @@ public Mono createOrUpdateAsync( * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LedgerDigestUploadsInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters) { + public LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters) .block(); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters Azure SQL Database ledger digest upload settings. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -903,23 +727,17 @@ public LedgerDigestUploadsInner createOrUpdate( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LedgerDigestUploadsInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - LedgerDigestUploadsInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, context) - .block(); + public LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, parameters, + context).block(); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -927,16 +745,14 @@ public LedgerDigestUploadsInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> disableWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { + public Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -953,34 +769,22 @@ public Mono>> disableWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .disable( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.disable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -989,20 +793,14 @@ public Mono>> disableWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> disableWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context) { + private Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1019,31 +817,20 @@ private Mono>> disableWithResponseAsync( .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .disable( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - ledgerDigestUploads, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.disable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1055,23 +842,18 @@ private Mono>> disableWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LedgerDigestUploadsInner> beginDisableAsync( String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { - Mono>> mono = - disableWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LedgerDigestUploadsInner.class, - LedgerDigestUploadsInner.class, - this.client.getContext()); + Mono>> mono + = disableWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LedgerDigestUploadsInner.class, LedgerDigestUploadsInner.class, + this.client.getContext()); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1083,29 +865,20 @@ public PollerFlux, LedgerDigestUploadsInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LedgerDigestUploadsInner> beginDisableAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - disableWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LedgerDigestUploadsInner.class, - LedgerDigestUploadsInner.class, - context); + Mono>> mono + = disableWithResponseAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LedgerDigestUploadsInner.class, LedgerDigestUploadsInner.class, context); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1117,14 +890,14 @@ private PollerFlux, LedgerDigestUploadsInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LedgerDigestUploadsInner> beginDisable( String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { - return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads).getSyncPoller(); + return this.beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads).getSyncPoller(); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1136,20 +909,17 @@ public SyncPoller, LedgerDigestUploadsInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LedgerDigestUploadsInner> beginDisable( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, + String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { - return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context) + return this.beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context) .getSyncPoller(); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1159,18 +929,17 @@ public SyncPoller, LedgerDigestUploadsInner * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableAsync( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { - return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads) - .last() + public Mono disableAsync(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads) { + return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1181,22 +950,17 @@ public Mono disableAsync( * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableAsync( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context) { - return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context) - .last() + private Mono disableAsync(String resourceGroupName, String serverName, + String databaseName, LedgerDigestUploadsName ledgerDigestUploads, Context context) { + return beginDisableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1206,16 +970,16 @@ private Mono disableAsync( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LedgerDigestUploadsInner disable( - String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads) { + public LedgerDigestUploadsInner disable(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads) { return disableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads).block(); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -1226,25 +990,20 @@ public LedgerDigestUploadsInner disable( * @return azure SQL Database ledger digest upload settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LedgerDigestUploadsInner disable( - String resourceGroupName, - String serverName, - String databaseName, - LedgerDigestUploadsName ledgerDigestUploads, - Context context) { + public LedgerDigestUploadsInner disable(String resourceGroupName, String serverName, String databaseName, + LedgerDigestUploadsName ledgerDigestUploads, Context context) { return disableAsync(resourceGroupName, serverName, databaseName, ledgerDigestUploads, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of ledger digest upload settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -1252,62 +1011,42 @@ private Mono> listByDatabaseNextSinglePa return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of ledger digest upload settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java index b1d3511946782..ab62411938b66 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java @@ -42,23 +42,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LongTermRetentionBackupsClient. */ +/** + * An instance of this class provides access to all the operations defined in LongTermRetentionBackupsClient. + */ public final class LongTermRetentionBackupsClientImpl implements LongTermRetentionBackupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LongTermRetentionBackupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of LongTermRetentionBackupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LongTermRetentionBackupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(LongTermRetentionBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(LongTermRetentionBackupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,382 +74,264 @@ public final class LongTermRetentionBackupsClientImpl implements LongTermRetenti @Host("{$host}") @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionBackupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, + Mono> listByLocation(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionBackups") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}" - + "/longTermRetentionBackups") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}" - + "/longTermRetentionBackups/{backupName}") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}" - + "/longTermRetentionBackups/{backupName}") - @ExpectedResponses({200, 202}) + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}" - + "/longTermRetentionBackups/{backupName}/copy") - @ExpectedResponses({200, 202}) + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> copy( - @HostParam("$host") String endpoint, + Mono>> copy(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers" - + "/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}" - + "/longTermRetentionBackups/{backupName}/update") - @ExpectedResponses({200, 202}) + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionBackups") - @ExpectedResponses({200}) + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupLocation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono> listByResourceGroupServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases" - + "/{longTermRetentionDatabaseName}/longTermRetentionBackups") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases" - + "/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases" - + "/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") - @ExpectedResponses({200, 202}) + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> deleteByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases" - + "/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") - @ExpectedResponses({200, 202}) + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> copyByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> copyByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases" - + "/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update") - @ExpectedResponses({200, 202}) + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> updateByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + private Mono> listByLocationSinglePageAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -452,53 +339,35 @@ private Mono> listByLocationSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + private Mono> listByLocationSinglePageAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -508,16 +377,15 @@ private Mono> listByLocationSinglePa * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + public PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -528,14 +396,13 @@ public PagedFlux listByLocationAsync( public PagedFlux listByLocationAsync(String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -546,8 +413,8 @@ public PagedFlux listByLocationAsync(String locati * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + private PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedFlux<>( () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); @@ -555,7 +422,7 @@ private PagedFlux listByLocationAsync( /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -571,7 +438,7 @@ public PagedIterable listByLocation(String locatio /** * Lists the long term retention backups for a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -582,14 +449,14 @@ public PagedIterable listByLocation(String locatio * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + public PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, context)); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -597,66 +464,40 @@ public PagedIterable listByLocation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + private Mono> listByServerSinglePageAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -665,64 +506,40 @@ private Mono> listByServerSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + private Mono> listByServerSinglePageAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), locationName, longTermRetentionServerName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -733,21 +550,15 @@ private Mono> listByServerSinglePage * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { - return new PagedFlux<>( - () -> - listByServerSinglePageAsync( - locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + public PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -756,20 +567,17 @@ public PagedFlux listByServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String locationName, String longTermRetentionServerName) { + public PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> - listByServerSinglePageAsync( - locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -781,22 +589,17 @@ public PagedFlux listByServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + private PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> - listByServerSinglePageAsync( - locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, context), + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -805,8 +608,8 @@ private PagedFlux listByServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String locationName, String longTermRetentionServerName) { + public PagedIterable listByServer(String locationName, + String longTermRetentionServerName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( @@ -815,7 +618,7 @@ public PagedIterable listByServer( /** * Lists the long term retention backups for a given server. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -827,20 +630,16 @@ public PagedIterable listByServer( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + public PagedIterable listByServer(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>( - listByServerAsync( - locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, context)); + return new PagedIterable<>(listByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, + databaseState, context)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -849,74 +648,45 @@ public PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, + private Mono> listByDatabaseSinglePageAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -926,72 +696,45 @@ private Mono> listByDatabaseSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + private Mono> listByDatabaseSinglePageAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1003,26 +746,18 @@ private Mono> listByDatabaseSinglePa * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, + public PagedFlux listByDatabaseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByDatabaseSinglePageAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1032,24 +767,19 @@ public PagedFlux listByDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { + public PagedFlux listByDatabaseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByDatabaseSinglePageAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1062,28 +792,18 @@ public PagedFlux listByDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + private PagedFlux listByDatabaseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - context), + () -> listByDatabaseSinglePageAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1093,22 +813,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { + public PagedIterable listByDatabase(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedIterable<>( - listByDatabaseAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState)); + return new PagedIterable<>(listByDatabaseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState)); } /** * Lists all long term retention backups for a database. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1121,26 +836,16 @@ public PagedIterable listByDatabase( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - context)); + public PagedIterable listByDatabase(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByDatabaseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context)); } /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1151,62 +856,41 @@ public PagedIterable listByDatabase( * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { + public Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1218,60 +902,40 @@ public Mono> getWithResponseAsync( * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1282,19 +946,15 @@ private Mono> getWithResponseAsync( * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return getWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, + backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1306,20 +966,15 @@ public Mono getAsync( * @return a long term retention backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return getWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .block(); + public Response getWithResponse(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, + backupName, context).block(); } /** * Gets a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1330,19 +985,15 @@ public Response getWithResponse( * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner get( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return getWithResponse( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, Context.NONE) - .getValue(); + public LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return getWithResponse(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + Context.NONE).getValue(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1353,60 +1004,40 @@ public LongTermRetentionBackupInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { + public Mono>> deleteWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1418,58 +1049,39 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private Mono>> deleteWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1480,23 +1092,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - Mono>> mono = - deleteWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1508,24 +1114,18 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1536,18 +1136,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) + public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return this + .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1559,20 +1157,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return beginDeleteAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) + public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + return this + .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + context) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1583,11 +1178,8 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { + public Mono deleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1595,7 +1187,7 @@ public Mono deleteAsync( /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1607,21 +1199,15 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return beginDeleteAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1631,17 +1217,14 @@ private Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + public void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1652,19 +1235,15 @@ public void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + public void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) .block(); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1674,44 +1253,33 @@ 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 a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> copyWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public Mono>> copyWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1720,26 +1288,15 @@ public Mono>> copyWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .copy( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.copy(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1750,45 +1307,33 @@ public Mono>> copyWithResponseAsync( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> copyWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { + private Mono>> copyWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1797,23 +1342,14 @@ private Mono>> copyWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .copy( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.copy(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1825,30 +1361,21 @@ private Mono>> copyWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - Mono>> mono = - copyWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this - .client + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { + Mono>> mono = copyWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1861,37 +1388,22 @@ private Mono>> copyWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - copyWithResponseAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context); - return this - .client + Mono>> mono = copyWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - context); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1903,22 +1415,19 @@ private Mono>> copyWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - return beginCopyAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopy(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { + return this + .beginCopyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters) .getSyncPoller(); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1931,28 +1440,19 @@ private Mono>> copyWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { - return beginCopyAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopy(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { + return this + .beginCopyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context) .getSyncPoller(); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1964,21 +1464,16 @@ private Mono>> copyWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public Mono copyAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { - return beginCopyAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCopyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -1991,27 +1486,16 @@ public Mono copyAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono copyAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { - return beginCopyAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono copyAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters, Context context) { + return beginCopyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2023,20 +1507,15 @@ private Mono copyAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - return copyAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) - .block(); + public LongTermRetentionBackupOperationResultInner copy(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { + return copyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).block(); } /** * Copy an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2049,26 +1528,16 @@ public LongTermRetentionBackupOperationResultInner copy( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copy( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, + public LongTermRetentionBackupOperationResultInner copy(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { - return copyAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .block(); + return copyAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).block(); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2078,44 +1547,33 @@ public LongTermRetentionBackupOperationResultInner copy( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public Mono>> updateWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2124,26 +1582,15 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2154,45 +1601,33 @@ public Mono>> updateWithResponseAsync( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { + private Mono>> updateWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2201,23 +1636,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2229,30 +1655,21 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - Mono>> mono = - updateWithResponseAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this - .client + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2265,37 +1682,22 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context); - return this - .client + Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - context); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2307,22 +1709,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdate( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return this + .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters) .getSyncPoller(); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2335,28 +1734,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdate( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return beginUpdateAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + return this + .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context) .getSyncPoller(); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2368,21 +1758,16 @@ private Mono>> updateWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2395,27 +1780,16 @@ public Mono updateAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return beginUpdateAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context) { + return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2427,20 +1801,15 @@ private Mono updateAsync( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner update( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return updateAsync( - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters) - .block(); + public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).block(); } /** * Updates an existing long term retention backup. - * + * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2453,45 +1822,33 @@ public LongTermRetentionBackupOperationResultInner update( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner update( - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, + public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { - return updateAsync( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .block(); + return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).block(); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupLocationSinglePageAsync( String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2501,43 +1858,24 @@ private Mono> listByResourceGroupLoc return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, + locationName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -2545,21 +1883,16 @@ private Mono> listByResourceGroupLoc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2569,40 +1902,24 @@ private Mono> listByResourceGroupLoc return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -2612,20 +1929,18 @@ private Mono> listByResourceGroupLoc * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), + public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2633,22 +1948,20 @@ public PagedFlux listByResourceGroupLocationAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName) { + public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -2659,24 +1972,18 @@ public PagedFlux listByResourceGroupLocationAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context), + private PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2684,8 +1991,8 @@ private PagedFlux listByResourceGroupLocationAsync * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation( - String resourceGroupName, String locationName) { + public PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( @@ -2694,9 +2001,9 @@ public PagedIterable listByResourceGroupLocation( /** * Lists the long term retention backups for a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -2707,22 +2014,17 @@ public PagedIterable listByResourceGroupLocation( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByResourceGroupLocationAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context)); + public PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2730,21 +2032,16 @@ public PagedIterable listByResourceGroupLocation( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupServerSinglePageAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + String resourceGroupName, String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2754,50 +2051,28 @@ private Mono> listByResourceGroupSer return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupServer( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroupServer(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2806,22 +2081,16 @@ private Mono> listByResourceGroupSer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupServerSinglePageAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String resourceGroupName, String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2831,47 +2100,28 @@ private Mono> listByResourceGroupSer return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupServer( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupServer(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2882,24 +2132,20 @@ private Mono> listByResourceGroupSer * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupServerAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, + public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> - listByResourceGroupServerSinglePageAsync( - resourceGroupName, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState), + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2908,22 +2154,21 @@ public PagedFlux listByResourceGroupServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupServerAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName) { + public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( - () -> - listByResourceGroupServerSinglePageAsync( - resourceGroupName, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState), + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2935,30 +2180,20 @@ public PagedFlux listByResourceGroupServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupServerAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + private PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { return new PagedFlux<>( - () -> - listByResourceGroupServerSinglePageAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - context), + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2967,20 +2202,19 @@ private PagedFlux listByResourceGroupServerAsync( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupServer( - String resourceGroupName, String locationName, String longTermRetentionServerName) { + public PagedIterable listByResourceGroupServer(String resourceGroupName, + String locationName, String longTermRetentionServerName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedIterable<>( - listByResourceGroupServerAsync( - resourceGroupName, locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); + return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); } /** * Lists the long term retention backups for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2992,28 +2226,18 @@ public PagedIterable listByResourceGroupServer( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupServer( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByResourceGroupServerAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - onlyLatestPerDatabase, - databaseState, - context)); + public PagedIterable listByResourceGroupServer(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, context)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3022,22 +2246,16 @@ public PagedIterable listByResourceGroupServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3047,57 +2265,32 @@ private Mono> listByResourceGroupDat return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupDatabase( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3107,23 +2300,17 @@ private Mono> listByResourceGroupDat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3133,54 +2320,32 @@ private Mono> listByResourceGroupDat return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupDatabase( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3192,30 +2357,20 @@ private Mono> listByResourceGroupDat * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3225,30 +2380,21 @@ public PagedFlux listByResourceGroupDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName) { + public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3261,32 +2407,19 @@ public PagedFlux listByResourceGroupDatabaseAsync( * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - context), + private PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3296,28 +2429,19 @@ private PagedFlux listByResourceGroupDatabaseAsync * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName) { + public PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedIterable<>( - listByResourceGroupDatabaseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState)); + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState)); } /** * Lists all long term retention backups for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3330,30 +2454,18 @@ public PagedIterable listByResourceGroupDatabase( * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByResourceGroupDatabaseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - onlyLatestPerDatabase, - databaseState, - context)); + public PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context)); } /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3364,17 +2476,12 @@ public PagedIterable listByResourceGroupDatabase( * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3384,50 +2491,33 @@ public Mono> getByResourceGroupWithRespon return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3439,18 +2529,12 @@ public Mono> getByResourceGroupWithRespon * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3460,47 +2544,32 @@ private Mono> getByResourceGroupWithRespo return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3511,22 +2580,17 @@ private Mono> getByResourceGroupWithRespo * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return getByResourceGroupWithResponseAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3538,28 +2602,18 @@ public Mono getByResourceGroupAsync( * @return a long term retention backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return getByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - context) - .block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).block(); } /** * Gets a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3570,27 +2624,17 @@ public Response getByResourceGroupWithResponse( * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner getByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return getByResourceGroupWithResponse( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - Context.NONE) - .getValue(); + public LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return getByResourceGroupWithResponse(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, Context.NONE).getValue(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3601,17 +2645,12 @@ public LongTermRetentionBackupInner getByResourceGroup( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3621,48 +2660,32 @@ public Mono>> deleteByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .deleteByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3674,18 +2697,12 @@ public Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3695,45 +2712,31 @@ private Mono>> deleteByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .deleteByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3744,30 +2747,20 @@ private Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, + public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = - deleteByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3779,32 +2772,21 @@ public PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { + private PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3815,22 +2797,19 @@ private PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3842,28 +2821,19 @@ public SyncPoller, Void> beginDeleteByResourceGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - context) + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3874,23 +2844,17 @@ public SyncPoller, Void> beginDeleteByResourceGroup( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3902,29 +2866,17 @@ public Mono deleteByResourceGroupAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3934,22 +2886,17 @@ private Mono deleteByResourceGroupAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName) { - deleteByResourceGroupAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .block(); + public void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).block(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3960,28 +2907,17 @@ public void deleteByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - Context context) { - deleteByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - context) - .block(); + public void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).block(); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -3991,21 +2927,15 @@ public void deleteByResourceGroup( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> copyByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { + public Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4015,25 +2945,19 @@ public Mono>> copyByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -4042,29 +2966,17 @@ public Mono>> copyByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .copyByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.copyByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4075,22 +2987,15 @@ public Mono>> copyByResourceGroupWithResponseAsync( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> copyByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { + private Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4100,25 +3005,19 @@ private Mono>> copyByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -4127,26 +3026,16 @@ private Mono>> copyByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .copyByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.copyByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4158,38 +3047,23 @@ private Mono>> copyByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - Mono>> mono = - copyByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters); - return this - .client + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { + Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4202,41 +3076,25 @@ private Mono>> copyByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - copyByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context); - return this - .client + Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - context); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4248,30 +3106,21 @@ private Mono>> copyByResourceGroupWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - return beginCopyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { + return this + .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters) .getSyncPoller(); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4284,32 +3133,22 @@ private Mono>> copyByResourceGroupWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { - return beginCopyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) + return this + .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context) .getSyncPoller(); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4321,29 +3160,19 @@ private Mono>> copyByResourceGroupWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - return beginCopyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) - .last() + public Mono copyByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { + return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4356,31 +3185,19 @@ public Mono copyByResourceGroupAsyn * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono copyByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { - return beginCopyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .last() + private Mono copyByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { + return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4392,28 +3209,18 @@ private Mono copyByResourceGroupAsy * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters) { - return copyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) - .block(); + public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { + return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).block(); } /** * Copy an existing long term retention backup to a different server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4426,30 +3233,18 @@ public LongTermRetentionBackupOperationResultInner copyByResourceGroup( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copyByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - CopyLongTermRetentionBackupParameters parameters, - Context context) { - return copyByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .block(); + public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { + return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).block(); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4459,21 +3254,15 @@ public LongTermRetentionBackupOperationResultInner copyByResourceGroup( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { + public Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4483,25 +3272,19 @@ public Mono>> updateByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -4510,29 +3293,17 @@ public Mono>> updateByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.updateByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4543,22 +3314,15 @@ public Mono>> updateByResourceGroupWithResponseAsync( * @throws 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { + private Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4568,25 +3332,19 @@ private Mono>> updateByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (longTermRetentionServerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionServerName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } if (longTermRetentionDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -4595,26 +3353,16 @@ private Mono>> updateByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.updateByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4626,38 +3374,24 @@ private Mono>> updateByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { - Mono>> mono = - updateByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters); - return this - .client + Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4670,41 +3404,25 @@ private Mono>> updateByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateByResourceGroupWithResponseAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context); - return this - .client + Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, - context); + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4716,30 +3434,22 @@ private Mono>> updateByResourceGroupWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) + return this + .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters) .getSyncPoller(); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4752,32 +3462,22 @@ private Mono>> updateByResourceGroupWithResponseAsync( * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { - return beginUpdateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) + return this + .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context) .getSyncPoller(); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4789,29 +3489,19 @@ private Mono>> updateByResourceGroupWithResponseAsync( * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) - .last() + public Mono updateByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4824,31 +3514,19 @@ public Mono updateByResourceGroupAs * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateByResourceGroupAsync( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return beginUpdateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .last() + private Mono updateByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4860,28 +3538,18 @@ private Mono updateByResourceGroupA * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner updateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return updateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters) - .block(); + public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).block(); } /** * Updates an existing long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -4894,35 +3562,22 @@ public LongTermRetentionBackupOperationResultInner updateByResourceGroup( * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner updateByResourceGroup( - String resourceGroupName, - String locationName, - String longTermRetentionServerName, - String longTermRetentionDatabaseName, - String backupName, - UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return updateByResourceGroupAsync( - resourceGroupName, - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - context) - .block(); + public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -4930,75 +3585,54 @@ private Mono> listByLocationNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -5006,75 +3640,54 @@ private Mono> listByServerNextSingle return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -5082,298 +3695,211 @@ private Mono> listByDatabaseNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupServerNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupServerNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java index 940a615c592aa..ecd0cbd3f946f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java @@ -43,24 +43,24 @@ */ public final class LongTermRetentionManagedInstanceBackupsClientImpl implements LongTermRetentionManagedInstanceBackupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LongTermRetentionManagedInstanceBackupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of LongTermRetentionManagedInstanceBackupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LongTermRetentionManagedInstanceBackupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - LongTermRetentionManagedInstanceBackupsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(LongTermRetentionManagedInstanceBackupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -71,250 +71,178 @@ public final class LongTermRetentionManagedInstanceBackupsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionManagedInstanceBackupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}" - + "/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}" - + "/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}" - + "/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}" - + "/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}" - + "/longTermRetentionManagedInstanceBackups/{backupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}" - + "/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}" - + "/longTermRetentionManagedInstanceBackups/{backupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}" - + "/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstance( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupLocation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases" - + "/{databaseName}/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases" - + "/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases" - + "/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> deleteByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("backupName") String backupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}" - + "/longTermRetentionManagedInstanceBackups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupInstance( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("databaseState") DatabaseState databaseState, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -322,55 +250,36 @@ Mono> listByResourceG * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + private Mono> + listByLocationSinglePageAsync(String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -379,91 +288,71 @@ private Mono> listByL * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync( String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + public PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -471,12 +360,12 @@ public PagedFlux listByLocationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + private PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedFlux<>( () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); @@ -484,13 +373,13 @@ private PagedFlux listByLocationAsy /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLocation(String locationName) { @@ -501,7 +390,7 @@ public PagedIterable listByLocation /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -509,18 +398,18 @@ public PagedIterable listByLocation * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + public PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, context)); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -530,20 +419,15 @@ public PagedIterable listByLocation * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -556,42 +440,23 @@ private Mono> listByD return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -602,21 +467,15 @@ private Mono> listByD * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -629,39 +488,22 @@ private Mono> listByD return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -670,50 +512,40 @@ private Mono> listByD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String locationName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -723,39 +555,33 @@ public PagedFlux listByDatabaseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + private PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, context), + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String locationName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( @@ -764,7 +590,7 @@ public PagedIterable listByDatabase /** * Lists all long term retention backups for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -774,25 +600,20 @@ public PagedIterable listByDatabase * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + public PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, context)); + return new PagedIterable<>(listByDatabaseAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, context)); } /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -801,16 +622,14 @@ public PagedIterable listByDatabase * @throws 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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName) { + public Mono> getWithResponseAsync(String locationName, + String managedInstanceName, String databaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -826,32 +645,20 @@ public Mono> getWithRespon return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, + backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -861,16 +668,14 @@ public Mono> getWithRespon * @throws 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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + private Mono> getWithResponseAsync(String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -886,29 +691,18 @@ private Mono> getWithRespo return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -919,15 +713,15 @@ private Mono> getWithRespo * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String locationName, String managedInstanceName, String databaseName, String backupName) { + public Mono getAsync(String locationName, String managedInstanceName, + String databaseName, String backupName) { return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -939,14 +733,14 @@ public Mono getAsync( * @return a long term retention backup for a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + public Response getWithResponse(String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); } /** * Gets a long term retention backup for a managed database. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -957,14 +751,14 @@ public Response getWithResponse( * @return a long term retention backup for a managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionBackupInner get( - String locationName, String managedInstanceName, String databaseName, String backupName) { + public ManagedInstanceLongTermRetentionBackupInner get(String locationName, String managedInstanceName, + String databaseName, String backupName) { return getWithResponse(locationName, managedInstanceName, databaseName, backupName, Context.NONE).getValue(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -975,13 +769,11 @@ public ManagedInstanceLongTermRetentionBackupInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName) { + public Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, + String databaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -997,30 +789,18 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), locationName, managedInstanceName, + databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1032,13 +812,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + private Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -1054,27 +832,17 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1085,19 +853,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String locationName, String managedInstanceName, String databaseName, String backupName) { - Mono>> mono = - deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String locationName, String managedInstanceName, + String databaseName, String backupName) { + Mono>> mono + = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1109,19 +875,18 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1132,14 +897,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String locationName, String managedInstanceName, String databaseName, String backupName) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, + String databaseName, String backupName) { + return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1151,14 +916,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { + return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context) + .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1169,16 +935,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String locationName, String managedInstanceName, String databaseName, String backupName) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName) - .last() + public Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, + String backupName) { + return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1190,16 +955,15 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context) - .last() + private Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, + String backupName, Context context) { + return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1215,7 +979,7 @@ public void delete(String locationName, String managedInstanceName, String datab /** * Deletes a long term retention backup. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1226,14 +990,14 @@ public void delete(String locationName, String managedInstanceName, String datab * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + public void delete(String locationName, String managedInstanceName, String databaseName, String backupName, + Context context) { deleteAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -1242,16 +1006,14 @@ 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 a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceSinglePageAsync( String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -1261,41 +1023,23 @@ private Mono> listByI .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - locationName, - managedInstanceName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -1305,20 +1049,15 @@ private Mono> listByI * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceSinglePageAsync( - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -1328,38 +1067,21 @@ private Mono> listByI .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - locationName, - managedInstanceName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), locationName, managedInstanceName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -1367,43 +1089,39 @@ private Mono> listByI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> - listByInstanceSinglePageAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + public PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String locationName, String managedInstanceName) { + public PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> - listByInstanceSinglePageAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -1412,37 +1130,31 @@ public PagedFlux listByInstanceAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedFlux<>( - () -> - listByInstanceSinglePageAsync( - locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, context), + private PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String locationName, String managedInstanceName) { + public PagedIterable listByInstance(String locationName, + String managedInstanceName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( @@ -1451,7 +1163,7 @@ public PagedIterable listByInstance /** * Lists the long term retention backups for a given managed instance. - * + * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -1460,25 +1172,21 @@ public PagedIterable listByInstance * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + public PagedIterable listByInstance(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedIterable<>( listByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, context)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -1486,16 +1194,14 @@ public PagedIterable listByInstance * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupLocationSinglePageAsync( String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1505,43 +1211,25 @@ private Mono> listByR return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, + locationName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -1550,20 +1238,15 @@ private Mono> listByR * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1573,88 +1256,68 @@ private Mono> listByR return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupLocationAsync( String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName) { + public PagedFlux + listByResourceGroupLocationAsync(String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -1662,38 +1325,33 @@ public PagedFlux listByResourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupLocationSinglePageAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context), + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation( - String resourceGroupName, String locationName) { + public PagedIterable + listByResourceGroupLocation(String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( @@ -1702,9 +1360,9 @@ public PagedIterable listByResource /** * Lists the long term retention backups for managed databases in a given location. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. @@ -1712,26 +1370,22 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroupLocation( - String resourceGroupName, - String locationName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>( - listByResourceGroupLocationAsync( - resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context)); + return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1741,21 +1395,15 @@ public PagedIterable listByResource * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1772,45 +1420,25 @@ private Mono> listByR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupDatabase( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1821,22 +1449,15 @@ private Mono> listByR * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1853,42 +1474,24 @@ private Mono> listByR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupDatabase( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1897,42 +1500,32 @@ private Mono> listByR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupDatabaseAsync( @@ -1940,22 +1533,16 @@ public PagedFlux listByResourceGrou final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState), + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -1965,65 +1552,47 @@ public PagedFlux listByResourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { return new PagedFlux<>( - () -> - listByResourceGroupDatabaseSinglePageAsync( - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - context), + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroupDatabase( String resourceGroupName, String locationName, String managedInstanceName, String databaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedIterable<>( - listByResourceGroupDatabaseAsync( - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState)); + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState)); } /** * Lists all long term retention backups for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2033,34 +1602,22 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroupDatabase( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByResourceGroupDatabaseAsync( - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - onlyLatestPerDatabase, - databaseState, - context)); + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, context)); } /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2069,20 +1626,15 @@ public PagedIterable listByResource * @throws 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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2102,35 +1654,22 @@ public Mono> getByResource return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2140,21 +1679,15 @@ public Mono> getByResource * @throws 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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2174,32 +1707,21 @@ private Mono> getByResourc return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2210,22 +1732,17 @@ private Mono> getByResourc * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { - return getByResourceGroupWithResponseAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2238,22 +1755,17 @@ public Mono getByResourceGroupAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { - return getByResourceGroupWithResponseAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, context) - .block(); + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + String backupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context).block(); } /** * Gets a long term retention backup for a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2264,22 +1776,17 @@ public Response getByResourceGroupW * @return a long term retention backup for a managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionBackupInner getByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { - return getByResourceGroupWithResponse( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, Context.NONE) - .getValue(); + public ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return getByResourceGroupWithResponse(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, Context.NONE).getValue(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2290,17 +1797,11 @@ public ManagedInstanceLongTermRetentionBackupInner getByResourceGroup( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { + public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2320,33 +1821,21 @@ public Mono>> deleteByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .deleteByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2358,18 +1847,11 @@ public Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteByResourceGroupWithResponseAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { + private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2389,30 +1871,20 @@ private Mono>> deleteByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .deleteByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - backupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2423,26 +1895,19 @@ private Mono>> deleteByResourceGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { - Mono>> mono = - deleteByResourceGroupWithResponseAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2454,27 +1919,20 @@ public PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { + private PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteByResourceGroupWithResponseAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2485,22 +1943,19 @@ private PollerFlux, Void> beginDeleteByResourceGroupAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName) + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2512,23 +1967,19 @@ public SyncPoller, Void> beginDeleteByResourceGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, context) + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context) .getSyncPoller(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2539,23 +1990,17 @@ public SyncPoller, Void> beginDeleteByResourceGroup( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2567,24 +2012,17 @@ public Mono deleteByResourceGroupAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteByResourceGroupAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { - return beginDeleteByResourceGroupAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2594,21 +2032,17 @@ private Mono deleteByResourceGroupAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName) { + public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName) { deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName) .block(); } /** * Deletes a long term retention backup. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -2619,23 +2053,17 @@ public void deleteByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup( - String resourceGroupName, - String locationName, - String managedInstanceName, - String databaseName, - String backupName, - Context context) { - deleteByResourceGroupAsync( - resourceGroupName, locationName, managedInstanceName, databaseName, backupName, context) - .block(); + public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { + deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName, + context).block(); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2644,20 +2072,15 @@ public void deleteByResourceGroup( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupInstanceSinglePageAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, + String resourceGroupName, String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2671,44 +2094,25 @@ private Mono> listByR .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroupInstance( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByResourceGroupInstance(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2718,21 +2122,15 @@ private Mono> listByR * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupInstanceSinglePageAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String resourceGroupName, String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2746,41 +2144,24 @@ private Mono> listByR .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroupInstance( - this.client.getEndpoint(), - resourceGroupName, - locationName, - managedInstanceName, - onlyLatestPerDatabase, - databaseState, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroupInstance(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2788,53 +2169,48 @@ private Mono> listByR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupInstanceAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, + String resourceGroupName, String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> - listByResourceGroupInstanceSinglePageAsync( - resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState), + () -> listByResourceGroupInstanceSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupInstanceNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupInstanceAsync( - String resourceGroupName, String locationName, String managedInstanceName) { + public PagedFlux + listByResourceGroupInstanceAsync(String resourceGroupName, String locationName, String managedInstanceName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( - () -> - listByResourceGroupInstanceSinglePageAsync( - resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState), + () -> listByResourceGroupInstanceSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupInstanceNextSinglePageAsync(nextLink)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2843,57 +2219,46 @@ public PagedFlux listByResourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedFlux}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupInstanceAsync( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { + String resourceGroupName, String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { return new PagedFlux<>( - () -> - listByResourceGroupInstanceSinglePageAsync( - resourceGroupName, - locationName, - managedInstanceName, - onlyLatestPerDatabase, - databaseState, - context), + () -> listByResourceGroupInstanceSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState, context), nextLink -> listByResourceGroupInstanceNextSinglePageAsync(nextLink, context)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupInstance( - String resourceGroupName, String locationName, String managedInstanceName) { + public PagedIterable + listByResourceGroupInstance(String resourceGroupName, String locationName, String managedInstanceName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedIterable<>( - listByResourceGroupInstanceAsync( - resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState)); + return new PagedIterable<>(listByResourceGroupInstanceAsync(resourceGroupName, locationName, + managedInstanceName, onlyLatestPerDatabase, databaseState)); } /** * Lists the long term retention backups for a given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2902,263 +2267,197 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups for managed database(s) as paginated response with {@link - * PagedIterable}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroupInstance( - String resourceGroupName, - String locationName, - String managedInstanceName, - Boolean onlyLatestPerDatabase, - DatabaseState databaseState, - Context context) { - return new PagedIterable<>( - listByResourceGroupInstanceAsync( - resourceGroupName, locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, context)); + String resourceGroupName, String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupInstanceAsync(resourceGroupName, locationName, + managedInstanceName, onlyLatestPerDatabase, databaseState, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink) { + private Mono> + listByLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3167,39 +2466,28 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3208,36 +2496,25 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3246,39 +2523,28 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3287,36 +2553,25 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3325,39 +2580,28 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.listByResourceGroupInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listByResourceGroupInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -3366,23 +2610,13 @@ private Mono> listByI return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java index 701f23aa4185e..8c9c2570088c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LongTermRetentionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in LongTermRetentionPoliciesClient. + */ public final class LongTermRetentionPoliciesClientImpl implements LongTermRetentionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LongTermRetentionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of LongTermRetentionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LongTermRetentionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - LongTermRetentionPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(LongTermRetentionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,89 +70,66 @@ public final class LongTermRetentionPoliciesClientImpl implements LongTermRetent @Host("{$host}") @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - @ExpectedResponses({200}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") LongTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") LongTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LongTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,42 +142,23 @@ private Mono> listByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -204,16 +166,14 @@ private Mono> listByDatabaseSinglePa * @throws 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -226,39 +186,23 @@ private Mono> listByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,18 +211,17 @@ private Mono> listByDatabaseSinglePa * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -288,8 +231,8 @@ public PagedFlux listByDatabaseAsync( * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -297,9 +240,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,16 +251,16 @@ private PagedFlux listByDatabaseAsync( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -327,33 +270,31 @@ public PagedIterable listByDatabase( * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's long term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's long term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, LongTermRetentionPolicyName policyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -369,34 +310,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -404,21 +332,15 @@ public 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 a database's long term retention policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a database's long term retention policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, LongTermRetentionPolicyName policyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -434,31 +356,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -468,17 +379,17 @@ private Mono> getWithResponseAsync( * @return a database's long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, policyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -489,20 +400,16 @@ public Mono getAsync( * @return a database's long term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, context).block(); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -512,16 +419,16 @@ public Response getWithResponse( * @return a database's long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionPolicyInner get( - String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName) { + public LongTermRetentionPolicyInner get(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName) { return getWithResponse(resourceGroupName, serverName, databaseName, policyName, Context.NONE).getValue(); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -532,17 +439,11 @@ public LongTermRetentionPolicyInner get( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -558,10 +459,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -570,28 +469,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -603,18 +491,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, LongTermRetentionPolicyName policyName, + LongTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -630,10 +512,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -642,25 +522,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -672,28 +542,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LongTermRetentionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionPolicyInner.class, - LongTermRetentionPolicyInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, policyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LongTermRetentionPolicyInner.class, LongTermRetentionPolicyInner.class, + this.client.getContext()); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -706,31 +568,21 @@ public PollerFlux, LongTermRetentionPol */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LongTermRetentionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context) { + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, + LongTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LongTermRetentionPolicyInner.class, - LongTermRetentionPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, policyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LongTermRetentionPolicyInner.class, LongTermRetentionPolicyInner.class, + context); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -742,20 +594,17 @@ private PollerFlux, LongTermRetentionPo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LongTermRetentionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) .getSyncPoller(); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -768,21 +617,18 @@ public SyncPoller, LongTermRetentionPol */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LongTermRetentionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) + String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, + LongTermRetentionPolicyInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .getSyncPoller(); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -793,22 +639,17 @@ public SyncPoller, LongTermRetentionPol * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -820,12 +661,8 @@ public Mono createOrUpdateAsync( * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .last() @@ -834,9 +671,9 @@ private Mono createOrUpdateAsync( /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -847,20 +684,16 @@ private Mono createOrUpdateAsync( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters) { + public LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters).block(); } /** * Sets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -872,27 +705,21 @@ public LongTermRetentionPolicyInner createOrUpdate( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - LongTermRetentionPolicyName policyName, - LongTermRetentionPolicyInner parameters, - Context context) { + public LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -900,62 +727,42 @@ private Mono> listByDatabaseNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java index 8f48580bb46bd..ce61295006059 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java @@ -29,24 +29,24 @@ * An instance of this class provides access to all the operations defined in MaintenanceWindowOptionsOperationsClient. */ public final class MaintenanceWindowOptionsOperationsClientImpl implements MaintenanceWindowOptionsOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MaintenanceWindowOptionsOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of MaintenanceWindowOptionsOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MaintenanceWindowOptionsOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - MaintenanceWindowOptionsOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(MaintenanceWindowOptionsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,46 +57,38 @@ public final class MaintenanceWindowOptionsOperationsClientImpl implements Maint @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface MaintenanceWindowOptionsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("maintenanceWindowOptionsName") String maintenanceWindowOptionsName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available maintenance windows along with {@link Response} on successful completion of {@link - * Mono}. + * @return a list of available maintenance windows along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String maintenanceWindowOptionsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -109,40 +101,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (maintenanceWindowOptionsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter maintenanceWindowOptionsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter maintenanceWindowOptionsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowOptionsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowOptionsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -150,21 +128,15 @@ public 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 a list of available maintenance windows along with {@link Response} on successful completion of {@link - * Mono}. + * @return a list of available maintenance windows along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowOptionsName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String maintenanceWindowOptionsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,37 +149,25 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (maintenanceWindowOptionsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter maintenanceWindowOptionsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter maintenanceWindowOptionsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowOptionsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowOptionsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -217,17 +177,17 @@ private Mono> getWithResponseAsync( * @return a list of available maintenance windows on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowOptionsName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowOptionsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -238,21 +198,17 @@ public Mono getAsync( * @return a list of available maintenance windows along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowOptionsName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowOptionsName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowOptionsName, context) .block(); } /** * Gets a list of available maintenance windows. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. @@ -262,8 +218,8 @@ public Response getWithResponse( * @return a list of available maintenance windows. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MaintenanceWindowOptionsInner get( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowOptionsName) { + public MaintenanceWindowOptionsInner get(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowOptionsName) { return getWithResponse(resourceGroupName, serverName, databaseName, maintenanceWindowOptionsName, Context.NONE) .getValue(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java index 82616bf05b3d3..d6e77ae749cf4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java @@ -27,24 +27,28 @@ import com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MaintenanceWindowsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in MaintenanceWindowsOperationsClient. + */ public final class MaintenanceWindowsOperationsClientImpl implements MaintenanceWindowsOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MaintenanceWindowsOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of MaintenanceWindowsOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MaintenanceWindowsOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - MaintenanceWindowsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(MaintenanceWindowsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -55,46 +59,34 @@ public final class MaintenanceWindowsOperationsClientImpl implements Maintenance @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface MaintenanceWindowsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/maintenanceWindows/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("maintenanceWindowName") String maintenanceWindowName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/maintenanceWindows/current") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("maintenanceWindowName") String maintenanceWindowName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MaintenanceWindowsInner parameters, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MaintenanceWindowsInner parameters, Context context); } /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -102,16 +94,14 @@ Mono> createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return maintenance windows settings for a database along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -128,34 +118,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -164,20 +141,14 @@ public 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 maintenance windows settings for a database along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -194,31 +165,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -228,17 +188,17 @@ private Mono> getWithResponseAsync( * @return maintenance windows settings for a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -249,21 +209,17 @@ public Mono getAsync( * @return maintenance windows settings for a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowName, context) .block(); } /** * Gets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. @@ -273,38 +229,32 @@ public Response getWithResponse( * @return maintenance windows settings for a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MaintenanceWindowsInner get( - String resourceGroupName, String serverName, String databaseName, String maintenanceWindowName) { + public MaintenanceWindowsInner get(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName) { return getWithResponse(resourceGroupName, serverName, databaseName, maintenanceWindowName, Context.NONE) .getValue(); } /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName, MaintenanceWindowsInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -321,10 +271,8 @@ public Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -332,31 +280,21 @@ public Mono> createOrUpdateWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,18 +302,11 @@ public Mono> createOrUpdateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String maintenanceWindowName, MaintenanceWindowsInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,10 +323,8 @@ private Mono> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter maintenanceWindowName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -403,54 +332,40 @@ private Mono> createOrUpdateWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - maintenanceWindowName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, maintenanceWindowName, parameters) - .flatMap(ignored -> Mono.empty()); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, MaintenanceWindowsInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowName, + parameters).flatMap(ignored -> Mono.empty()); } /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -458,39 +373,29 @@ public Mono createOrUpdateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, maintenanceWindowName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, MaintenanceWindowsInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, maintenanceWindowName, + parameters, context).block(); } /** * Sets maintenance windows settings for a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. - * @param parameters Maintenance windows. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String maintenanceWindowName, - MaintenanceWindowsInner parameters) { - createOrUpdateWithResponse( - resourceGroupName, serverName, databaseName, maintenanceWindowName, parameters, Context.NONE); + public void createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String maintenanceWindowName, MaintenanceWindowsInner parameters) { + createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, maintenanceWindowName, parameters, + Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java index 6fb127ee0d588..d4555fb49ae0b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java @@ -45,24 +45,24 @@ */ public final class ManagedBackupShortTermRetentionPoliciesClientImpl implements ManagedBackupShortTermRetentionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedBackupShortTermRetentionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedBackupShortTermRetentionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedBackupShortTermRetentionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedBackupShortTermRetentionPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedBackupShortTermRetentionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -73,110 +73,82 @@ public final class ManagedBackupShortTermRetentionPoliciesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedBackupShortTermRetentionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies" - + "/{policyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies" - + "/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies" - + "/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,42 +162,25 @@ private Mono> listByDa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -233,16 +188,14 @@ private Mono> listByDa * @throws 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 managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -256,39 +209,23 @@ private Mono> listByDa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,8 +234,8 @@ private Mono> listByDa * @return a managed database's short term retention policy list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -306,9 +243,9 @@ public PagedFlux listByDatabaseAsync /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -318,8 +255,8 @@ public PagedFlux listByDatabaseAsync * @return a managed database's short term retention policy list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -327,9 +264,9 @@ private PagedFlux listByDatabaseAsyn /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,16 +275,16 @@ private PagedFlux listByDatabaseAsyn * @return a managed database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** * Gets a managed database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -357,16 +294,16 @@ public PagedIterable listByDatabase( * @return a managed database's short term retention policy list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); } /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -374,19 +311,14 @@ public PagedIterable listByDatabase( * @throws 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 managed database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -403,34 +335,22 @@ public Mono> getWithRespons return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -439,20 +359,15 @@ public Mono> getWithRespons * @throws 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 managed database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -469,31 +384,20 @@ private Mono> getWithRespon return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -503,20 +407,17 @@ private Mono> getWithRespon * @return a managed database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -527,20 +428,17 @@ public Mono getAsync( * @return a managed database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context).block(); } /** * Gets a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -550,20 +448,17 @@ public Response getWithResponse( * @return a managed database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName) { + public ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, policyName, Context.NONE) .getValue(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -574,17 +469,12 @@ public ManagedBackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -601,10 +491,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -613,28 +501,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -646,18 +523,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -674,10 +545,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -686,25 +555,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -715,32 +574,23 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + public + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, policyName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -752,34 +602,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + private + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, policyName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, context); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -790,23 +631,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .getSyncPoller(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -818,25 +656,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context) .getSyncPoller(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -847,11 +682,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .last() @@ -860,9 +692,9 @@ public Mono createOrUpdateAsync( /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -874,24 +706,18 @@ public Mono createOrUpdateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -902,11 +728,8 @@ private Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .block(); @@ -914,9 +737,9 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -928,23 +751,18 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) - .block(); + public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context).block(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -955,17 +773,12 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -982,10 +795,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -994,28 +805,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1027,18 +827,12 @@ public Mono>> updateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1055,10 +849,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1067,25 +859,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1096,31 +878,23 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + public + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1132,34 +906,25 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + private + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, policyName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, context); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1170,23 +935,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .getSyncPoller(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1198,24 +959,21 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) + return this + .beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) .getSyncPoller(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1226,22 +984,18 @@ private Mono>> updateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public Mono updateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) - .last() + return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1253,13 +1007,9 @@ public Mono updateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono updateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1267,9 +1017,9 @@ private Mono updateAsync( /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1280,20 +1030,17 @@ private Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, + public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { return updateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters).block(); } /** * Updates a managed database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be "default". @@ -1305,91 +1052,67 @@ public ManagedBackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { return updateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java index ad0d440924142..c63c103cc0679 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java @@ -34,23 +34,28 @@ import java.util.stream.Collectors; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseColumnsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseColumnsClient. + */ public final class ManagedDatabaseColumnsClientImpl implements ManagedDatabaseColumnsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseColumnsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseColumnsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseColumnsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ManagedDatabaseColumnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseColumnsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -61,14 +66,11 @@ public final class ManagedDatabaseColumnsClientImpl implements ManagedDatabaseCo @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseColumnsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/columns") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @@ -76,84 +78,61 @@ Mono> listByDatabase( @QueryParam(value = "table", multipleQueryParams = true) List table, @QueryParam(value = "column", multipleQueryParams = true) List column, @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, - @QueryParam("$skiptoken") String skiptoken, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skiptoken") String skiptoken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTable( - @HostParam("$host") String endpoint, + Mono> listByTable(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}") - @ExpectedResponses({200}) + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByTableNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -161,20 +140,12 @@ Mono> listByTableNext( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -188,69 +159,42 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - List schemaConverted = - (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = - (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = - (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = - (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaConverted, - tableConverted, - columnConverted, - orderByConverted, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaConverted, tableConverted, columnConverted, orderByConverted, + skiptoken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -259,21 +203,12 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -287,66 +222,42 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - List schemaConverted = - (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = - (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = - (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = - (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaConverted, - tableConverted, - columnConverted, - orderByConverted, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaConverted, tableConverted, columnConverted, orderByConverted, skiptoken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -354,27 +265,18 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, String skiptoken) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schema, table, column, orderBy, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -383,31 +285,28 @@ public PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { final List schema = null; final List table = null; final List column = null; final List orderBy = null; final String skiptoken = null; - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schema, table, column, orderBy, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,36 +315,19 @@ public PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, - managedInstanceName, - databaseName, - schema, - table, - column, - orderBy, - skiptoken, - context), + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,29 +336,28 @@ private PagedFlux listByDatabaseAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { final List schema = null; final List table = null; final List column = null; final List orderBy = null; final String skiptoken = null; - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, managedInstanceName, databaseName, schema, table, column, orderBy, skiptoken)); + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, + table, column, orderBy, skiptoken)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema Array of Get3ItemsItem. - * @param table Array of Get4ItemsItem. - * @param column Array of Get5ItemsItem. - * @param orderBy Array of Get6ItemsItem. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. * @param skiptoken An opaque token that identifies a starting point in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -485,34 +366,18 @@ public PagedIterable listByDatabase( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - List schema, - List table, - List column, - List orderBy, - String skiptoken, - Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - schema, - table, - column, - orderBy, - skiptoken, - context)); + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, + table, column, orderBy, skiptoken, context)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -524,18 +389,11 @@ public PagedIterable listByDatabase( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter) { + private Mono> listByTableSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -555,45 +413,24 @@ private Mono> listByTableSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByTable( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByTable(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -606,19 +443,12 @@ private Mono> listByTableSinglePageAsync( * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter, + private Mono> listByTableSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,42 +468,23 @@ private Mono> listByTableSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByTable( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByTable(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -685,25 +496,17 @@ private Mono> listByTableSinglePageAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTableAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter) { - return new PagedFlux<>( - () -> - listByTableSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter), - nextLink -> listByTableNextSinglePageAsync(nextLink)); + public PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String filter) { + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, filter), nextLink -> listByTableNextSinglePageAsync(nextLink)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -714,25 +517,18 @@ public PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTableAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName) { + public PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName) { final String filter = null; - return new PagedFlux<>( - () -> - listByTableSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter), - nextLink -> listByTableNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, filter), nextLink -> listByTableNextSinglePageAsync(nextLink)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -745,26 +541,17 @@ public PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByTableAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context) { - return new PagedFlux<>( - () -> - listByTableSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter, context), - nextLink -> listByTableNextSinglePageAsync(nextLink, context)); + private PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String filter, Context context) { + return new PagedFlux<>(() -> listByTableSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, filter, context), nextLink -> listByTableNextSinglePageAsync(nextLink, context)); } /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -775,12 +562,8 @@ private PagedFlux listByTableAsync( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTable( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName) { + public PagedIterable listByTable(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName) { final String filter = null; return new PagedIterable<>( listByTableAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter)); @@ -788,9 +571,9 @@ public PagedIterable listByTable( /** * List managed database columns. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -803,24 +586,17 @@ public PagedIterable listByTable( * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTable( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String filter, - Context context) { - return new PagedIterable<>( - listByTableAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter, context)); + public PagedIterable listByTable(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String filter, Context context) { + return new PagedIterable<>(listByTableAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, filter, context)); } /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -832,18 +608,11 @@ public PagedIterable listByTable( * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -866,36 +635,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -908,19 +663,12 @@ public Mono> getWithResponseAsync( * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -943,33 +691,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -981,23 +716,17 @@ private Mono> getWithResponseAsync( * @return managed database column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1010,24 +739,17 @@ public Mono getAsync( * @return managed database column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, context).block(); } /** * Get managed database column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1039,23 +761,16 @@ public Response getWithResponse( * @return managed database column. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseColumnInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return getWithResponse( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, Context.NONE) - .getValue(); + public DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1067,31 +782,21 @@ private Mono> listByDatabaseNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1099,37 +804,26 @@ private Mono> listByDatabaseNextSinglePageAsy * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1141,31 +835,21 @@ private Mono> listByTableNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1178,23 +862,13 @@ private Mono> listByTableNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByTableNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java index df036889f8808..9eda99917fd60 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java @@ -32,23 +32,28 @@ import com.azure.resourcemanager.sql.models.QueryTimeGrainType; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseQueriesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseQueriesClient. + */ public final class ManagedDatabaseQueriesClientImpl implements ManagedDatabaseQueriesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseQueriesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseQueriesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseQueriesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ManagedDatabaseQueriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseQueriesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -59,59 +64,43 @@ public final class ManagedDatabaseQueriesClientImpl implements ManagedDatabaseQu @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseQueriesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("queryId") String queryId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("queryId") String queryId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByQuery( - @HostParam("$host") String endpoint, + Mono> listByQuery(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("queryId") String queryId, - @QueryParam("startTime") String startTime, - @QueryParam("endTime") String endTime, - @QueryParam("interval") QueryTimeGrainType interval, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("queryId") String queryId, + @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, + @QueryParam("interval") QueryTimeGrainType interval, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByQueryNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -121,13 +110,11 @@ Mono> listByQueryNext( * @return query by query id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String queryId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -144,34 +131,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter queryId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - queryId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, queryId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -182,13 +156,11 @@ public Mono> getWithResponseAsync( * @return query by query id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String queryId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -205,31 +177,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter queryId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - queryId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, queryId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -239,17 +200,17 @@ private Mono> getWithResponseAsync( * @return query by query id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, queryId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -260,16 +221,16 @@ public Mono getAsync( * @return query by query id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, queryId, context).block(); } /** * Get query by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -279,16 +240,16 @@ public Response getWithResponse( * @return query by query id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceQueryInner get( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId) { + public ManagedInstanceQueryInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String queryId) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, queryId, Context.NONE).getValue(); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -299,22 +260,15 @@ public ManagedInstanceQueryInner 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 query execution statistics by query id along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByQuerySinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, + private Mono> listByQuerySinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -331,46 +285,24 @@ private Mono> listByQuerySinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter queryId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByQuery( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - queryId, - startTime, - endTime, - interval, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByQuery(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, queryId, startTime, endTime, interval, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -382,23 +314,15 @@ private Mono> listByQuerySinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return query execution statistics by query id along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByQuerySinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval, - Context context) { + private Mono> listByQuerySinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String queryId, String startTime, String endTime, + QueryTimeGrainType interval, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,43 +339,24 @@ private Mono> listByQuerySinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter queryId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByQuery( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - queryId, - startTime, - endTime, - interval, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .listByQuery(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, queryId, + startTime, endTime, interval, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -464,26 +369,17 @@ private Mono> listByQuerySinglePageAsync( * @return query execution statistics by query id as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByQueryAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval) { - return new PagedFlux<>( - () -> - listByQuerySinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, queryId, startTime, endTime, interval), - nextLink -> listByQueryNextSinglePageAsync(nextLink)); + public PagedFlux listByQueryAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval) { + return new PagedFlux<>(() -> listByQuerySinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + queryId, startTime, endTime, interval), nextLink -> listByQueryNextSinglePageAsync(nextLink)); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -493,23 +389,20 @@ public PagedFlux listByQueryAsync( * @return query execution statistics by query id as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByQueryAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId) { + public PagedFlux listByQueryAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId) { final String startTime = null; final String endTime = null; final QueryTimeGrainType interval = null; - return new PagedFlux<>( - () -> - listByQuerySinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, queryId, startTime, endTime, interval), - nextLink -> listByQueryNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByQuerySinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + queryId, startTime, endTime, interval), nextLink -> listByQueryNextSinglePageAsync(nextLink)); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -523,34 +416,19 @@ public PagedFlux listByQueryAsync( * @return query execution statistics by query id as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByQueryAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval, + private PagedFlux listByQueryAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval, Context context) { - return new PagedFlux<>( - () -> - listByQuerySinglePageAsync( - resourceGroupName, - managedInstanceName, - databaseName, - queryId, - startTime, - endTime, - interval, - context), + return new PagedFlux<>(() -> listByQuerySinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + queryId, startTime, endTime, interval, context), nextLink -> listByQueryNextSinglePageAsync(nextLink, context)); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -560,21 +438,20 @@ private PagedFlux listByQueryAsync( * @return query execution statistics by query id as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByQuery( - String resourceGroupName, String managedInstanceName, String databaseName, String queryId) { + public PagedIterable listByQuery(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId) { final String startTime = null; final String endTime = null; final QueryTimeGrainType interval = null; - return new PagedIterable<>( - listByQueryAsync( - resourceGroupName, managedInstanceName, databaseName, queryId, startTime, endTime, interval)); + return new PagedIterable<>(listByQueryAsync(resourceGroupName, managedInstanceName, databaseName, queryId, + startTime, endTime, interval)); } /** * Get query execution statistics by query id. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -588,30 +465,22 @@ public PagedIterable listByQuery( * @return query execution statistics by query id as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByQuery( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String queryId, - String startTime, - String endTime, - QueryTimeGrainType interval, + public PagedIterable listByQuery(String resourceGroupName, String managedInstanceName, + String databaseName, String queryId, String startTime, String endTime, QueryTimeGrainType interval, Context context) { - return new PagedIterable<>( - listByQueryAsync( - resourceGroupName, managedInstanceName, databaseName, queryId, startTime, endTime, interval, context)); + return new PagedIterable<>(listByQueryAsync(resourceGroupName, managedInstanceName, databaseName, queryId, + startTime, endTime, interval, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return execution statistics for one particular query along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByQueryNextSinglePageAsync(String nextLink) { @@ -619,37 +488,27 @@ private Mono> listByQueryNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByQueryNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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 execution statistics for one particular query along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByQueryNextSinglePageAsync(String nextLink, Context context) { @@ -657,23 +516,13 @@ private Mono> listByQueryNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByQueryNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByQueryNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java index 1a675d0b6c43c..066544d6f34de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java @@ -31,24 +31,24 @@ */ public final class ManagedDatabaseRecommendedSensitivityLabelsClientImpl implements ManagedDatabaseRecommendedSensitivityLabelsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseRecommendedSensitivityLabelsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseRecommendedSensitivityLabelsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseRecommendedSensitivityLabelsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseRecommendedSensitivityLabelsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseRecommendedSensitivityLabelsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,47 +59,37 @@ public final class ManagedDatabaseRecommendedSensitivityLabelsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseRecommendedSensitivityLabelsService { - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, - Context context); + @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, Context context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, RecommendedSensitivityLabelUpdateList parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -113,10 +103,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -124,29 +112,19 @@ public Mono> updateWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -154,17 +132,11 @@ public Mono> updateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, RecommendedSensitivityLabelUpdateList parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -178,10 +150,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -189,36 +159,25 @@ private Mono> updateWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, RecommendedSensitivityLabelUpdateList parameters) { return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters) .flatMap(ignored -> Mono.empty()); @@ -226,12 +185,12 @@ public Mono updateAsync( /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -239,33 +198,26 @@ public Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + RecommendedSensitivityLabelUpdateList parameters, Context context) { return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .block(); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void update(String resourceGroupName, String managedInstanceName, String databaseName, RecommendedSensitivityLabelUpdateList parameters) { updateWithResponse(resourceGroupName, managedInstanceName, databaseName, parameters, Context.NONE); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java index fad6deafd4e1a..5d19b2c8a329f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java @@ -26,26 +26,28 @@ import com.azure.resourcemanager.sql.models.RestoreDetailsName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseRestoreDetailsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseRestoreDetailsClient. + */ public final class ManagedDatabaseRestoreDetailsClientImpl implements ManagedDatabaseRestoreDetailsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseRestoreDetailsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseRestoreDetailsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseRestoreDetailsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseRestoreDetailsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseRestoreDetailsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -56,30 +58,24 @@ public final class ManagedDatabaseRestoreDetailsClientImpl implements ManagedDat @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseRestoreDetailsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails" - + "/{restoreDetailsName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("restoreDetailsName") RestoreDetailsName restoreDetailsName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -89,16 +85,11 @@ Mono> get( * @return managed database restore details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, RestoreDetailsName restoreDetailsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -116,34 +107,22 @@ public Mono> getWithResponseA .error(new IllegalArgumentException("Parameter restoreDetailsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - restoreDetailsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + restoreDetailsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -154,17 +133,11 @@ public Mono> getWithResponseA * @return managed database restore details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, RestoreDetailsName restoreDetailsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -182,31 +155,20 @@ private Mono> getWithResponse .error(new IllegalArgumentException("Parameter restoreDetailsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - restoreDetailsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + restoreDetailsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -216,20 +178,17 @@ private Mono> getWithResponse * @return managed database restore details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, RestoreDetailsName restoreDetailsName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, restoreDetailsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -240,21 +199,17 @@ public Mono getAsync( * @return managed database restore details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, RestoreDetailsName restoreDetailsName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, restoreDetailsName, context) .block(); } /** * Gets managed database restore details. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -264,11 +219,8 @@ public Response getWithResponse( * @return managed database restore details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseRestoreDetailsResultInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - RestoreDetailsName restoreDetailsName) { + public ManagedDatabaseRestoreDetailsResultInner get(String resourceGroupName, String managedInstanceName, + String databaseName, RestoreDetailsName restoreDetailsName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, restoreDetailsName, Context.NONE) .getValue(); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java index c9c50b7975ec3..caeee822e09f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.sql.models.DatabaseSchemaListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseSchemasClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseSchemasClient. + */ public final class ManagedDatabaseSchemasClientImpl implements ManagedDatabaseSchemasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseSchemasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseSchemasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseSchemasClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ManagedDatabaseSchemasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseSchemasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,56 +62,42 @@ public final class ManagedDatabaseSchemasClientImpl implements ManagedDatabaseSc @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSchemasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -116,13 +107,11 @@ Mono> listByDatabaseNext( * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -136,43 +125,24 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -183,13 +153,11 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,40 +171,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -246,8 +197,8 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -255,9 +206,9 @@ public PagedFlux listByDatabaseAsync( /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,8 +217,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), @@ -276,9 +227,9 @@ public PagedFlux listByDatabaseAsync( /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -289,8 +240,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -298,9 +249,9 @@ private PagedFlux listByDatabaseAsync( /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -309,17 +260,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter)); } /** * List managed database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -330,17 +281,17 @@ public PagedIterable listByDatabase( * @return a list of database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter, context)); } /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -350,13 +301,11 @@ public PagedIterable listByDatabase( * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -373,34 +322,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -411,13 +348,11 @@ public Mono> getWithResponseAsync( * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -434,31 +369,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -468,17 +392,17 @@ private Mono> getWithResponseAsync( * @return managed database schema on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -489,16 +413,16 @@ public Mono getAsync( * @return managed database schema along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, context).block(); } /** * Get managed database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -508,17 +432,16 @@ public Response getWithResponse( * @return managed database schema. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSchemaInner get( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName) { + public DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -530,31 +453,21 @@ private Mono> listByDatabaseNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -562,29 +475,19 @@ private Mono> listByDatabaseNextSinglePageAsy * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java index b2a7e2aed5cde..91d48dbd208eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java @@ -39,24 +39,24 @@ */ public final class ManagedDatabaseSecurityAlertPoliciesClientImpl implements ManagedDatabaseSecurityAlertPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseSecurityAlertPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseSecurityAlertPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseSecurityAlertPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseSecurityAlertPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseSecurityAlertPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,91 +67,69 @@ public final class ManagedDatabaseSecurityAlertPoliciesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSecurityAlertPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies" - + "/{securityAlertPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies" - + "/{securityAlertPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedDatabaseSecurityAlertPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -165,42 +143,25 @@ private Mono> listByDatab return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @param context The context to associate with this operation. @@ -208,16 +169,14 @@ private Mono> listByDatab * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -231,39 +190,23 @@ private Mono> listByDatab return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,8 +215,8 @@ private Mono> listByDatab * @return a list of managed database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -281,9 +224,9 @@ public PagedFlux listByDatabaseAsync( /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @param context The context to associate with this operation. @@ -293,8 +236,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of managed database's security alert policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -302,9 +245,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -313,16 +256,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of managed database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** * Gets a list of managed database's security alert policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policies are defined. * @param context The context to associate with this operation. @@ -332,36 +275,31 @@ public PagedIterable listByDatabase( * @return a list of managed database's security alert policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); } /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed database's security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database's security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -375,39 +313,26 @@ public Mono> getWithResponseAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -415,21 +340,16 @@ public Mono> getWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed database's security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database's security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -443,36 +363,24 @@ private Mono> getWithResponseA return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -482,20 +390,17 @@ private Mono> getWithResponseA * @return a managed database's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -506,22 +411,18 @@ public Mono getAsync( * @return a managed database's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, context) - .block(); + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, + context).block(); } /** * Gets a managed database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -531,21 +432,17 @@ public Response getWithResponse( * @return a managed database's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseSecurityAlertPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName) { - return getWithResponse( - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, Context.NONE) - .getValue(); + public ManagedDatabaseSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, + Context.NONE).getValue(); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -553,21 +450,16 @@ public ManagedDatabaseSecurityAlertPolicyInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - ManagedDatabaseSecurityAlertPolicyInner parameters) { + String resourceGroupName, String managedInstanceName, String databaseName, + SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -581,15 +473,12 @@ public Mono> createOrUpdateWit return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -598,28 +487,17 @@ public Mono> createOrUpdateWit } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -628,22 +506,17 @@ public Mono> createOrUpdateWit * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed database security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed database security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - ManagedDatabaseSecurityAlertPolicyInner parameters, + String resourceGroupName, String managedInstanceName, String databaseName, + SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -657,15 +530,12 @@ private Mono> createOrUpdateWi return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -674,25 +544,16 @@ private Mono> createOrUpdateWi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -703,22 +564,18 @@ private Mono> createOrUpdateWi * @return a managed database security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -730,23 +587,18 @@ public Mono createOrUpdateAsync( * @return a managed database security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, - ManagedDatabaseSecurityAlertPolicyInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, + ManagedDatabaseSecurityAlertPolicyInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, parameters, context).block(); } /** * Creates or updates a database's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. @@ -757,91 +609,67 @@ public Response createOrUpdateWithRespo * @return a managed database security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SecurityAlertPolicyName securityAlertPolicyName, + public ManagedDatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, parameters, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, + parameters, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java index d8694a0651cd2..6e530d2d63f14 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java @@ -30,26 +30,28 @@ import com.azure.resourcemanager.sql.models.SecurityEventCollection; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseSecurityEventsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseSecurityEventsClient. + */ public final class ManagedDatabaseSecurityEventsClientImpl implements ManagedDatabaseSecurityEventsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseSecurityEventsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseSecurityEventsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseSecurityEventsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseSecurityEventsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseSecurityEventsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,42 +62,32 @@ public final class ManagedDatabaseSecurityEventsClientImpl implements ManagedDat @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSecurityEventsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam("$filter") String filter, - @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, - @QueryParam("$skiptoken") String skiptoken, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, @QueryParam("$skiptoken") String skiptoken, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -108,19 +100,11 @@ Mono> listByDatabaseNext( * @return a list of security events along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter, Long skip, Long top, String skiptoken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -134,46 +118,24 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - skip, - top, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, skip, top, skiptoken, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -187,20 +149,12 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of security events along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken, + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter, Long skip, Long top, String skiptoken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -214,43 +168,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - skip, - top, - skiptoken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + skip, top, skiptoken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -263,26 +197,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of security events as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, filter, skip, top, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Long skip, Long top, String skiptoken) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + filter, skip, top, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,24 +216,21 @@ public PagedFlux listByDatabaseAsync( * @return a list of security events as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; final Long skip = null; final Long top = null; final String skiptoken = null; - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, filter, skip, top, skiptoken), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + filter, skip, top, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -322,27 +244,17 @@ public PagedFlux listByDatabaseAsync( * @return a list of security events as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken, - Context context) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, filter, skip, top, skiptoken, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Long skip, Long top, String skiptoken, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + filter, skip, top, skiptoken, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,8 +263,8 @@ private PagedFlux listByDatabaseAsync( * @return a list of security events as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; final Long skip = null; final Long top = null; @@ -363,9 +275,9 @@ public PagedIterable listByDatabase( /** * Gets a list of security events. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. @@ -379,25 +291,16 @@ public PagedIterable listByDatabase( * @return a list of security events as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String filter, - Long skip, - Long top, - String skiptoken, - Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, managedInstanceName, databaseName, filter, skip, top, skiptoken, context)); + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Long skip, Long top, String skiptoken, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter, + skip, top, skiptoken, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -409,31 +312,21 @@ private Mono> listByDatabaseNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -441,29 +334,19 @@ private Mono> listByDatabaseNextSinglePageAsyn * @return a list of security events along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java index 6cca80db4a7f4..c547d98f28db8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java @@ -41,24 +41,24 @@ * An instance of this class provides access to all the operations defined in ManagedDatabaseSensitivityLabelsClient. */ public final class ManagedDatabaseSensitivityLabelsClientImpl implements ManagedDatabaseSensitivityLabelsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseSensitivityLabelsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseSensitivityLabelsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseSensitivityLabelsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseSensitivityLabelsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseSensitivityLabelsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,216 +69,148 @@ public final class ManagedDatabaseSensitivityLabelsClientImpl implements Managed @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSensitivityLabelsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCurrentByDatabase( - @HostParam("$host") String endpoint, + Mono> listCurrentByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam("$skipToken") String skipToken, - @QueryParam("$count") Boolean count, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({200}) + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, + @QueryParam("$count") Boolean count, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SensitivityLabelUpdateList parameters, - Context context); + @BodyParam("application/json") SensitivityLabelUpdateList parameters, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendedByDatabase( - @HostParam("$host") String endpoint, + Mono> listRecommendedByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam("$skipToken") String skipToken, + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, @QueryParam("includeDisabledRecommendations") Boolean includeDisabledRecommendations, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") SensitivityLabelSource sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SensitivityLabelInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SensitivityLabelInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disableRecommendation( - @HostParam("$host") String endpoint, + Mono> disableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> enableRecommendation( - @HostParam("$host") String endpoint, + Mono> enableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCurrentByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRecommendedByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -288,21 +220,14 @@ Mono> listByDatabaseNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter) { + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -316,45 +241,24 @@ private Mono> listCurrentByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listCurrentByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - count, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, skipToken, count, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -365,22 +269,15 @@ private Mono> listCurrentByDatabaseSinglePa * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter, + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -394,42 +291,23 @@ private Mono> listCurrentByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listCurrentByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - count, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + skipToken, count, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -441,25 +319,17 @@ private Mono> listCurrentByDatabaseSinglePa * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter) { - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter), - nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -468,23 +338,20 @@ public PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { final String skipToken = null; final Boolean count = null; final String filter = null; - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter), - nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -497,26 +364,19 @@ public PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter, + private PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, Context context) { - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter, context), + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter, context), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,8 +385,8 @@ private PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listCurrentByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { final String skipToken = null; final Boolean count = null; final String filter = null; @@ -536,9 +396,9 @@ public PagedIterable listCurrentByDatabase( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -551,43 +411,32 @@ public PagedIterable listCurrentByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean count, - String filter, + public PagedIterable listCurrentByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, Context context) { - return new PagedIterable<>( - listCurrentByDatabaseAsync( - resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter, context)); + return new PagedIterable<>(listCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, count, filter, context)); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SensitivityLabelUpdateList parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -601,10 +450,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -612,29 +459,19 @@ public Mono> updateWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -642,17 +479,11 @@ public Mono> updateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -666,10 +497,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -677,36 +506,25 @@ private Mono> updateWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, SensitivityLabelUpdateList parameters) { return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters) .flatMap(ignored -> Mono.empty()); @@ -714,12 +532,12 @@ public Mono updateAsync( /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -727,42 +545,35 @@ public Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters, Context context) { return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .block(); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void update(String resourceGroupName, String managedInstanceName, String databaseName, SensitivityLabelUpdateList parameters) { updateWithResponse(resourceGroupName, managedInstanceName, databaseName, parameters, Context.NONE); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -772,21 +583,15 @@ public void update( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter) { + String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -800,45 +605,24 @@ private Mono> listRecommendedByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listRecommendedByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, skipToken, includeDisabledRecommendations, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -849,22 +633,15 @@ private Mono> listRecommendedByDatabaseSing * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { + String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -878,42 +655,24 @@ private Mono> listRecommendedByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listRecommendedByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -925,30 +684,20 @@ private Mono> listRecommendedByDatabaseSing * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter) { return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -957,28 +706,22 @@ public PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { final String skipToken = null; final Boolean includeDisabledRecommendations = null; final String filter = null; return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -991,32 +734,20 @@ public PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { + private PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter, Context context) { return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - context), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, context), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1025,26 +756,20 @@ private PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listRecommendedByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { final String skipToken = null; final Boolean includeDisabledRecommendations = null; final String filter = null; - return new PagedIterable<>( - listRecommendedByDatabaseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter)); + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -1057,30 +782,18 @@ public PagedIterable listRecommendedByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { - return new PagedIterable<>( - listRecommendedByDatabaseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - context)); + public PagedIterable listRecommendedByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter, Context context) { + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, context)); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1090,23 +803,16 @@ public PagedIterable listRecommendedByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1129,42 +835,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (sensitivityLabelSource == null) { - return Mono - .error( - new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1175,24 +865,16 @@ public Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelSource sensitivityLabelSource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1215,39 +897,25 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (sensitivityLabelSource == null) { - return Mono - .error( - new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1260,30 +928,18 @@ private Mono> getWithResponseAsync( * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { - return getWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, sensitivityLabelSource).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1297,32 +953,18 @@ public Mono getAsync( * @return the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, - Context context) { - return getWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - context) - .block(); + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelSource sensitivityLabelSource, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, sensitivityLabelSource, context).block(); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1335,31 +977,17 @@ public Response getWithResponse( * @return the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource) { - return getWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - Context.NONE) - .getValue(); + public SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + sensitivityLabelSource, Context.NONE).getValue(); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1372,19 +1000,12 @@ public SensitivityLabelInner get( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1407,10 +1028,8 @@ public Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1420,31 +1039,17 @@ public Mono> createOrUpdateWithResponseAsync( final String sensitivityLabelSource = "current"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1458,20 +1063,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1494,10 +1091,8 @@ private Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1507,28 +1102,16 @@ private Mono> createOrUpdateWithResponseAsync( final String sensitivityLabelSource = "current"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1541,24 +1124,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1572,32 +1148,18 @@ public Mono createOrUpdateAsync( * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - parameters, - context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, parameters, context).block(); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1610,31 +1172,17 @@ public Response createOrUpdateWithResponse( * @return a sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - parameters, - Context.NONE) - .getValue(); + public SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, parameters, Context.NONE).getValue(); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1646,18 +1194,11 @@ public SensitivityLabelInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1680,36 +1221,22 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "current"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1722,19 +1249,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1757,33 +1276,21 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "current"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1795,23 +1302,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return deleteWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - .flatMap(ignored -> Mono.empty()); + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName).flatMap(ignored -> Mono.empty()); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1824,24 +1325,17 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, Context context) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, context).block(); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1852,22 +1346,17 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - deleteWithResponse( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName) { + deleteWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + Context.NONE); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1879,18 +1368,11 @@ public void delete( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1913,36 +1395,22 @@ public Mono> disableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; return FluxUtil - .withContext( - context -> - service - .disableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1955,19 +1423,12 @@ public Mono> disableRecommendationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + private Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1990,33 +1451,21 @@ private Mono> disableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service - .disableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2028,23 +1477,17 @@ private Mono> disableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableRecommendationAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return disableRecommendationWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - .flatMap(ignored -> Mono.empty()); + public Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { + return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2057,24 +1500,17 @@ public Mono disableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disableRecommendationWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return disableRecommendationWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, context).block(); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2085,22 +1521,17 @@ public Response disableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disableRecommendation( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - disableRecommendationWithResponse( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + disableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, Context.NONE); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2112,18 +1543,11 @@ public void disableRecommendation( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2146,36 +1570,22 @@ public Mono> enableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; return FluxUtil - .withContext( - context -> - service - .enableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2188,19 +1598,12 @@ public Mono> enableRecommendationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, + private Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2223,33 +1626,21 @@ private Mono> enableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service - .enableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2261,23 +1652,17 @@ private Mono> enableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enableRecommendationAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return enableRecommendationWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName) - .flatMap(ignored -> Mono.empty()); + public Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { + return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2290,24 +1675,17 @@ public Mono enableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response enableRecommendationWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return enableRecommendationWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, context).block(); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2318,22 +1696,17 @@ public Response enableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enableRecommendation( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - enableRecommendationWithResponse( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + enableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, Context.NONE); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2341,16 +1714,14 @@ public void enableRecommendation( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2364,43 +1735,24 @@ private Mono> listByDatabaseSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2409,16 +1761,14 @@ private Mono> listByDatabaseSinglePageAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2432,40 +1782,23 @@ private Mono> listByDatabaseSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2475,8 +1808,8 @@ private Mono> listByDatabaseSinglePageAsync * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -2484,9 +1817,9 @@ public PagedFlux listByDatabaseAsync( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2495,8 +1828,8 @@ public PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), @@ -2505,9 +1838,9 @@ public PagedFlux listByDatabaseAsync( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2518,8 +1851,8 @@ public PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -2527,9 +1860,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2538,17 +1871,17 @@ private PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { final String filter = null; return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2559,17 +1892,16 @@ public PagedIterable listByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, String filter, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2581,32 +1913,22 @@ private Mono> listCurrentByDatabaseNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2614,37 +1936,26 @@ private Mono> listCurrentByDatabaseNextSing * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2656,32 +1967,22 @@ private Mono> listRecommendedByDatabaseNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2689,37 +1990,26 @@ private Mono> listRecommendedByDatabaseNext * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRecommendedByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2731,31 +2021,21 @@ private Mono> listByDatabaseNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2763,29 +2043,19 @@ private Mono> listByDatabaseNextSinglePageA * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java index 20f5f4ebf289e..a454a500568cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.sql.models.DatabaseTableListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabaseTablesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabaseTablesClient. + */ public final class ManagedDatabaseTablesClientImpl implements ManagedDatabaseTablesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseTablesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseTablesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseTablesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ManagedDatabaseTablesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseTablesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,59 +62,42 @@ public final class ManagedDatabaseTablesClientImpl implements ManagedDatabaseTab @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseTablesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySchema( - @HostParam("$host") String endpoint, + Mono> listBySchema(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables" - + "/{tableName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySchemaNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -120,13 +108,11 @@ Mono> listBySchemaNext( * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String filter) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -143,44 +129,24 @@ private Mono> listBySchemaSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listBySchema( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listBySchema(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -192,18 +158,11 @@ private Mono> listBySchemaSinglePageAsync( * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String filter, - Context context) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,41 +179,23 @@ private Mono> listBySchemaSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listBySchema( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listBySchema(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -265,8 +206,8 @@ private Mono> listBySchemaSinglePageAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String filter) { + public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter) { return new PagedFlux<>( () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), nextLink -> listBySchemaNextSinglePageAsync(nextLink)); @@ -274,9 +215,9 @@ public PagedFlux listBySchemaAsync( /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -286,8 +227,8 @@ public PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName) { + public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName) { final String filter = null; return new PagedFlux<>( () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), @@ -296,9 +237,9 @@ public PagedFlux listBySchemaAsync( /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -310,25 +251,17 @@ public PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySchemaAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String filter, - Context context) { - return new PagedFlux<>( - () -> - listBySchemaSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, filter, context), - nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); + private PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context) { + return new PagedFlux<>(() -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schemaName, filter, context), nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); } /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -338,8 +271,8 @@ private PagedFlux listBySchemaAsync( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema( - String resourceGroupName, String managedInstanceName, String databaseName, String schemaName) { + public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName) { final String filter = null; return new PagedIterable<>( listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter)); @@ -347,9 +280,9 @@ public PagedIterable listBySchema( /** * List managed database tables. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -361,22 +294,17 @@ public PagedIterable listBySchema( * @return a list of database tables as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String filter, - Context context) { + public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context) { return new PagedIterable<>( listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter, context)); } /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -387,17 +315,11 @@ public PagedIterable listBySchema( * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName) { + public Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -417,35 +339,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -457,18 +366,11 @@ public Mono> getWithResponseAsync( * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -488,32 +390,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - schemaName, - tableName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -524,21 +414,17 @@ private Mono> getWithResponseAsync( * @return managed database table on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -550,23 +436,17 @@ public Mono getAsync( * @return managed database table along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName, - Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + context).block(); } /** * Get managed database table. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -577,22 +457,16 @@ public Response getWithResponse( * @return managed database table. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseTableInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - String schemaName, - String tableName) { - return getWithResponse( - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, Context.NONE) - .getValue(); + public DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -604,31 +478,21 @@ private Mono> listBySchemaNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -641,23 +505,13 @@ private Mono> listBySchemaNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySchemaNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java index d39b485ccee5a..c31422a9aee3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java @@ -39,24 +39,24 @@ */ public final class ManagedDatabaseTransparentDataEncryptionsClientImpl implements ManagedDatabaseTransparentDataEncryptionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseTransparentDataEncryptionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseTransparentDataEncryptionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseTransparentDataEncryptionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseTransparentDataEncryptionsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseTransparentDataEncryptionsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,91 +67,67 @@ public final class ManagedDatabaseTransparentDataEncryptionsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseTransparentDataEncryptionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption" - + "/{tdeName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption" - + "/{tdeName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedTransparentDataEncryptionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -165,42 +141,24 @@ private Mono> listByDatabas return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param context The context to associate with this operation. @@ -208,16 +166,14 @@ private Mono> listByDatabas * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -231,39 +187,23 @@ private Mono> listByDatabas return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,8 +212,8 @@ private Mono> listByDatabas * @return a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -281,9 +221,9 @@ public PagedFlux listByDatabaseAsync( /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param context The context to associate with this operation. @@ -293,8 +233,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -302,48 +242,48 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed database's transparent data encryptions as paginated response with {@link - * PagedIterable}. + * @return a list of managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** * Gets a list of managed database's transparent data encryptions. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed database's transparent data encryptions as paginated response with {@link - * PagedIterable}. + * @return a list of managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); } /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -351,19 +291,14 @@ public PagedIterable listByDatabase( * @throws 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 managed database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -380,34 +315,21 @@ public Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -416,20 +338,14 @@ public Mono> getWithResponseAsyn * @throws 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 managed database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -446,31 +362,20 @@ private Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -480,20 +385,17 @@ private Mono> getWithResponseAsy * @return a managed database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -504,20 +406,16 @@ public Mono getAsync( * @return a managed database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, context).block(); } /** * Gets a managed database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -527,19 +425,16 @@ public Response getWithResponse( * @return a managed database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedTransparentDataEncryptionInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName) { + public ManagedTransparentDataEncryptionInner get(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, Context.NONE).getValue(); } /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -548,20 +443,15 @@ public ManagedTransparentDataEncryptionInner 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 managed database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters) { + String resourceGroupName, String managedInstanceName, String databaseName, + TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -578,10 +468,8 @@ public Mono> createOrUpdateWithR return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -590,28 +478,17 @@ public Mono> createOrUpdateWithR } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, tdeName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -621,21 +498,15 @@ public Mono> createOrUpdateWithR * @throws 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 managed database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters, - Context context) { + String resourceGroupName, String managedInstanceName, String databaseName, + TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -652,10 +523,8 @@ private Mono> createOrUpdateWith return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -664,25 +533,15 @@ private Mono> createOrUpdateWith } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -693,22 +552,18 @@ private Mono> createOrUpdateWith * @return a managed database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, tdeName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -720,23 +575,18 @@ public Mono createOrUpdateAsync( * @return a managed database transparent data encryption state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, + ManagedTransparentDataEncryptionInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, + parameters, context).block(); } /** * Updates a database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -747,91 +597,65 @@ public Response createOrUpdateWithRespons * @return a managed database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, Context.NONE) - .getValue(); + public ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, + Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed transparent data encryptions along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed transparent data encryptions along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java index fca6d576d1c37..da9c94e6aa70f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java @@ -36,24 +36,24 @@ */ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl implements ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,97 +65,75 @@ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,10 +147,8 @@ public Mono> getWithR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -181,63 +157,43 @@ public Mono> getWithR return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database's vulnerability assessment rule baseline along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -251,10 +207,8 @@ private Mono> getWith return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -263,68 +217,51 @@ private Mono> getWith return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -332,92 +269,64 @@ public Mono getAsync( * @return a database's vulnerability assessment rule baseline along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { - return getWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - context) - .block(); + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName, context).block(); } /** * Gets a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentRuleBaselineInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - return getWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - Context.NONE) - .getValue(); + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + ruleId, baselineName, Context.NONE).getValue(); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline 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 a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,10 +340,8 @@ public Mono> createOr return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -443,10 +350,8 @@ public Mono> createOr return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -455,59 +360,40 @@ public Mono> createOr } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database vulnerability assessment rule baseline along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context) { + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -521,10 +407,8 @@ private Mono> createO return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -533,10 +417,8 @@ private Mono> createO return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -545,33 +427,22 @@ private Mono> createO } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -579,36 +450,26 @@ private Mono> createO * @return a database vulnerability assessment rule baseline on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters) + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,37 +479,25 @@ public Mono createOrUpdateAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, - DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters, - context) - .block(); + DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, parameters, context).block(); } /** * Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @param parameters The requested rule baseline resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -656,55 +505,37 @@ public Response createOrUpdate * @return a database vulnerability assessment rule baseline. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, + public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, DatabaseVulnerabilityAssessmentRuleBaselineInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - parameters, - Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, parameters, Context.NONE).getValue(); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -718,10 +549,8 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -730,40 +559,27 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -771,19 +587,12 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -797,10 +606,8 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (ruleId == null) { return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); @@ -809,66 +616,50 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - return deleteWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName) - .flatMap(ignored -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName).flatMap(ignored -> Mono.empty()); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @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. @@ -876,55 +667,33 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, - VulnerabilityAssessmentPolicyBaselineName baselineName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, + VulnerabilityAssessmentPolicyBaselineName baselineName, Context context) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, context).block(); } /** * Removes the database's vulnerability assessment rule baseline. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param ruleId The vulnerability assessment rule ID. * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a - * database level rule and master for server level rule). + * database level rule and master for server level rule). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String ruleId, + public void delete(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { - deleteWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - ruleId, - baselineName, - Context.NONE); + deleteWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, + baselineName, Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java index fe69796c927ef..c06da1e8b7506 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java @@ -44,24 +44,24 @@ */ public final class ManagedDatabaseVulnerabilityAssessmentScansClientImpl implements ManagedDatabaseVulnerabilityAssessmentScansClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseVulnerabilityAssessmentScansService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseVulnerabilityAssessmentScansClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseVulnerabilityAssessmentScansClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseVulnerabilityAssessmentScansService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseVulnerabilityAssessmentScansService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -72,96 +72,68 @@ public final class ManagedDatabaseVulnerabilityAssessmentScansClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentScansService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/scans") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/scans/{scanId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/scans/{scanId}/export") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> export( - @HostParam("$host") String endpoint, + Mono> export(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> initiateScan( - @HostParam("$host") String endpoint, + Mono>> initiateScan(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -169,19 +141,15 @@ Mono> listByDatabaseNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -195,49 +163,28 @@ private Mono> listByDataba return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -246,20 +193,15 @@ private Mono> listByDataba * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -273,46 +215,26 @@ private Mono> listByDataba return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -322,23 +244,17 @@ private Mono> listByDataba * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -349,24 +265,20 @@ public PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return new PagedFlux<>( - () -> - listByDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, context), + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -376,20 +288,17 @@ private PagedFlux listByDatabaseAsync( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return new PagedIterable<>( listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName)); } /** * Lists the vulnerability assessment scans of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -400,22 +309,18 @@ public PagedIterable listByDatabase( * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return new PagedIterable<>( - listByDatabaseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, context)); + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, context)); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -424,20 +329,15 @@ public PagedIterable listByDatabase( * @throws 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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -451,44 +351,29 @@ public Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -498,21 +383,15 @@ public Mono> getWithResponseAsy * @throws 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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -526,41 +405,28 @@ private Mono> getWithResponseAs return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -571,22 +437,17 @@ private Mono> getWithResponseAs * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -598,23 +459,18 @@ public Mono getAsync( * @return a vulnerability assessment scan record of a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context) - .block(); + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, context).block(); } /** * Gets a vulnerability assessment scan record of a database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -625,22 +481,17 @@ public Response getWithResponse( * @return a vulnerability assessment scan record of a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VulnerabilityAssessmentScanRecordInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return getWithResponse( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, Context.NONE) - .getValue(); + public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, Context.NONE).getValue(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -649,20 +500,15 @@ public VulnerabilityAssessmentScanRecordInner 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> exportWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -676,44 +522,29 @@ public Mono> exportWit return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .export( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.export(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -723,21 +554,15 @@ public Mono> exportWit * @throws 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 database Vulnerability Assessment scan export resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> exportWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -751,41 +576,28 @@ private Mono> exportWi return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .export( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.export(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -796,22 +608,18 @@ private Mono> exportWi * @return a database Vulnerability Assessment scan export resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono exportAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono exportAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return exportWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return exportWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -823,23 +631,18 @@ public Mono exportAsync( * @return a database Vulnerability Assessment scan export resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response exportWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return exportWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context) - .block(); + public Response exportWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context) { + return exportWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, context).block(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -850,22 +653,17 @@ public Response exportWithRespo * @return a database Vulnerability Assessment scan export resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentScansExportInner export( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return exportWithResponse( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, Context.NONE) - .getValue(); + public DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return exportWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, Context.NONE).getValue(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -876,17 +674,12 @@ public DatabaseVulnerabilityAssessmentScansExportInner export( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono>> initiateScanWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -900,42 +693,28 @@ public Mono>> initiateScanWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .initiateScan( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.initiateScan(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -947,18 +726,12 @@ public Mono>> initiateScanWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> initiateScanWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + private Mono>> initiateScanWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -972,39 +745,26 @@ private Mono>> initiateScanWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .initiateScan( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.initiateScan(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1015,26 +775,20 @@ private Mono>> initiateScanWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - Mono>> mono = - initiateScanWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono = initiateScanWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1046,27 +800,21 @@ public PollerFlux, Void> beginInitiateScanAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginInitiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { + private PollerFlux, Void> beginInitiateScanAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - initiateScanWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = initiateScanWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1077,22 +825,19 @@ private PollerFlux, Void> beginInitiateScanAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return beginInitiateScanAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId) + public SyncPoller, Void> beginInitiateScan(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return this + .beginInitiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId) .getSyncPoller(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1104,23 +849,19 @@ public SyncPoller, Void> beginInitiateScan( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginInitiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return beginInitiateScanAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context) + public SyncPoller, Void> beginInitiateScan(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return this + .beginInitiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, context) .getSyncPoller(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1131,23 +872,17 @@ public SyncPoller, Void> beginInitiateScan( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono initiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return beginInitiateScanAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId) - .last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return beginInitiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId).last().flatMap(this.client::getLroFinalResultOrError); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1159,24 +894,17 @@ public Mono initiateScanAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono initiateScanAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - return beginInitiateScanAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return beginInitiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1186,21 +914,17 @@ private Mono initiateScanAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void initiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + public void initiateScan(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { initiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId) .block(); } /** * Executes a Vulnerability Assessment database scan. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -1211,92 +935,65 @@ public void initiateScan( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void initiateScan( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, - Context context) { - initiateScanAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, context) - .block(); + public void initiateScan(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + initiateScanAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, + context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java index 398157ad3902b..045b518736eaa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java @@ -29,8 +29,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentListResult; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; +import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentListResultAutoGenerated; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -40,24 +40,24 @@ */ public final class ManagedDatabaseVulnerabilityAssessmentsClientImpl implements ManagedDatabaseVulnerabilityAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabaseVulnerabilityAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabaseVulnerabilityAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabaseVulnerabilityAssessmentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedDatabaseVulnerabilityAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedDatabaseVulnerabilityAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,108 +68,81 @@ public final class ManagedDatabaseVulnerabilityAssessmentsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> listByDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> createOrUpdate( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DatabaseVulnerabilityAssessmentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments" - + "/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -183,42 +156,25 @@ private Mono> listByDatabase return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param context The context to associate with this operation. @@ -226,16 +182,14 @@ private Mono> listByDatabase * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( + private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -249,39 +203,23 @@ private Mono> listByDatabase return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -290,8 +228,8 @@ private Mono> listByDatabase * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -299,9 +237,9 @@ public PagedFlux listByDatabaseAsync( /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param context The context to associate with this operation. @@ -311,8 +249,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -320,9 +258,9 @@ private PagedFlux listByDatabaseAsync( /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,16 +269,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** * Lists the vulnerability assessments of a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param context The context to associate with this operation. @@ -350,36 +288,32 @@ public PagedIterable listByDatabase( * @return a list of the database's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono> getWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -393,40 +327,26 @@ public Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -434,21 +354,16 @@ public Mono> getWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -462,37 +377,24 @@ private Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -502,20 +404,17 @@ private Mono> getWithResponseAsyn * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -526,22 +425,18 @@ public Mono getAsync( * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, context) - .block(); + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + context).block(); } /** * Gets the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -551,21 +446,17 @@ public Response getWithResponse( * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return getWithResponse( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, Context.NONE) - .getValue(); + public DatabaseVulnerabilityAssessmentAutoGeneratedInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + Context.NONE).getValue(); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -576,17 +467,13 @@ public DatabaseVulnerabilityAssessmentInner get( * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,16 +487,12 @@ public Mono> createOrUpdateWithRe return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -618,28 +501,17 @@ public Mono> createOrUpdateWithRe } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -651,18 +523,13 @@ public Mono> createOrUpdateWithRe * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, - Context context) { + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -676,16 +543,12 @@ private Mono> createOrUpdateWithR return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -694,25 +557,16 @@ private Mono> createOrUpdateWithR } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -723,22 +577,18 @@ private Mono> createOrUpdateWithR * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -750,23 +600,19 @@ public Mono createOrUpdateAsync( * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Response createOrUpdateWithResponse( + String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters, context) - .block(); + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, parameters, context).block(); } /** * Creates or updates the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -777,27 +623,18 @@ public Response createOrUpdateWithResponse * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - parameters, - Context.NONE) - .getValue(); + public DatabaseVulnerabilityAssessmentAutoGeneratedInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, parameters, Context.NONE).getValue(); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -807,16 +644,11 @@ public DatabaseVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -830,38 +662,25 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -872,17 +691,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -896,35 +709,23 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -934,21 +735,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return deleteWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName) - .flatMap(ignored -> Mono.empty()); + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName).flatMap(ignored -> Mono.empty()); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -959,22 +756,17 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, context).block(); } /** * Removes the database's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -983,89 +775,66 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void delete(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - deleteWithResponse( - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, Context.NONE); + deleteWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + Context.NONE); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java index 5d1995ec38f58..58e7f8da100d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java @@ -44,22 +44,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedDatabasesClient. + */ public final class ManagedDatabasesClientImpl implements ManagedDatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedDatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedDatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedDatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ManagedDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ManagedDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -70,191 +76,136 @@ public final class ManagedDatabasesClientImpl implements ManagedDatabasesClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedDatabaseInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedDatabaseInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedDatabaseUpdate parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedDatabaseUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/cancelMove") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/cancelMove") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancelMove( - @HostParam("$host") String endpoint, + Mono>> cancelMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, - Context context); + @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/completeMove") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeMove") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> completeMove( - @HostParam("$host") String endpoint, + Mono>> completeMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, - Context context); + @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> completeRestore( - @HostParam("$host") String endpoint, + Mono>> completeRestore(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CompleteDatabaseRestoreDefinition parameters, - Context context); + @BodyParam("application/json") CompleteDatabaseRestoreDefinition parameters, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/startMove") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/startMove") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startMove( - @HostParam("$host") String endpoint, + Mono>> startMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedDatabaseStartMoveDefinition parameters, - Context context); + @BodyParam("application/json") ManagedDatabaseStartMoveDefinition parameters, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInaccessibleByInstance( - @HostParam("$host") String endpoint, + Mono> listInaccessibleByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listInaccessibleByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -262,13 +213,11 @@ Mono> listInaccessibleByInstanceNext( * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -279,41 +228,23 @@ private Mono> listByInstanceSinglePageAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,13 +253,11 @@ private Mono> listByInstanceSinglePageAsync( * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -339,38 +268,23 @@ private Mono> listByInstanceSinglePageAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -379,16 +293,15 @@ private Mono> listByInstanceSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -397,18 +310,17 @@ public PagedFlux listByInstanceAsync(String resourceGroupN * @return a list of managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -422,9 +334,9 @@ public PagedIterable listByInstance(String resourceGroupNa /** * Gets a list of managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -433,16 +345,16 @@ public PagedIterable listByInstance(String resourceGroupNa * @return a list of managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,13 +363,11 @@ public PagedIterable listByInstance( * @return a managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -471,33 +381,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -507,13 +405,11 @@ public Mono> getWithResponseAsync( * @return a managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -527,30 +423,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,17 +445,17 @@ private Mono> getWithResponseAsync( * @return a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -579,16 +465,16 @@ public Mono getAsync( * @return a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, context).block(); } /** * Gets a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -603,9 +489,9 @@ public ManagedDatabaseInner get(String resourceGroupName, String managedInstance /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -615,13 +501,11 @@ public ManagedDatabaseInner get(String resourceGroupName, String managedInstance * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -635,10 +519,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -647,27 +529,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -678,17 +550,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -702,10 +568,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -714,24 +578,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -743,23 +598,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedDatabaseInner> beginCreateOrUpdateAsync( String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedDatabaseInner.class, - ManagedDatabaseInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, this.client.getContext()); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -771,25 +620,20 @@ public PollerFlux, ManagedDatabaseInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedDatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, + String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -801,15 +645,15 @@ private PollerFlux, ManagedDatabaseInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate( String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters) .getSyncPoller(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -821,20 +665,17 @@ public SyncPoller, ManagedDatabaseInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedDatabaseInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, + String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -844,18 +685,17 @@ public SyncPoller, ManagedDatabaseInner> beginC * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -866,12 +706,8 @@ public Mono createOrUpdateAsync( * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -879,9 +715,9 @@ private Mono createOrUpdateAsync( /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -891,16 +727,16 @@ private Mono createOrUpdateAsync( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner createOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) { + public ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Creates a new database or updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -911,20 +747,16 @@ public ManagedDatabaseInner createOrUpdate( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseInner parameters, - Context context) { + public ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -933,13 +765,11 @@ public ManagedDatabaseInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -953,31 +783,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -987,13 +806,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1007,28 +824,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1037,21 +845,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1061,21 +867,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1084,16 +889,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String databaseName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).getSyncPoller(); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1103,16 +908,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).getSyncPoller(); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1122,16 +927,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1141,18 +945,17 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1166,9 +969,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1183,9 +986,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1195,13 +998,11 @@ public void delete(String resourceGroupName, String managedInstanceName, String * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1215,10 +1016,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1227,27 +1026,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1258,17 +1047,11 @@ public Mono>> updateWithResponseAsync( * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1282,10 +1065,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1294,24 +1075,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1321,25 +1093,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedDatabaseInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedDatabaseInner.class, - ManagedDatabaseInner.class, - this.client.getContext()); + public PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, this.client.getContext()); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1351,25 +1117,20 @@ public PollerFlux, ManagedDatabaseInner> beginU */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedDatabaseInner> beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, + String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1379,16 +1140,16 @@ private PollerFlux, ManagedDatabaseInner> begin * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); + public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1399,21 +1160,17 @@ public SyncPoller, ManagedDatabaseInner> beginU * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1423,18 +1180,17 @@ public SyncPoller, ManagedDatabaseInner> beginU * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1445,22 +1201,17 @@ public Mono updateAsync( * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1470,16 +1221,16 @@ private Mono updateAsync( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner update( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters) { return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Updates an existing database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -1490,20 +1241,16 @@ public ManagedDatabaseInner update( * @return a managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner update( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseUpdate parameters, - Context context) { + public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters, Context context) { return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1513,16 +1260,11 @@ public ManagedDatabaseInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> cancelMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { + public Mono>> cancelMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1536,10 +1278,8 @@ public Mono>> cancelMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1548,25 +1288,16 @@ public Mono>> cancelMoveWithResponseAsync( } return FluxUtil .withContext( - context -> - service - .cancelMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + context -> service.cancelMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1577,17 +1308,11 @@ public Mono>> cancelMoveWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + private Mono>> cancelMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1601,10 +1326,8 @@ private Mono>> cancelMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1612,23 +1335,15 @@ private Mono>> cancelMoveWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .cancelMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.cancelMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1638,24 +1353,19 @@ private Mono>> cancelMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginCancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { - Mono>> mono = - cancelMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginCancelMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters) { + Mono>> mono + = cancelMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1666,25 +1376,20 @@ public PollerFlux, Void> beginCancelMoveAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + private PollerFlux, Void> beginCancelMoveAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - cancelMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = cancelMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1694,19 +1399,17 @@ private PollerFlux, Void> beginCancelMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { - return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); + public SyncPoller, Void> beginCancelMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters) { + return this.beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + .getSyncPoller(); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1717,21 +1420,17 @@ public SyncPoller, Void> beginCancelMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { - return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + public SyncPoller, Void> beginCancelMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { + return this.beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1741,21 +1440,17 @@ public SyncPoller, Void> beginCancelMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono cancelMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { - return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1766,22 +1461,17 @@ public Mono cancelMoveAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { - return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .last() + private Mono cancelMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context) { + return beginCancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1790,19 +1480,16 @@ private Mono cancelMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void cancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void cancelMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { cancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Cancels a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1812,20 +1499,16 @@ public void cancelMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void cancelMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + public void cancelMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context) { cancelMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1835,16 +1518,11 @@ public void cancelMove( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> completeMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { + public Mono>> completeMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1858,10 +1536,8 @@ public Mono>> completeMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1870,25 +1546,16 @@ public Mono>> completeMoveWithResponseAsync( } return FluxUtil .withContext( - context -> - service - .completeMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + context -> service.completeMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1899,17 +1566,11 @@ public Mono>> completeMoveWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> completeMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + private Mono>> completeMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1923,10 +1584,8 @@ private Mono>> completeMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1934,23 +1593,15 @@ private Mono>> completeMoveWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .completeMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.completeMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1960,24 +1611,19 @@ private Mono>> completeMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginCompleteMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { - Mono>> mono = - completeMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginCompleteMoveAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { + Mono>> mono + = completeMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1988,25 +1634,20 @@ public PollerFlux, Void> beginCompleteMoveAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCompleteMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + private PollerFlux, Void> beginCompleteMoveAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - completeMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = completeMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2016,19 +1657,17 @@ private PollerFlux, Void> beginCompleteMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCompleteMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters) { - return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); + public SyncPoller, Void> beginCompleteMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters) { + return this.beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + .getSyncPoller(); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2039,21 +1678,17 @@ public SyncPoller, Void> beginCompleteMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCompleteMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { - return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + public SyncPoller, Void> beginCompleteMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseMoveDefinition parameters, Context context) { + return this.beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2063,21 +1698,17 @@ public SyncPoller, Void> beginCompleteMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono completeMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono completeMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { - return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2088,22 +1719,17 @@ public Mono completeMoveAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono completeMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { - return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .last() + private Mono completeMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context) { + return beginCompleteMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2112,19 +1738,16 @@ private Mono completeMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void completeMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void completeMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseMoveDefinition parameters) { completeMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Completes a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -2134,20 +1757,16 @@ public void completeMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void completeMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseMoveDefinition parameters, - Context context) { + public void completeMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseMoveDefinition parameters, Context context) { completeMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2157,16 +1776,11 @@ public void completeMove( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> completeRestoreWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters) { + public Mono>> completeRestoreWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2180,10 +1794,8 @@ public Mono>> completeRestoreWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2192,25 +1804,16 @@ public Mono>> completeRestoreWithResponseAsync( } return FluxUtil .withContext( - context -> - service - .completeRestore( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + context -> service.completeRestore(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2221,17 +1824,12 @@ public Mono>> completeRestoreWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> completeRestoreWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, + private Mono>> completeRestoreWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2245,10 +1843,8 @@ private Mono>> completeRestoreWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2256,23 +1852,15 @@ private Mono>> completeRestoreWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .completeRestore( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.completeRestore(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2282,24 +1870,19 @@ private Mono>> completeRestoreWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginCompleteRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters) { - Mono>> mono = - completeRestoreWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginCompleteRestoreAsync(String resourceGroupName, + String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters) { + Mono>> mono + = completeRestoreWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2310,25 +1893,21 @@ public PollerFlux, Void> beginCompleteRestoreAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCompleteRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, + private PollerFlux, Void> beginCompleteRestoreAsync(String resourceGroupName, + String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - completeRestoreWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = completeRestoreWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2338,20 +1917,17 @@ private PollerFlux, Void> beginCompleteRestoreAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCompleteRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters) { - return beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + public SyncPoller, Void> beginCompleteRestore(String resourceGroupName, String managedInstanceName, + String databaseName, CompleteDatabaseRestoreDefinition parameters) { + return this.beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters) .getSyncPoller(); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2362,21 +1938,17 @@ public SyncPoller, Void> beginCompleteRestore( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCompleteRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, - Context context) { - return beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + public SyncPoller, Void> beginCompleteRestore(String resourceGroupName, String managedInstanceName, + String databaseName, CompleteDatabaseRestoreDefinition parameters, Context context) { + return this.beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2386,21 +1958,17 @@ public SyncPoller, Void> beginCompleteRestore( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono completeRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono completeRestoreAsync(String resourceGroupName, String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters) { - return beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + return beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2411,12 +1979,8 @@ public Mono completeRestoreAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono completeRestoreAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, - Context context) { + private Mono completeRestoreAsync(String resourceGroupName, String managedInstanceName, String databaseName, + CompleteDatabaseRestoreDefinition parameters, Context context) { return beginCompleteRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -2424,9 +1988,9 @@ private Mono completeRestoreAsync( /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2435,19 +1999,16 @@ private Mono completeRestoreAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void completeRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void completeRestore(String resourceGroupName, String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters) { completeRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Completes the restore operation on a managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -2457,20 +2018,16 @@ public void completeRestore( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void completeRestore( - String resourceGroupName, - String managedInstanceName, - String databaseName, - CompleteDatabaseRestoreDefinition parameters, - Context context) { + public void completeRestore(String resourceGroupName, String managedInstanceName, String databaseName, + CompleteDatabaseRestoreDefinition parameters, Context context) { completeRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2480,16 +2037,11 @@ public void completeRestore( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters) { + public Mono>> startMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2503,10 +2055,8 @@ public Mono>> startMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2514,26 +2064,16 @@ public Mono>> startMoveWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .startMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.startMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2544,17 +2084,12 @@ public Mono>> startMoveWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startMoveWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, + private Mono>> startMoveWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2568,10 +2103,8 @@ private Mono>> startMoveWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -2579,23 +2112,15 @@ private Mono>> startMoveWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .startMove( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.startMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2605,24 +2130,19 @@ private Mono>> startMoveWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters) { - Mono>> mono = - startMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginStartMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters) { + Mono>> mono + = startMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2633,25 +2153,20 @@ public PollerFlux, Void> beginStartMoveAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context) { + private PollerFlux, Void> beginStartMoveAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - startMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = startMoveWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2661,19 +2176,17 @@ private PollerFlux, Void> beginStartMoveAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters) { - return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); + public SyncPoller, Void> beginStartMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters) { + return this.beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + .getSyncPoller(); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2684,21 +2197,17 @@ public SyncPoller, Void> beginStartMove( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context) { - return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + public SyncPoller, Void> beginStartMove(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseStartMoveDefinition parameters, Context context) { + return this.beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) .getSyncPoller(); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2708,21 +2217,17 @@ public SyncPoller, Void> beginStartMove( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public Mono startMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters) { - return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .last() + return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2733,22 +2238,17 @@ public Mono startMoveAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startMoveAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context) { - return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .last() + private Mono startMoveAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseStartMoveDefinition parameters, Context context) { + return beginStartMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2757,19 +2257,16 @@ private Mono startMoveAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public void startMove(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseStartMoveDefinition parameters) { startMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** * Starts a managed database move operation. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2779,35 +2276,29 @@ public void startMove( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startMove( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedDatabaseStartMoveDefinition parameters, - Context context) { + public void startMove(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseStartMoveDefinition parameters, Context context) { startMoveAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of inaccessible managed databases in a managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listInaccessibleByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2818,57 +2309,37 @@ private Mono> listInaccessibleByInstanceSing .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listInaccessibleByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listInaccessibleByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of inaccessible managed databases in a managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInaccessibleByInstanceSinglePageAsync( String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2879,69 +2350,53 @@ private Mono> listInaccessibleByInstanceSing .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listInaccessibleByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listInaccessibleByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedFlux}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listInaccessibleByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listInaccessibleByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listInaccessibleByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listInaccessibleByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listInaccessibleByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedFlux}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInaccessibleByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PagedFlux listInaccessibleByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedFlux<>( () -> listInaccessibleByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listInaccessibleByInstanceNextSinglePageAsync(nextLink, context)); @@ -2949,46 +2404,45 @@ private PagedFlux listInaccessibleByInstanceAsync( /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedIterable}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInaccessibleByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listInaccessibleByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listInaccessibleByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of inaccessible managed databases in a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of inaccessible managed databases in a managed instance as paginated response with {@link - * PagedIterable}. + * @return a list of inaccessible managed databases in a managed instance as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInaccessibleByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listInaccessibleByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listInaccessibleByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3000,31 +2454,21 @@ private Mono> listByInstanceNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -3032,37 +2476,26 @@ private Mono> listByInstanceNextSinglePageAs * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3074,32 +2507,22 @@ private Mono> listInaccessibleByInstanceNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listInaccessibleByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -3107,29 +2530,19 @@ private Mono> listInaccessibleByInstanceNext * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listInaccessibleByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listInaccessibleByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listInaccessibleByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java index b928576a1df6d..af12a1972c7ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java @@ -39,26 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceAdministratorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceAdministratorsClient. + */ public final class ManagedInstanceAdministratorsClientImpl implements ManagedInstanceAdministratorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceAdministratorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceAdministratorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceAdministratorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceAdministratorsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceAdministratorsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,100 +71,77 @@ public final class ManagedInstanceAdministratorsClientImpl implements ManagedIns @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceAdministratorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/administrators") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/administrators/{administratorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/administrators/{administratorName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstanceAdministratorInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/administrators/{administratorName}") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -173,57 +152,37 @@ private Mono> listByInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -234,38 +193,23 @@ private Mono> listByInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -273,18 +217,17 @@ private Mono> listByInstanceSin * @return a list of managed instance administrators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -293,18 +236,17 @@ public PagedFlux listByInstanceAsync( * @return a list of managed instance administrators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,16 +254,16 @@ private PagedFlux listByInstanceAsync( * @return a list of managed instance administrators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of managed instance administrators. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,16 +272,16 @@ public PagedIterable listByInstance( * @return a list of managed instance administrators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -348,13 +290,11 @@ public PagedIterable listByInstance( * @return a managed instance administrator along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -369,33 +309,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -405,13 +333,11 @@ public Mono> getWithResponseAsync( * @return a managed instance administrator along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -426,30 +352,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,17 +374,17 @@ private Mono> getWithResponseAsync( * @return a managed instance administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, administratorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -478,16 +394,16 @@ public Mono getAsync( * @return a managed instance administrator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, administratorName, context).block(); } /** * Gets a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -496,16 +412,16 @@ public Response getWithResponse( * @return a managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdministratorInner get( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { + public ManagedInstanceAdministratorInner get(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName) { return getWithResponse(resourceGroupName, managedInstanceName, administratorName, Context.NONE).getValue(); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -513,19 +429,14 @@ public ManagedInstanceAdministratorInner 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 an Azure SQL managed instance administrator along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -540,10 +451,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -552,27 +461,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -581,20 +480,15 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure SQL managed instance administrator along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -609,10 +503,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -621,24 +513,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -649,28 +533,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedInstanceAdministratorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, administratorName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceAdministratorInner.class, - ManagedInstanceAdministratorInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, administratorName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceAdministratorInner.class, + ManagedInstanceAdministratorInner.class, this.client.getContext()); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -682,31 +558,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedInstanceAdministratorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, administratorName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceAdministratorInner.class, - ManagedInstanceAdministratorInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + administratorName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceAdministratorInner.class, + ManagedInstanceAdministratorInner.class, context); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -717,20 +583,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceAdministratorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters) .getSyncPoller(); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -742,21 +605,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceAdministratorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters, context) + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AdministratorName administratorName, + ManagedInstanceAdministratorInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters, context) .getSyncPoller(); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -766,21 +626,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL managed instance administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -791,11 +647,8 @@ public Mono createOrUpdateAsync( * @return an Azure SQL managed instance administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, ManagedInstanceAdministratorInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters, context) .last() @@ -804,9 +657,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -816,19 +669,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdministratorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters) { + public ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters).block(); } /** * Creates or updates a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -839,21 +689,17 @@ public ManagedInstanceAdministratorInner createOrUpdate( * @return an Azure SQL managed instance administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdministratorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AdministratorName administratorName, - ManagedInstanceAdministratorInner parameters, - Context context) { + public ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, ManagedInstanceAdministratorInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, administratorName, parameters, context) .block(); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -862,13 +708,11 @@ public ManagedInstanceAdministratorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -883,31 +727,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -917,13 +750,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, AdministratorName administratorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -938,28 +769,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -968,21 +790,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, administratorName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, administratorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -992,21 +812,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, administratorName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, administratorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,16 +834,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName).getSyncPoller(); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -1034,16 +853,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName, context) + .getSyncPoller(); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,18 +872,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName) - .last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -1073,18 +892,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, + AdministratorName administratorName, Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, administratorName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1098,9 +916,9 @@ public void delete(String resourceGroupName, String managedInstanceName, Adminis /** * Deletes a managed instance administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -1109,21 +927,20 @@ public void delete(String resourceGroupName, String managedInstanceName, Adminis * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context) { + public void delete(String resourceGroupName, String managedInstanceName, AdministratorName administratorName, + Context context) { deleteAsync(resourceGroupName, managedInstanceName, administratorName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -1131,62 +948,42 @@ private Mono> listByInstanceNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java index 5013f235a30f3..9ab40f60e3b93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java @@ -45,24 +45,24 @@ */ public final class ManagedInstanceAzureADOnlyAuthenticationsClientImpl implements ManagedInstanceAzureADOnlyAuthenticationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceAzureADOnlyAuthenticationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceAzureADOnlyAuthenticationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceAzureADOnlyAuthenticationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceAzureADOnlyAuthenticationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceAzureADOnlyAuthenticationsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -73,100 +73,77 @@ public final class ManagedInstanceAzureADOnlyAuthenticationsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceAzureADOnlyAuthenticationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/azureADOnlyAuthentications") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstanceAzureADOnlyAuthenticationInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,57 +154,38 @@ private Mono> listB .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -238,132 +196,113 @@ private Mono> listB .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -378,33 +317,21 @@ public Mono> getWithResp .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -412,16 +339,14 @@ public Mono> getWithResp * @throws 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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -436,30 +361,20 @@ private Mono> getWithRes .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -468,17 +383,17 @@ private Mono> getWithRes * @return a specific Azure Active Directory only authentication property on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -488,16 +403,16 @@ public Mono getAsync( * @return a specific Azure Active Directory only authentication property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName, context).block(); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -506,38 +421,34 @@ public Response getWithResponse( * @return a specific Azure Active Directory only authentication property. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAzureADOnlyAuthenticationInner get( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { + public ManagedInstanceAzureADOnlyAuthenticationInner get(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName) { return getWithResponse(resourceGroupName, managedInstanceName, authenticationName, Context.NONE).getValue(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -552,10 +463,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -564,51 +473,36 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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 azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, + ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -623,10 +517,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -635,64 +527,49 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName, parameters); - return this - .client + public + PollerFlux, ManagedInstanceAzureADOnlyAuthenticationInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceAzureADOnlyAuthenticationInner.class, - ManagedInstanceAzureADOnlyAuthenticationInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), ManagedInstanceAzureADOnlyAuthenticationInner.class, + ManagedInstanceAzureADOnlyAuthenticationInner.class, this.client.getContext()); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -700,65 +577,54 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, + private + PollerFlux, ManagedInstanceAzureADOnlyAuthenticationInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, authenticationName, parameters, context); - return this - .client + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + authenticationName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceAzureADOnlyAuthenticationInner.class, - ManagedInstanceAzureADOnlyAuthenticationInner.class, - context); + mono, this.client.getHttpPipeline(), ManagedInstanceAzureADOnlyAuthenticationInner.class, + ManagedInstanceAzureADOnlyAuthenticationInner.class, context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + public + SyncPoller, ManagedInstanceAzureADOnlyAuthenticationInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters) .getSyncPoller(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -766,54 +632,48 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstanceAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters, context) + public + SyncPoller, ManagedInstanceAzureADOnlyAuthenticationInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, + ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters, context) .getSyncPoller(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -821,12 +681,9 @@ public Mono createOrUpdateAsync( * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, + ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -835,23 +692,21 @@ private Mono createOrUpdateAsync( /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, + public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, ManagedInstanceAzureADOnlyAuthenticationInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters).block(); } @@ -859,13 +714,13 @@ public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -873,21 +728,18 @@ public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - AuthenticationName authenticationName, - ManagedInstanceAzureADOnlyAuthenticationInner parameters, - Context context) { + public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, + ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, authenticationName, parameters, context) .block(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -896,13 +748,11 @@ public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -917,31 +767,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -951,13 +790,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, AuthenticationName authenticationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -972,28 +809,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1002,21 +830,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1026,21 +852,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, authenticationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1049,16 +874,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName).getSyncPoller(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1068,16 +893,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName, context) + .getSyncPoller(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1086,18 +912,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName) - .last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1107,18 +932,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, + AuthenticationName authenticationName, Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, authenticationName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1132,9 +956,9 @@ public void delete(String resourceGroupName, String managedInstanceName, Authent /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1143,85 +967,65 @@ public void delete(String resourceGroupName, String managedInstanceName, Authent * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context) { + public void delete(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, + Context context) { deleteAsync(resourceGroupName, managedInstanceName, authenticationName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java index 1671c82becdfc..149b45b78cd1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java @@ -43,24 +43,24 @@ * An instance of this class provides access to all the operations defined in ManagedInstanceEncryptionProtectorsClient. */ public final class ManagedInstanceEncryptionProtectorsClientImpl implements ManagedInstanceEncryptionProtectorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceEncryptionProtectorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceEncryptionProtectorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceEncryptionProtectorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceEncryptionProtectorsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceEncryptionProtectorsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -71,100 +71,77 @@ public final class ManagedInstanceEncryptionProtectorsClientImpl implements Mana @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceEncryptionProtectorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/encryptionProtector") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstanceEncryptionProtectorInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revalidate( - @HostParam("$host") String endpoint, + Mono>> revalidate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,57 +152,38 @@ private Mono> listByInsta .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -236,38 +194,23 @@ private Mono> listByInsta .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -275,18 +218,17 @@ private Mono> listByInsta * @return a list of managed instance encryption protectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,18 +237,17 @@ public PagedFlux listByInstanceAsync( * @return a list of managed instance encryption protectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -314,16 +255,16 @@ private PagedFlux listByInstanceAsync( * @return a list of managed instance encryption protectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of managed instance encryption protectors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -332,32 +273,30 @@ public PagedIterable listByInstance( * @return a list of managed instance encryption protectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -368,58 +307,40 @@ public Mono> getWithResponseAs .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -430,35 +351,24 @@ private Mono> getWithResponseA .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -467,17 +377,17 @@ private Mono> getWithResponseA * @return a managed instance encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -487,19 +397,16 @@ public Mono getAsync( * @return a managed instance encryption protector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context).block(); } /** * Gets a managed instance encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -508,37 +415,33 @@ public Response getWithResponse( * @return a managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceEncryptionProtectorInner get( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { + public ManagedInstanceEncryptionProtectorInner get(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { return getWithResponse(resourceGroupName, managedInstanceName, encryptionProtectorName, Context.NONE) .getValue(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return the managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -549,15 +452,12 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -566,27 +466,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, encryptionProtectorName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -594,21 +484,16 @@ public 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 managed instance encryption protector along with {@link Response} on successful completion of {@link - * Mono}. + * @return the managed instance encryption protector along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, + ManagedInstanceEncryptionProtectorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -619,15 +504,12 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -636,24 +518,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -664,29 +538,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, encryptionProtectorName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceEncryptionProtectorInner.class, - ManagedInstanceEncryptionProtectorInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + encryptionProtectorName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceEncryptionProtectorInner.class, + ManagedInstanceEncryptionProtectorInner.class, this.client.getContext()); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -698,31 +564,23 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceEncryptionProtectorInner.class, - ManagedInstanceEncryptionProtectorInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + encryptionProtectorName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceEncryptionProtectorInner.class, + ManagedInstanceEncryptionProtectorInner.class, context); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -733,20 +591,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters) + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters) .getSyncPoller(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -758,22 +614,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceEncryptionProtectorInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, + context) .getSyncPoller(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -783,10 +637,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the managed instance encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters) .last() @@ -795,9 +647,9 @@ public Mono createOrUpdateAsync( /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -808,23 +660,18 @@ public Mono createOrUpdateAsync( * @return the managed instance encryption protector on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, + ManagedInstanceEncryptionProtectorInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -834,19 +681,16 @@ private Mono createOrUpdateAsync( * @return the managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceEncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters) { + public ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters).block(); } /** * Updates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. @@ -857,11 +701,8 @@ public ManagedInstanceEncryptionProtectorInner createOrUpdate( * @return the managed instance encryption protector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceEncryptionProtectorInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - ManagedInstanceEncryptionProtectorInner parameters, + public ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, parameters, context) .block(); @@ -869,9 +710,9 @@ public ManagedInstanceEncryptionProtectorInner createOrUpdate( /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -880,13 +721,11 @@ public ManagedInstanceEncryptionProtectorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> revalidateWithResponseAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { + public Mono>> revalidateWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -897,36 +736,25 @@ public Mono>> revalidateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil .withContext( - context -> - service - .revalidate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + context -> service.revalidate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -936,16 +764,11 @@ public Mono>> revalidateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revalidateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { + private Mono>> revalidateWithResponseAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -956,33 +779,23 @@ private Mono>> revalidateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (encryptionProtectorName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .revalidate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.revalidate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -991,21 +804,19 @@ private Mono>> revalidateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { - Mono>> mono = - revalidateWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { + Mono>> mono + = revalidateWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1015,24 +826,20 @@ public PollerFlux, Void> beginRevalidateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRevalidateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { + private PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, + String managedInstanceName, EncryptionProtectorName encryptionProtectorName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - revalidateWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = revalidateWithResponseAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1041,16 +848,17 @@ private PollerFlux, Void> beginRevalidateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { - return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName).getSyncPoller(); + public SyncPoller, Void> beginRevalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { + return this.beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName) + .getSyncPoller(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1060,20 +868,17 @@ public SyncPoller, Void> beginRevalidate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { - return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context) + public SyncPoller, Void> beginRevalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, Context context) { + return this.beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context) .getSyncPoller(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1082,18 +887,17 @@ public SyncPoller, Void> beginRevalidate( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono revalidateAsync( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { - return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName) - .last() + public Mono revalidateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { + return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1103,21 +907,17 @@ public Mono revalidateAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revalidateAsync( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { - return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context) - .last() + private Mono revalidateAsync(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, Context context) { + return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1125,16 +925,16 @@ private Mono revalidateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate( - String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { + public void revalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName) { revalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName).block(); } /** * Revalidates an existing encryption protector. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. * @param context The context to associate with this operation. @@ -1143,88 +943,65 @@ public void revalidate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate( - String resourceGroupName, - String managedInstanceName, - EncryptionProtectorName encryptionProtectorName, - Context context) { + public void revalidate(String resourceGroupName, String managedInstanceName, + EncryptionProtectorName encryptionProtectorName, Context context) { revalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java index 949bea1d9a76d..3bd07bd6d65c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceKeysClient. + */ public final class ManagedInstanceKeysClientImpl implements ManagedInstanceKeysClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceKeysService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceKeysClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceKeysClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ManagedInstanceKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceKeysService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -64,102 +70,75 @@ public final class ManagedInstanceKeysClientImpl implements ManagedInstanceKeysC @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceKeysService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/keys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/keys/{keyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/keys/{keyName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedInstanceKeyInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceKeyInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/keys/{keyName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, String filter) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -170,59 +149,39 @@ private Mono> listByInstanceSinglePageAsy .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, String filter, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,39 +192,23 @@ private Mono> listByInstanceSinglePageAsy .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,18 +217,17 @@ private Mono> listByInstanceSinglePageAsy * @return a list of managed instance keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, String filter) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), + public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -293,19 +235,18 @@ public PagedFlux listByInstanceAsync( * @return a list of managed instance keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { final String filter = null; - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @param context The context to associate with this operation. @@ -315,8 +256,8 @@ public PagedFlux listByInstanceAsync( * @return a list of managed instance keys as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, String filter, Context context) { + private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter, Context context) { return new PagedFlux<>( () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); @@ -324,9 +265,9 @@ private PagedFlux listByInstanceAsync( /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -341,9 +282,9 @@ public PagedIterable listByInstance(String resourceGrou /** * Gets a list of managed instance keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param filter An OData filter expression that filters elements in the collection. * @param context The context to associate with this operation. @@ -353,16 +294,16 @@ public PagedIterable listByInstance(String resourceGrou * @return a list of managed instance keys as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, String filter, Context context) { + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + String filter, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, filter, context)); } /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -371,13 +312,11 @@ public PagedIterable listByInstance( * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -391,33 +330,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -427,13 +354,11 @@ public Mono> getWithResponseAsync( * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -447,30 +372,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -479,17 +394,17 @@ private Mono> getWithResponseAsync( * @return a managed instance key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String keyName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String keyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, keyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -499,16 +414,16 @@ public Mono getAsync( * @return a managed instance key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String keyName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, keyName, context).block(); } /** * Gets a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -523,9 +438,9 @@ public ManagedInstanceKeyInner get(String resourceGroupName, String managedInsta /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -535,13 +450,11 @@ public ManagedInstanceKeyInner get(String resourceGroupName, String managedInsta * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -555,10 +468,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -568,26 +479,16 @@ public Mono>> createOrUpdateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -598,17 +499,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a managed instance key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -622,10 +517,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -634,24 +527,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -663,23 +547,18 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedInstanceKeyInner> beginCreateOrUpdateAsync( String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, keyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceKeyInner.class, - ManagedInstanceKeyInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, keyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceKeyInner.class, ManagedInstanceKeyInner.class, + this.client.getContext()); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -691,29 +570,20 @@ public PollerFlux, ManagedInstanceKeyInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedInstanceKeyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, + String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, keyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceKeyInner.class, - ManagedInstanceKeyInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, keyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedInstanceKeyInner.class, ManagedInstanceKeyInner.class, context); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -725,14 +595,15 @@ private PollerFlux, ManagedInstanceKeyInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceKeyInner> beginCreateOrUpdate( String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters) + .getSyncPoller(); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -744,20 +615,17 @@ public SyncPoller, ManagedInstanceKeyInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceKeyInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, + String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters, context) .getSyncPoller(); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -767,18 +635,17 @@ public SyncPoller, ManagedInstanceKeyInner> * @return a managed instance key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String keyName, ManagedInstanceKeyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -789,22 +656,17 @@ public Mono createOrUpdateAsync( * @return a managed instance key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String keyName, ManagedInstanceKeyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -814,16 +676,16 @@ private Mono createOrUpdateAsync( * @return a managed instance key. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceKeyInner createOrUpdate( - String resourceGroupName, String managedInstanceName, String keyName, ManagedInstanceKeyInner parameters) { + public ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String keyName, + ManagedInstanceKeyInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters).block(); } /** * Creates or updates a managed instance key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. @@ -834,20 +696,16 @@ public ManagedInstanceKeyInner createOrUpdate( * @return a managed instance key. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceKeyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String keyName, - ManagedInstanceKeyInner parameters, - Context context) { + public ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String keyName, + ManagedInstanceKeyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters, context).block(); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -856,13 +714,11 @@ public ManagedInstanceKeyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -876,31 +732,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -910,13 +755,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String keyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -930,28 +773,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -960,21 +794,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String keyName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, keyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String keyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, keyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -984,21 +816,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String keyName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, keyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, keyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1007,16 +838,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String keyName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String keyName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, keyName).getSyncPoller(); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -1026,16 +857,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String keyName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, keyName, context).getSyncPoller(); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1045,16 +876,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String keyName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -1064,18 +894,17 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String keyName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String keyName, + Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, keyName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1089,9 +918,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes the managed instance key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be deleted. * @param context The context to associate with this operation. @@ -1106,14 +935,13 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -1121,62 +949,42 @@ private Mono> listByInstanceNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java index f4899d9f273ef..fd4b98bea9d35 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java @@ -44,24 +44,24 @@ */ public final class ManagedInstanceLongTermRetentionPoliciesClientImpl implements ManagedInstanceLongTermRetentionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceLongTermRetentionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceLongTermRetentionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceLongTermRetentionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceLongTermRetentionPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceLongTermRetentionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -72,91 +72,69 @@ public final class ManagedInstanceLongTermRetentionPoliciesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceLongTermRetentionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies" - + "/{policyName}") - @ExpectedResponses({200}) + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedInstanceLongTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies" - + "/{policyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedInstanceLongTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstanceLongTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -170,42 +148,25 @@ private Mono> listByD return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -213,16 +174,14 @@ private Mono> listByD * @throws 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String managedInstanceName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -236,39 +195,23 @@ private Mono> listByD return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,8 +220,8 @@ private Mono> listByD * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); @@ -286,9 +229,9 @@ public PagedFlux listByDatabaseAsyn /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -298,8 +241,8 @@ public PagedFlux listByDatabaseAsyn * @return a database's long term retention policy as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -307,9 +250,9 @@ private PagedFlux listByDatabaseAsy /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,16 +261,16 @@ private PagedFlux listByDatabaseAsy * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** * Gets a database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -337,16 +280,16 @@ public PagedIterable listByDatabase * @return a database's long term retention policy as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); } /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -354,19 +297,14 @@ public PagedIterable listByDatabase * @throws 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 managed database's long term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -383,34 +321,22 @@ public Mono> getWithRespon return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -419,20 +345,15 @@ public Mono> getWithRespon * @throws 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 managed database's long term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -449,31 +370,20 @@ private Mono> getWithRespo return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -483,20 +393,17 @@ private Mono> getWithRespo * @return a managed database's long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -507,20 +414,17 @@ public Mono getAsync( * @return a managed database's long term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context).block(); } /** * Gets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -530,20 +434,17 @@ public Response getWithResponse( * @return a managed database's long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName) { + public ManagedInstanceLongTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, policyName, Context.NONE) .getValue(); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -554,17 +455,12 @@ public ManagedInstanceLongTermRetentionPolicyInner get( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -581,10 +477,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -593,28 +487,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -626,18 +509,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -654,10 +531,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -666,25 +541,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - databaseName, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -695,32 +560,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a long term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public + PollerFlux, ManagedInstanceLongTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters); - return this - .client + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, policyName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceLongTermRetentionPolicyInner.class, - ManagedInstanceLongTermRetentionPolicyInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), ManagedInstanceLongTermRetentionPolicyInner.class, + ManagedInstanceLongTermRetentionPolicyInner.class, this.client.getContext()); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -732,34 +589,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a long term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, + private + PollerFlux, ManagedInstanceLongTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context) { + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context); - return this - .client + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + databaseName, policyName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceLongTermRetentionPolicyInner.class, - ManagedInstanceLongTermRetentionPolicyInner.class, - context); + mono, this.client.getHttpPipeline(), ManagedInstanceLongTermRetentionPolicyInner.class, + ManagedInstanceLongTermRetentionPolicyInner.class, context); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -770,23 +618,21 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a long term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public + SyncPoller, ManagedInstanceLongTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .getSyncPoller(); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -798,25 +644,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a long term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstanceLongTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, + public + SyncPoller, ManagedInstanceLongTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context) .getSyncPoller(); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -827,11 +670,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .last() @@ -840,9 +680,9 @@ public Mono createOrUpdateAsync( /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -854,24 +694,18 @@ public Mono createOrUpdateAsync( * @return a long term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -882,11 +716,8 @@ private Mono createOrUpdateAsync( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, + public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters) .block(); @@ -894,9 +725,9 @@ public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( /** * Sets a managed database's long term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -908,92 +739,67 @@ public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( * @return a long term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, - ManagedInstanceLongTermRetentionPolicyInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, databaseName, policyName, parameters, context) - .block(); + public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, + ManagedInstanceLongTermRetentionPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, policyName, parameters, + context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java index 6da3aca1e4620..92898a6600743 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java @@ -32,24 +32,28 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceOperationsClient. + */ public final class ManagedInstanceOperationsClientImpl implements ManagedInstanceOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,83 +64,63 @@ public final class ManagedInstanceOperationsClientImpl implements ManagedInstanc @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/operations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("$host") String endpoint, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/operations/{operationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("operationId") UUID operationId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/operations/{operationId}/cancel") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, + Mono> cancel(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("operationId") UUID operationId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -147,57 +131,37 @@ private Mono> listByManagedInstance .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -208,38 +172,23 @@ private Mono> listByManagedInstance .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -247,18 +196,17 @@ private Mono> listByManagedInstance * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,8 +215,8 @@ public PagedFlux listByManagedInstanceAsync( * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedFlux<>( () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); @@ -276,9 +224,9 @@ private PagedFlux listByManagedInstanceAsync( /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -286,16 +234,16 @@ private PagedFlux listByManagedInstanceAsync( * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of operations performed on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,32 +252,30 @@ public PagedIterable listByManagedInstance( * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -343,33 +289,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -377,16 +311,14 @@ public 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 management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -400,30 +332,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,17 +354,17 @@ private Mono> getWithResponseAsync( * @return a management operation on a managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, UUID operationId) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + UUID operationId) { return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -452,16 +374,16 @@ public Mono getAsync( * @return a management operation on a managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + UUID operationId, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId, context).block(); } /** * Gets a management operation on a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -476,9 +398,9 @@ public ManagedInstanceOperationInner get(String resourceGroupName, String manage /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,13 +409,11 @@ public ManagedInstanceOperationInner get(String resourceGroupName, String manage * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, + UUID operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -507,31 +427,20 @@ public Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -541,13 +450,11 @@ public Mono> cancelWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context) { + private Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, + UUID operationId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -561,28 +468,19 @@ private Mono> cancelWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - operationId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, managedInstanceName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -598,9 +496,9 @@ public Mono cancelAsync(String resourceGroupName, String managedInstanceNa /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -610,16 +508,16 @@ public Mono cancelAsync(String resourceGroupName, String managedInstanceNa * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String managedInstanceName, UUID operationId, Context context) { + public Response cancelWithResponse(String resourceGroupName, String managedInstanceName, UUID operationId, + Context context) { return cancelWithResponseAsync(resourceGroupName, managedInstanceName, operationId, context).block(); } /** * Cancels the asynchronous operation on the managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -633,79 +531,58 @@ public void cancel(String resourceGroupName, String managedInstanceName, UUID op /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list managed instance operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByManagedInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list managed instance operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java index bdb28dc25b3b7..be62b93d4fb3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java @@ -44,24 +44,24 @@ */ public final class ManagedInstancePrivateEndpointConnectionsClientImpl implements ManagedInstancePrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstancePrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstancePrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstancePrivateEndpointConnectionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstancePrivateEndpointConnectionsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstancePrivateEndpointConnectionsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -72,100 +72,77 @@ public final class ManagedInstancePrivateEndpointConnectionsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstancePrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstance( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstancePrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -176,57 +153,38 @@ private Mono> listB .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -237,38 +195,23 @@ private Mono> listB .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -276,18 +219,17 @@ private Mono> listB * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,8 +238,8 @@ public PagedFlux listByManagedIns * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PagedFlux + listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, Context context) { return new PagedFlux<>( () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); @@ -305,9 +247,9 @@ private PagedFlux listByManagedIn /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -315,16 +257,16 @@ private PagedFlux listByManagedIn * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -333,16 +275,16 @@ public PagedIterable listByManage * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,13 +293,11 @@ public PagedIterable listByManage * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -368,39 +308,26 @@ public Mono> getWithResp .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -410,13 +337,11 @@ public Mono> getWithResp * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -427,36 +352,25 @@ private Mono> getWithRes .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,17 +379,17 @@ private Mono> getWithRes * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -485,17 +399,17 @@ public Mono getAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context) .block(); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,36 +418,32 @@ public Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstancePrivateEndpointConnectionInner get( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { + public ManagedInstancePrivateEndpointConnectionInner get(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName) { return getWithResponse(resourceGroupName, managedInstanceName, privateEndpointConnectionName, Context.NONE) .getValue(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -544,16 +454,12 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -562,30 +468,20 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, privateEndpointConnectionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -593,17 +489,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, + ManagedInstancePrivateEndpointConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,16 +505,12 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -632,61 +519,45 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters); - return this - .client + public + PollerFlux, ManagedInstancePrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + privateEndpointConnectionName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstancePrivateEndpointConnectionInner.class, - ManagedInstancePrivateEndpointConnectionInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), ManagedInstancePrivateEndpointConnectionInner.class, + ManagedInstancePrivateEndpointConnectionInner.class, this.client.getContext()); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -694,62 +565,51 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, + private + PollerFlux, ManagedInstancePrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, context); - return this - .client + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + privateEndpointConnectionName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstancePrivateEndpointConnectionInner.class, - ManagedInstancePrivateEndpointConnectionInner.class, - context); + mono, this.client.getHttpPipeline(), ManagedInstancePrivateEndpointConnectionInner.class, + ManagedInstancePrivateEndpointConnectionInner.class, context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + public + SyncPoller, ManagedInstancePrivateEndpointConnectionInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters) .getSyncPoller(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -757,52 +617,45 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a private endpoint connection. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedInstancePrivateEndpointConnectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, context) + public + SyncPoller, ManagedInstancePrivateEndpointConnectionInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, + ManagedInstancePrivateEndpointConnectionInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, + context) .getSyncPoller(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -810,36 +663,29 @@ public Mono createOrUpdateAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, + ManagedInstancePrivateEndpointConnectionInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstancePrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, + public ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, ManagedInstancePrivateEndpointConnectionInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters) .block(); @@ -847,12 +693,12 @@ public ManagedInstancePrivateEndpointConnectionInner createOrUpdate( /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -860,22 +706,18 @@ public ManagedInstancePrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstancePrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String privateEndpointConnectionName, - ManagedInstancePrivateEndpointConnectionInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, context) - .block(); + public ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, + ManagedInstancePrivateEndpointConnectionInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, parameters, + context).block(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -884,13 +726,11 @@ public ManagedInstancePrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -901,37 +741,24 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -941,13 +768,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -958,34 +783,23 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -994,21 +808,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1018,21 +830,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1041,16 +852,17 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName) + .getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1060,17 +872,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context) .getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1079,18 +891,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName) - .last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1100,18 +911,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1125,9 +935,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1136,86 +946,66 @@ public void delete(String resourceGroupName, String managedInstanceName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, + Context context) { deleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByManagedInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java index accf1fe729b32..8f8355ab225e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java @@ -34,24 +34,24 @@ * An instance of this class provides access to all the operations defined in ManagedInstancePrivateLinkResourcesClient. */ public final class ManagedInstancePrivateLinkResourcesClientImpl implements ManagedInstancePrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstancePrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstancePrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstancePrivateLinkResourcesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstancePrivateLinkResourcesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstancePrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,68 +62,53 @@ public final class ManagedInstancePrivateLinkResourcesClientImpl implements Mana @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstancePrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("$host") String endpoint, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("groupName") String groupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("groupName") String groupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -134,57 +119,37 @@ private Mono> listByManagedInstan .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 private link resources for SQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -195,38 +160,23 @@ private Mono> listByManagedInstan .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -234,18 +184,17 @@ private Mono> listByManagedInstan * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,8 +203,8 @@ public PagedFlux listByManagedInstanceAsync( * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedFlux<>( () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); @@ -263,9 +212,9 @@ private PagedFlux listByManagedInstanceAsync( /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -273,16 +222,16 @@ private PagedFlux listByManagedInstanceAsync( * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,32 +240,30 @@ public PagedIterable listByManagedInstance( * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link 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 a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String groupName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -330,50 +277,36 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - groupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + groupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String groupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -387,30 +320,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - groupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -419,17 +342,17 @@ private Mono> getWithResponseAsync( * @return a private link resource for SQL server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String groupName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String groupName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. @@ -439,16 +362,16 @@ public Mono getAsync( * @return a private link resource for SQL server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String groupName, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String groupName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName, context).block(); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -463,79 +386,58 @@ public ManagedInstancePrivateLinkInner get(String resourceGroupName, String mana /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByManagedInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java index d2261fb3e78f2..a148ced3f7503 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java @@ -30,26 +30,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstanceTdeCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstanceTdeCertificatesClient. + */ public final class ManagedInstanceTdeCertificatesClientImpl implements ManagedInstanceTdeCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceTdeCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceTdeCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceTdeCertificatesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceTdeCertificatesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceTdeCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,27 +62,22 @@ public final class ManagedInstanceTdeCertificatesClientImpl implements ManagedIn @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceTdeCertificatesService { - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/tdeCertificates") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TdeCertificate parameters, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TdeCertificate parameters, Context context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,13 +86,11 @@ Mono>> create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters) { + public Mono>> createWithResponseAsync(String resourceGroupName, + String managedInstanceName, TdeCertificate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -106,10 +101,8 @@ public Mono>> createWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -117,25 +110,16 @@ public Mono>> createWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -145,13 +129,11 @@ public Mono>> createWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, + String managedInstanceName, TdeCertificate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,10 +144,8 @@ private Mono>> createWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -173,22 +153,15 @@ private Mono>> createWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.create(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,21 +170,19 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginCreateAsync(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, managedInstanceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -221,21 +192,20 @@ public PollerFlux, Void> beginCreateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context) { + private PollerFlux, Void> beginCreateAsync(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,16 +214,16 @@ private PollerFlux, Void> beginCreateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreate( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters) { - return beginCreateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); + public SyncPoller, Void> beginCreate(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters) { + return this.beginCreateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -263,16 +233,16 @@ public SyncPoller, Void> beginCreate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreate( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context) { - return beginCreateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginCreate(String resourceGroupName, String managedInstanceName, + TdeCertificate parameters, Context context) { + return this.beginCreateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,16 +252,15 @@ public SyncPoller, Void> beginCreate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String managedInstanceName, TdeCertificate parameters) { - return beginCreateAsync(resourceGroupName, managedInstanceName, parameters) - .last() + return beginCreateAsync(resourceGroupName, managedInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -301,18 +270,17 @@ public Mono createAsync(String resourceGroupName, String managedInstanceNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context) { - return beginCreateAsync(resourceGroupName, managedInstanceName, parameters, context) - .last() + private Mono createAsync(String resourceGroupName, String managedInstanceName, TdeCertificate parameters, + Context context) { + return beginCreateAsync(resourceGroupName, managedInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -326,9 +294,9 @@ public void create(String resourceGroupName, String managedInstanceName, TdeCert /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -337,8 +305,8 @@ public void create(String resourceGroupName, String managedInstanceName, TdeCert * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void create( - String resourceGroupName, String managedInstanceName, TdeCertificate parameters, Context context) { + public void create(String resourceGroupName, String managedInstanceName, TdeCertificate parameters, + Context context) { createAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java index ef436470f98e3..abda186d9a2da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java @@ -40,24 +40,24 @@ */ public final class ManagedInstanceVulnerabilityAssessmentsClientImpl implements ManagedInstanceVulnerabilityAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstanceVulnerabilityAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstanceVulnerabilityAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstanceVulnerabilityAssessmentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedInstanceVulnerabilityAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedInstanceVulnerabilityAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,100 +68,77 @@ public final class ManagedInstanceVulnerabilityAssessmentsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceVulnerabilityAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/vulnerabilityAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstance( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedInstanceVulnerabilityAssessmentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the managed instance's vulnerability assessment policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -172,57 +149,38 @@ private Mono> listByI .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @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 managed instance's vulnerability assessment policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,38 +191,23 @@ private Mono> listByI .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -272,18 +215,17 @@ private Mono> listByI * @return the managed instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,71 +234,68 @@ public PagedFlux listByInstanceAsyn * @return the managed instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the managed instance's vulnerability assessment policies as paginated response with {@link - * PagedIterable}. + * @return the managed instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets the managed instance's vulnerability assessment policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. * @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 managed instance's vulnerability assessment policies as paginated response with {@link - * PagedIterable}. + * @return the managed instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the managed instance's vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -367,39 +306,26 @@ public Mono> getWithRespon .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -407,19 +333,14 @@ public Mono> getWithRespon * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the managed instance's vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -430,36 +351,24 @@ private Mono> getWithRespo .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -468,17 +377,17 @@ private Mono> getWithRespo * @return the managed instance's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -488,20 +397,17 @@ public Mono getAsync( * @return the managed instance's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, context) .block(); } /** * Gets the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -510,8 +416,8 @@ public Response getWithResponse( * @return the managed instance's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceVulnerabilityAssessmentInner get( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public ManagedInstanceVulnerabilityAssessmentInner get(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponse(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, Context.NONE) .getValue(); } @@ -520,9 +426,9 @@ public ManagedInstanceVulnerabilityAssessmentInner get( * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -530,19 +436,15 @@ public ManagedInstanceVulnerabilityAssessmentInner 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 managed instance vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -553,16 +455,12 @@ public Mono> createOrUpdat .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -571,19 +469,9 @@ public Mono> createOrUpdat } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -591,9 +479,9 @@ public Mono> createOrUpdat * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -602,20 +490,15 @@ public Mono> createOrUpdat * @throws 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 managed instance vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ManagedInstanceVulnerabilityAssessmentInner parameters, - Context context) { + String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + ManagedInstanceVulnerabilityAssessmentInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -626,16 +509,12 @@ private Mono> createOrUpda .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -644,26 +523,18 @@ private Mono> createOrUpda } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -673,23 +544,20 @@ private Mono> createOrUpda * @return a managed instance vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -700,24 +568,20 @@ public Mono createOrUpdateAsync( * @return a managed instance vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ManagedInstanceVulnerabilityAssessmentInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + ManagedInstanceVulnerabilityAssessmentInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, + parameters, context).block(); } /** * Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -727,21 +591,18 @@ public Response createOrUpdateWithR * @return a managed instance vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, + String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ManagedInstanceVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, parameters, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, + parameters, Context.NONE).getValue(); } /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,13 +611,11 @@ public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -767,37 +626,24 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -807,16 +653,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -827,34 +668,23 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -863,17 +693,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { return deleteWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName) .flatMap(ignored -> Mono.empty()); } /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -883,20 +713,17 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String managedInstanceName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return deleteWithResponseAsync(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, context) .block(); } /** * Removes the managed instance's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -904,85 +731,65 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public void delete(String resourceGroupName, String managedInstanceName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { deleteWithResponse(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, Context.NONE); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the ManagedInstance's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the ManagedInstance's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java index 0eacdd32cde6b..db49657cb6e87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java @@ -52,26 +52,29 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedInstancesClient. */ -public final class ManagedInstancesClientImpl - implements InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete, - ManagedInstancesClient { - /** The proxy service used to perform REST calls. */ +/** + * An instance of this class provides access to all the operations defined in ManagedInstancesClient. + */ +public final class ManagedInstancesClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, ManagedInstancesClient { + /** + * The proxy service used to perform REST calls. + */ private final ManagedInstancesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedInstancesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedInstancesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ManagedInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ManagedInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -82,311 +85,213 @@ public final class ManagedInstancesClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstancesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}/managedInstances") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePool( - @HostParam("$host") String endpoint, + Mono> listByInstancePool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("instancePoolName") String instancePoolName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}") - @ExpectedResponses({200}) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedInstanceInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedInstanceUpdate parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/failover") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @QueryParam("replicaType") ReplicaType replicaType, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @QueryParam("replicaType") ReplicaType replicaType, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listOutboundNetworkDependenciesByManagedInstance( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/topqueries") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("$host") String endpoint, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @QueryParam("numberOfQueries") Integer numberOfQueries, - @QueryParam("databases") String databases, - @QueryParam("startTime") String startTime, - @QueryParam("endTime") String endTime, + @QueryParam("numberOfQueries") Integer numberOfQueries, @QueryParam("databases") String databases, + @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, @QueryParam("interval") QueryTimeGrainType interval, @QueryParam("aggregationFunction") AggregationFunctionType aggregationFunction, @QueryParam("observationMetric") MetricType observationMetric, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstancePoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listOutboundNetworkDependenciesByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -400,7 +305,7 @@ public PagedFlux listAsync(String expand) { /** * Gets a list of all managed instances 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 a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. @@ -413,7 +318,7 @@ public PagedFlux listAsync() { /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,13 +328,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(expand, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all managed instances 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 a list of all managed instances in the subscription as paginated response with {@link PagedIterable}. @@ -442,7 +347,7 @@ public PagedIterable list() { /** * Gets a list of all managed instances in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -457,25 +362,23 @@ public PagedIterable list(String expand, Context context) /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all managed instances in an instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync( - String resourceGroupName, String instancePoolName, String expand) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -486,42 +389,24 @@ private Mono> listByInstancePoolSinglePageAs .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByInstancePool( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -529,16 +414,14 @@ private Mono> listByInstancePoolSinglePageAs * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all managed instances in an instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync( - String resourceGroupName, String instancePoolName, String expand, Context context) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -549,39 +432,23 @@ private Mono> listByInstancePoolSinglePageAs .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstancePool( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -590,18 +457,17 @@ private Mono> listByInstancePoolSinglePageAs * @return a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, String expand) { - return new PagedFlux<>( - () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), + public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand) { + return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); } /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -611,16 +477,15 @@ public PagedFlux listByInstancePoolAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName) { final String expand = null; - return new PagedFlux<>( - () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), + return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); } /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -630,8 +495,8 @@ public PagedFlux listByInstancePoolAsync(String resourceGr * @return a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, String expand, Context context) { + private PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand, Context context) { return new PagedFlux<>( () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand, context), nextLink -> listByInstancePoolNextSinglePageAsync(nextLink, context)); @@ -639,9 +504,9 @@ private PagedFlux listByInstancePoolAsync( /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -656,9 +521,9 @@ public PagedIterable listByInstancePool(String resourceGro /** * Gets a list of all managed instances in an instance pool. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The instance pool name. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -668,126 +533,89 @@ public PagedIterable listByInstancePool(String resourceGro * @return a list of all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool( - String resourceGroupName, String instancePoolName, String expand, Context context) { + public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + String expand, Context context) { return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, expand, context)); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -796,16 +624,15 @@ private Mono> listByResourceGroupSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -814,16 +641,15 @@ public PagedFlux listByResourceGroupAsync(String resourceG @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String expand = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -832,18 +658,17 @@ public PagedFlux listByResourceGroupAsync(String resourceG * @return a list of managed instances in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String expand, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -857,9 +682,9 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Gets a list of managed instances in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -868,16 +693,16 @@ public PagedIterable listByResourceGroup(String resourceGr * @return a list of managed instances in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, String expand, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, String expand, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, expand, context)); } /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -886,13 +711,11 @@ public PagedIterable listByResourceGroup( * @return a managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String managedInstanceName, String expand) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -903,33 +726,22 @@ public Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -939,13 +751,11 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String managedInstanceName, String expand, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -956,30 +766,20 @@ private Mono> getByResourceGroupWithResponseAsync .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, managedInstanceName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -995,9 +795,9 @@ public Mono getByResourceGroupAsync(String resourceGroupNa /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -1007,16 +807,16 @@ public Mono getByResourceGroupAsync(String resourceGroupNa * @return a managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String managedInstanceName, String expand, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String managedInstanceName, String expand, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, managedInstanceName, expand, context).block(); } /** * Gets a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1031,9 +831,9 @@ public ManagedInstanceInner getByResourceGroup(String resourceGroupName, String /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1042,13 +842,11 @@ public ManagedInstanceInner getByResourceGroup(String resourceGroupName, String * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1059,10 +857,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1072,25 +868,16 @@ public Mono>> createOrUpdateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1100,13 +887,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1117,10 +902,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1129,23 +912,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1156,23 +931,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceInner.class, - ManagedInstanceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1185,19 +954,17 @@ public PollerFlux, ManagedInstanceInner> beginC private PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedInstanceInner.class, ManagedInstanceInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, context); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1206,16 +973,16 @@ private PollerFlux, ManagedInstanceInner> begin * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1227,14 +994,15 @@ public SyncPoller, ManagedInstanceInner> beginC @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context) + .getSyncPoller(); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1243,18 +1011,17 @@ public SyncPoller, ManagedInstanceInner> beginC * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1264,18 +1031,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1284,16 +1050,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner createOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { + public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).block(); } /** * Creates or updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1303,16 +1069,16 @@ public ManagedInstanceInner createOrUpdate( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner createOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { + public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1320,13 +1086,11 @@ public ManagedInstanceInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1337,30 +1101,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1369,13 +1123,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1386,27 +1138,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1416,17 +1160,15 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1435,21 +1177,20 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1458,14 +1199,14 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, managedInstanceName).getSyncPoller(); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1474,16 +1215,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1492,16 +1233,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String managedInstanceName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1511,16 +1251,15 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String managedInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, context) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1533,9 +1272,9 @@ public void delete(String resourceGroupName, String managedInstanceName) { /** * Deletes a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1549,9 +1288,9 @@ public void delete(String resourceGroupName, String managedInstanceName, Context /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1560,13 +1299,11 @@ public void delete(String resourceGroupName, String managedInstanceName, Context * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1577,10 +1314,8 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1589,26 +1324,16 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1618,13 +1343,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1635,10 +1358,8 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1647,23 +1368,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1672,25 +1385,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedInstanceInner.class, - ManagedInstanceInner.class, - this.client.getContext()); + public PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1703,19 +1410,17 @@ public PollerFlux, ManagedInstanceInner> beginU private PollerFlux, ManagedInstanceInner> beginUpdateAsync( String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedInstanceInner.class, ManagedInstanceInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, context); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1724,16 +1429,16 @@ private PollerFlux, ManagedInstanceInner> begin * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1743,16 +1448,16 @@ public SyncPoller, ManagedInstanceInner> beginU * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1761,18 +1466,17 @@ public SyncPoller, ManagedInstanceInner> beginU * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1782,18 +1486,17 @@ public Mono updateAsync( * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1802,16 +1505,16 @@ private Mono updateAsync( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner update( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { + public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters) { return updateAsync(resourceGroupName, managedInstanceName, parameters).block(); } /** * Updates a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested managed instance resource state. * @param context The context to associate with this operation. @@ -1821,16 +1524,16 @@ public ManagedInstanceInner update( * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner update( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { + public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters, Context context) { return updateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1839,13 +1542,11 @@ public ManagedInstanceInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, + String managedInstanceName, ReplicaType replicaType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1856,31 +1557,20 @@ public Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - replicaType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + replicaType, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -1890,13 +1580,11 @@ public Mono>> failoverWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, + String managedInstanceName, ReplicaType replicaType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1907,28 +1595,19 @@ private Mono>> failoverWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - replicaType, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, managedInstanceName, replicaType, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1937,21 +1616,19 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1961,19 +1638,17 @@ public PollerFlux, Void> beginFailoverAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName) { final ReplicaType replicaType = null; - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -1983,21 +1658,20 @@ public PollerFlux, Void> beginFailoverAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginFailoverAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context) { + private PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2007,14 +1681,14 @@ private PollerFlux, Void> beginFailoverAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginFailover(String resourceGroupName, String managedInstanceName) { final ReplicaType replicaType = null; - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).getSyncPoller(); + return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).getSyncPoller(); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -2024,16 +1698,16 @@ public SyncPoller, Void> beginFailover(String resourceGroupName * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginFailover( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).getSyncPoller(); + public SyncPoller, Void> beginFailover(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context) { + return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).getSyncPoller(); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2043,16 +1717,15 @@ public SyncPoller, Void> beginFailover( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType) - .last() + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2062,16 +1735,15 @@ public Mono failoverAsync(String resourceGroupName, String managedInstance @ServiceMethod(returns = ReturnType.SINGLE) public Mono failoverAsync(String resourceGroupName, String managedInstanceName) { final ReplicaType replicaType = null; - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType) - .last() + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -2081,18 +1753,17 @@ public Mono failoverAsync(String resourceGroupName, String managedInstance * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context) - .last() + private Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, + Context context) { + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2106,9 +1777,9 @@ public void failover(String resourceGroupName, String managedInstanceName) { /** * Failovers a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. @@ -2117,32 +1788,30 @@ public void failover(String resourceGroupName, String managedInstanceName) { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void failover( - String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context) { + public void failover(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, + Context context) { failoverAsync(resourceGroupName, managedInstanceName, replicaType, context).block(); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the collection of outbound network dependencies for the given managed instance along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2153,58 +1822,39 @@ public void failover( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listOutboundNetworkDependenciesByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), + resourceGroupName, managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 collection of outbound network dependencies for the given managed instance along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the collection of outbound network dependencies for the given managed instance along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2215,108 +1865,92 @@ public void failover( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listOutboundNetworkDependenciesByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listOutboundNetworkDependenciesByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName) { + public PagedFlux + listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName) { return new PagedFlux<>( - () -> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, + managedInstanceName), nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listOutboundNetworkDependenciesByManagedInstanceAsync( String resourceGroupName, String managedInstanceName, Context context) { return new PagedFlux<>( - () -> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync( - resourceGroupName, managedInstanceName, context), + () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, + managedInstanceName, context), nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOutboundNetworkDependenciesByManagedInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable + listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName) { return new PagedIterable<>( listOutboundNetworkDependenciesByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listOutboundNetworkDependenciesByManagedInstance( @@ -2327,13 +1961,13 @@ public PagedIterable listOutboundNetworkDepend /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -2343,24 +1977,15 @@ public PagedIterable listOutboundNetworkDepend * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return top resource consuming queries of a managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric) { + private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, + QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2371,52 +1996,28 @@ private Mono> listByManagedInstanceSinglePageAsyn .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, numberOfQueries, databases, startTime, endTime, interval, aggregationFunction, + observationMetric, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -2427,25 +2028,16 @@ private Mono> listByManagedInstanceSinglePageAsyn * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return top resource consuming queries of a managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric, + private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, + QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2456,49 +2048,28 @@ private Mono> listByManagedInstanceSinglePageAsyn .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -2510,36 +2081,20 @@ private Mono> listByManagedInstanceSinglePageAsyn * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric) { + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric) { return new PagedFlux<>( - () -> - listByManagedInstanceSinglePageAsync( - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric), + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2556,29 +2111,20 @@ public PagedFlux listByManagedInstanceAsync(String resourceGrou final AggregationFunctionType aggregationFunction = null; final MetricType observationMetric = null; return new PagedFlux<>( - () -> - listByManagedInstanceSinglePageAsync( - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric), + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -2591,38 +2137,20 @@ public PagedFlux listByManagedInstanceAsync(String resourceGrou * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric, - Context context) { + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { return new PagedFlux<>( - () -> - listByManagedInstanceSinglePageAsync( - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric, - context), + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, context), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2638,28 +2166,19 @@ public PagedIterable listByManagedInstance(String resourceGroup final QueryTimeGrainType interval = null; final AggregationFunctionType aggregationFunction = null; final MetricType observationMetric = null; - return new PagedIterable<>( - listByManagedInstanceAsync( - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric)); + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric)); } /** * Get top resource consuming queries of a managed instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param numberOfQueries How many 'top queries' to return. Default is 5. * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. + * parameter is not specified. * @param startTime Start time for observed period. * @param endTime End time for observed period. * @param interval The time step to be used to summarize the metric values. Default value is PT1H. @@ -2672,36 +2191,17 @@ public PagedIterable listByManagedInstance(String resourceGroup * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, - String managedInstanceName, - Integer numberOfQueries, - String databases, - String startTime, - String endTime, - QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, - MetricType observationMetric, - Context context) { - return new PagedIterable<>( - listByManagedInstanceAsync( - resourceGroupName, - managedInstanceName, - numberOfQueries, - databases, - startTime, - endTime, - interval, - aggregationFunction, - observationMetric, - context)); + public PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2713,31 +2213,20 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2750,31 +2239,20 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2786,32 +2264,22 @@ private Mono> listByInstancePoolNextSinglePa return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2819,37 +2287,26 @@ private Mono> listByInstancePoolNextSinglePa * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstancePoolNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2861,32 +2318,22 @@ private Mono> listByResourceGroupNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2894,42 +2341,31 @@ private Mono> listByResourceGroupNextSingleP * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 collection of endpoints that the managed instance service requires outbound network access to along - * with {@link PagedResponse} on successful completion of {@link Mono}. + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2938,41 +2374,28 @@ private Mono> listByResourceGroupNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listOutboundNetworkDependenciesByManagedInstanceNext( - nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstanceNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of endpoints that the managed instance service requires outbound network access to along - * with {@link PagedResponse} on successful completion of {@link Mono}. + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2981,36 +2404,26 @@ private Mono> listByResourceGroupNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listOutboundNetworkDependenciesByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of top resource consuming queries on managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink) { @@ -3018,63 +2431,43 @@ private Mono> listByManagedInstanceNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of top resource consuming queries on managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java index 8572682d106f7..5de255c35c8a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java @@ -45,24 +45,24 @@ */ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl implements ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -74,112 +74,84 @@ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolic @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" - + "/backupShortTermRetentionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByRestorableDroppedDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" - + "/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" - + "/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}" - + "/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByRestorableDroppedDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByRestorableDroppedDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,48 +162,29 @@ Mono> listByRestorable .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByRestorableDroppedDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByRestorableDroppedDatabase(this.client.getEndpoint(), + resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -239,17 +192,15 @@ Mono> listByRestorable * @throws 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 dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByRestorableDroppedDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -260,45 +211,28 @@ Mono> listByRestorable .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByRestorableDroppedDatabase( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .listByRestorableDroppedDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -309,18 +243,16 @@ Mono> listByRestorable @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByRestorableDroppedDatabaseAsync( String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { - return new PagedFlux<>( - () -> - listByRestorableDroppedDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId), + return new PagedFlux<>(() -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, + managedInstanceName, restorableDroppedDatabaseId), nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -333,17 +265,16 @@ public PagedFlux listByRestorableDro private PagedFlux listByRestorableDroppedDatabaseAsync( String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { return new PagedFlux<>( - () -> - listByRestorableDroppedDatabaseSinglePageAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, context), + () -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, context), nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,9 +291,9 @@ public PagedIterable listByRestorabl /** * Gets a dropped database's short term retention policy list. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -374,16 +305,15 @@ public PagedIterable listByRestorabl @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByRestorableDroppedDatabase( String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { - return new PagedIterable<>( - listByRestorableDroppedDatabaseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, context)); + return new PagedIterable<>(listByRestorableDroppedDatabaseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, context)); } /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -391,19 +321,15 @@ public PagedIterable listByRestorabl * @throws 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 dropped database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -414,43 +340,29 @@ public Mono> getWithRespons .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -459,20 +371,15 @@ public Mono> getWithRespons * @throws 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 dropped database's short term retention policy along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -483,40 +390,28 @@ private Mono> getWithRespon .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -526,10 +421,8 @@ private Mono> getWithRespon * @return a dropped database's short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -537,9 +430,9 @@ public Mono getAsync( /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -550,22 +443,18 @@ public Mono getAsync( * @return a dropped database's short term retention policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, Context context) { - return getWithResponseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, context) - .block(); + return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + context).block(); } /** * Gets a dropped database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -575,21 +464,17 @@ public Response getWithResponse( * @return a dropped database's short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner get( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName) { - return getWithResponse( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, Context.NONE) - .getValue(); + public ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName) { + return getWithResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + Context.NONE).getValue(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -600,17 +485,12 @@ public ManagedBackupShortTermRetentionPolicyInner get( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -621,19 +501,15 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -642,28 +518,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -675,18 +540,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -697,19 +556,15 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -718,25 +573,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -747,32 +593,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -784,34 +622,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, context); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -822,24 +651,21 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters) .getSyncPoller(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -851,25 +677,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters, context) .getSyncPoller(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -880,23 +703,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -908,24 +726,18 @@ public Mono createOrUpdateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -936,22 +748,18 @@ private Mono createOrUpdateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) - .block(); + return createOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters).block(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -963,23 +771,18 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) - .block(); + public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters, context).block(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -990,17 +793,12 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1011,19 +809,15 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1032,28 +826,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1065,18 +848,12 @@ public Mono>> updateWithResponseAsync( * @return a short term retention policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1087,19 +864,15 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1108,25 +881,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - policyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1137,32 +901,23 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - this.client.getContext()); + public + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, parameters); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, this.client.getContext()); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1174,34 +929,25 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + private + PollerFlux, ManagedBackupShortTermRetentionPolicyInner> + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedBackupShortTermRetentionPolicyInner.class, - ManagedBackupShortTermRetentionPolicyInner.class, - context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, parameters, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), ManagedBackupShortTermRetentionPolicyInner.class, + ManagedBackupShortTermRetentionPolicyInner.class, context); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1212,24 +958,21 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { + return this + .beginUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters) .getSyncPoller(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1241,25 +984,22 @@ private Mono>> updateWithResponseAsync( * @return the {@link SyncPoller} for polling of a short term retention policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, ManagedBackupShortTermRetentionPolicyInner> - beginUpdate( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, + public + SyncPoller, ManagedBackupShortTermRetentionPolicyInner> + beginUpdate(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, + ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) + return this + .beginUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters, context) .getSyncPoller(); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1270,23 +1010,18 @@ private Mono>> updateWithResponseAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public Mono updateAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1298,24 +1033,18 @@ public Mono updateAsync( * @return a short term retention policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return beginUpdateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1326,11 +1055,8 @@ private Mono updateAsync( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, + public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters) { return updateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters) .block(); @@ -1338,9 +1064,9 @@ public ManagedBackupShortTermRetentionPolicyInner update( /** * Sets a database's short term retention policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. Should always be "default". @@ -1352,28 +1078,22 @@ public ManagedBackupShortTermRetentionPolicyInner update( * @return a short term retention policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedBackupShortTermRetentionPolicyInner update( - String resourceGroupName, - String managedInstanceName, - String restorableDroppedDatabaseId, - ManagedShortTermRetentionPolicyName policyName, - ManagedBackupShortTermRetentionPolicyInner parameters, - Context context) { - return updateAsync( - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, context) - .block(); + public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, + ManagedBackupShortTermRetentionPolicyInner parameters, Context context) { + return updateAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, parameters, + context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1382,39 +1102,29 @@ public ManagedBackupShortTermRetentionPolicyInner update( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.listByRestorableDroppedDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByRestorableDroppedDatabaseNext(nextLink, this.client.getEndpoint(), + accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1423,23 +1133,13 @@ public ManagedBackupShortTermRetentionPolicyInner update( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByRestorableDroppedDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByRestorableDroppedDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java index 5c5dadd86ac3c..580056d6f839f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java @@ -41,23 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedServerDnsAliasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedServerDnsAliasesClient. + */ public final class ManagedServerDnsAliasesClientImpl implements ManagedServerDnsAliasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedServerDnsAliasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedServerDnsAliasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedServerDnsAliasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ManagedServerDnsAliasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedServerDnsAliasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,117 +73,87 @@ public final class ManagedServerDnsAliasesClientImpl implements ManagedServerDns @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedServerDnsAliasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/dnsAliases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("$host") String endpoint, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedServerDnsAliasCreation parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> acquire( - @HostParam("$host") String endpoint, + Mono>> acquire(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedServerDnsAliasAcquisition parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -189,57 +164,37 @@ private Mono> listByManagedInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -250,38 +205,23 @@ private Mono> listByManagedInstanceSin .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByManagedInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -289,18 +229,17 @@ private Mono> listByManagedInstanceSin * @return a list of managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -309,8 +248,8 @@ public PagedFlux listByManagedInstanceAsync( * @return a list of managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedFlux<>( () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); @@ -318,46 +257,46 @@ private PagedFlux listByManagedInstanceAsync( /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases for a managed server as paginated response with {@link - * PagedIterable}. + * @return a list of managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of managed server DNS aliases for a managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases for a managed server as paginated response with {@link - * PagedIterable}. + * @return a list of managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -366,13 +305,11 @@ public PagedIterable listByManagedInstance( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -386,33 +323,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -422,13 +347,11 @@ public Mono> getWithResponseAsync( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -442,30 +365,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -474,17 +387,17 @@ private Mono> getWithResponseAsync( * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -494,16 +407,16 @@ public Mono getAsync( * @return a server DNS alias along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String dnsAliasName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, context).block(); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,28 +431,23 @@ public ManagedServerDnsAliasInner get(String resourceGroupName, String managedIn /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -553,10 +461,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -565,30 +471,20 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -596,17 +492,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -620,10 +510,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -632,27 +520,18 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -660,30 +539,23 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerDnsAliasInner.class, - ManagedServerDnsAliasInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedServerDnsAliasInner.class, ManagedServerDnsAliasInner.class, + this.client.getContext()); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -692,32 +564,23 @@ public PollerFlux, ManagedServerDnsAliasI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context) { + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasCreation parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerDnsAliasInner.class, - ManagedServerDnsAliasInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + dnsAliasName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedServerDnsAliasInner.class, ManagedServerDnsAliasInner.class, context); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -725,22 +588,20 @@ private PollerFlux, ManagedServerDnsAlias */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasCreation parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters) .getSyncPoller(); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -749,47 +610,40 @@ public SyncPoller, ManagedServerDnsAliasI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasCreation parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) .getSyncPoller(); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasCreation parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -797,12 +651,8 @@ public Mono createOrUpdateAsync( * @return a managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasCreation parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -810,34 +660,31 @@ private Mono createOrUpdateAsync( /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerDnsAliasInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters) { + public ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasCreation parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).block(); } /** * Creates a managed server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server dns alias creation request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -845,20 +692,16 @@ public ManagedServerDnsAliasInner createOrUpdate( * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerDnsAliasInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasCreation parameters, - Context context) { + public ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasCreation parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context).block(); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -867,13 +710,11 @@ public ManagedServerDnsAliasInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -887,31 +728,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -921,13 +751,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -941,28 +769,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -971,21 +790,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -995,21 +812,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1018,16 +834,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String dnsAliasName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String dnsAliasName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName).getSyncPoller(); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -1037,16 +853,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String dnsAliasName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName, context).getSyncPoller(); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1056,16 +872,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String dnsAliasName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -1075,18 +890,17 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String dnsAliasName, + Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, dnsAliasName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1100,9 +914,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes the managed server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -1117,28 +931,23 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> acquireWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters) { + public Mono>> acquireWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1152,10 +961,8 @@ public Mono>> acquireWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1164,30 +971,20 @@ public Mono>> acquireWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .acquire( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.acquire(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1195,17 +992,11 @@ public Mono>> acquireWithResponseAsync( * @return a managed server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> acquireWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context) { + private Mono>> acquireWithResponseAsync(String resourceGroupName, + String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1219,10 +1010,8 @@ private Mono>> acquireWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1231,27 +1020,18 @@ private Mono>> acquireWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .acquire( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.acquire(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1259,30 +1039,23 @@ private Mono>> acquireWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters) { - Mono>> mono = - acquireWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerDnsAliasInner.class, - ManagedServerDnsAliasInner.class, - this.client.getContext()); + Mono>> mono + = acquireWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedServerDnsAliasInner.class, ManagedServerDnsAliasInner.class, + this.client.getContext()); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1291,32 +1064,23 @@ public PollerFlux, ManagedServerDnsAliasI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context) { + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasAcquisition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - acquireWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerDnsAliasInner.class, - ManagedServerDnsAliasInner.class, - context); + Mono>> mono + = acquireWithResponseAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedServerDnsAliasInner.class, ManagedServerDnsAliasInner.class, context); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1324,21 +1088,19 @@ private PollerFlux, ManagedServerDnsAlias */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters) { - return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).getSyncPoller(); + return this.beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).getSyncPoller(); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1347,47 +1109,40 @@ public SyncPoller, ManagedServerDnsAliasI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context) { - return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) + String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasAcquisition parameters, Context context) { + return this.beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) .getSyncPoller(); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters) { - return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters) - .last() + public Mono acquireAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasAcquisition parameters) { + return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1395,47 +1150,39 @@ public Mono acquireAsync( * @return a managed server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono acquireAsync( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context) { - return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context) - .last() + private Mono acquireAsync(String resourceGroupName, String managedInstanceName, + String dnsAliasName, ManagedServerDnsAliasAcquisition parameters, Context context) { + return beginAcquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerDnsAliasInner acquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, + public ManagedServerDnsAliasInner acquire(String resourceGroupName, String managedInstanceName, String dnsAliasName, ManagedServerDnsAliasAcquisition parameters) { return acquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters).block(); } /** * Acquires managed server DNS alias from another managed server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. - * @param parameters A managed server DNS alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1443,25 +1190,20 @@ public ManagedServerDnsAliasInner acquire( * @return a managed server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerDnsAliasInner acquire( - String resourceGroupName, - String managedInstanceName, - String dnsAliasName, - ManagedServerDnsAliasAcquisition parameters, - Context context) { + public ManagedServerDnsAliasInner acquire(String resourceGroupName, String managedInstanceName, String dnsAliasName, + ManagedServerDnsAliasAcquisition parameters, Context context) { return acquireAsync(resourceGroupName, managedInstanceName, dnsAliasName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink) { @@ -1469,63 +1211,43 @@ private Mono> listByManagedInstanceNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java index ae40e96ed9868..ddc5fea9587ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java @@ -42,24 +42,24 @@ * An instance of this class provides access to all the operations defined in ManagedServerSecurityAlertPoliciesClient. */ public final class ManagedServerSecurityAlertPoliciesClientImpl implements ManagedServerSecurityAlertPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedServerSecurityAlertPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ManagedServerSecurityAlertPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedServerSecurityAlertPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ManagedServerSecurityAlertPoliciesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedServerSecurityAlertPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -70,85 +70,66 @@ public final class ManagedServerSecurityAlertPoliciesClientImpl implements Manag @Host("{$host}") @ServiceInterface(name = "SqlManagementClientM") public interface ManagedServerSecurityAlertPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/securityAlertPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedServerSecurityAlertPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the managed server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -159,57 +140,37 @@ private Mono> listByInstanc .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 managed server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,38 +181,23 @@ private Mono> listByInstanc .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,18 +205,17 @@ private Mono> listByInstanc * @return the managed server's threat detection policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,18 +224,17 @@ public PagedFlux listByInstanceAsync( * @return the managed server's threat detection policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -298,16 +242,16 @@ private PagedFlux listByInstanceAsync( * @return the managed server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Get the managed server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,34 +260,30 @@ public PagedIterable listByInstance( * @return the managed server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed server's threat detection policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server's threat detection policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,58 +294,40 @@ public Mono> getWithResponseAsyn .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed server's threat detection policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server's threat detection policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -416,35 +338,24 @@ private Mono> getWithResponseAsy .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,9 +364,7 @@ private Mono> getWithResponseAsy * @return a managed server's threat detection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String managedInstanceName, + public Mono getAsync(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -463,9 +372,9 @@ public Mono getAsync( /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -475,19 +384,16 @@ public Mono getAsync( * @return a managed server's threat detection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, context).block(); } /** * Get a managed server's threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -496,9 +402,7 @@ public Response getWithResponse( * @return a managed server's threat detection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerSecurityAlertPolicyInner get( - String resourceGroupName, - String managedInstanceName, + public ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponse(resourceGroupName, managedInstanceName, securityAlertPolicyName, Context.NONE) .getValue(); @@ -506,29 +410,25 @@ public ManagedServerSecurityAlertPolicyInner get( /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed server security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -539,15 +439,12 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -556,27 +453,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, securityAlertPolicyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -584,21 +471,16 @@ public 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 a managed server security alert policy along with {@link Response} on successful completion of {@link - * Mono}. + * @return a managed server security alert policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -609,15 +491,12 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -626,24 +505,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -654,29 +525,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerSecurityAlertPolicyInner.class, - ManagedServerSecurityAlertPolicyInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + securityAlertPolicyName, parameters); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ManagedServerSecurityAlertPolicyInner.class, + ManagedServerSecurityAlertPolicyInner.class, this.client.getContext()); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -688,31 +551,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, - Context context) { + ManagedServerSecurityAlertPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedServerSecurityAlertPolicyInner.class, - ManagedServerSecurityAlertPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + securityAlertPolicyName, parameters, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ManagedServerSecurityAlertPolicyInner.class, + ManagedServerSecurityAlertPolicyInner.class, context); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -723,20 +577,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters) .getSyncPoller(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -748,22 +601,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerSecurityAlertPolicyInner> - beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context) + ManagedServerSecurityAlertPolicyInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, + context) .getSyncPoller(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -773,10 +624,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a managed server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters) .last() @@ -785,9 +634,9 @@ public Mono createOrUpdateAsync( /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -798,23 +647,18 @@ public Mono createOrUpdateAsync( * @return a managed server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -824,9 +668,7 @@ private Mono createOrUpdateAsync( * @return a managed server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, + public ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters).block(); @@ -834,9 +676,9 @@ public ManagedServerSecurityAlertPolicyInner createOrUpdate( /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -847,11 +689,8 @@ public ManagedServerSecurityAlertPolicyInner createOrUpdate( * @return a managed server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ManagedServerSecurityAlertPolicyInner parameters, + public ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context) .block(); @@ -859,78 +698,57 @@ public ManagedServerSecurityAlertPolicyInner createOrUpdate( /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the managed Server's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the managed Server's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java index de931a9fb8e2a..1c37ef9d8e3b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,70 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientO") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Sql/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations as paginated response with {@link PagedFlux}. @@ -156,7 +137,7 @@ public PagedFlux listAsync() { /** * Lists all of the available SQL Rest 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. @@ -165,13 +146,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the available SQL Rest 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 result of the request to list SQL operations as paginated response with {@link PagedIterable}. @@ -183,7 +164,7 @@ public PagedIterable list() { /** * Lists all of the available SQL Rest 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. @@ -197,14 +178,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -212,37 +192,26 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -250,23 +219,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java index 5b5ba949a8dda..072c936b455a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java @@ -37,23 +37,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OutboundFirewallRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in OutboundFirewallRulesClient. + */ public final class OutboundFirewallRulesClientImpl implements OutboundFirewallRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OutboundFirewallRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of OutboundFirewallRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OutboundFirewallRulesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(OutboundFirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(OutboundFirewallRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -64,99 +69,69 @@ public final class OutboundFirewallRulesClientImpl implements OutboundFirewallRu @Host("{$host}") @ServiceInterface(name = "SqlManagementClientO") public interface OutboundFirewallRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/outboundFirewallRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 outbound firewall rules on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -166,57 +141,37 @@ private Mono> listByServerSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @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 outbound firewall rules on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -226,38 +181,23 @@ private Mono> listByServerSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -266,16 +206,15 @@ private Mono> listByServerSinglePageAsy */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,18 +223,17 @@ public PagedFlux listByServerAsync(String resourceGro * @return all outbound firewall rules on a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -309,9 +247,9 @@ public PagedIterable listByServer(String resourceGrou /** * Gets all outbound firewall rules on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,16 +258,16 @@ public PagedIterable listByServer(String resourceGrou * @return all outbound firewall rules on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,13 +276,11 @@ public PagedIterable listByServer( * @return an outbound firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -358,33 +294,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -394,13 +318,11 @@ public Mono> getWithResponseAsync( * @return an outbound firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -414,30 +336,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -446,17 +358,17 @@ private Mono> getWithResponseAsync( * @return an outbound firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { + public Mono getAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { return getWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -466,16 +378,16 @@ public Mono getAsync( * @return an outbound firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { return getWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn, context).block(); } /** * Gets an outbound firewall rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -490,25 +402,23 @@ public OutboundFirewallRuleInner get(String resourceGroupName, String serverName /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure SQL DB Server Outbound Firewall Rule along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -522,33 +432,21 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -556,16 +454,14 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure SQL DB Server Outbound Firewall Rule along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String outboundRuleFqdn, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -579,30 +475,20 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -611,25 +497,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, OutboundFirewallRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OutboundFirewallRuleInner.class, - OutboundFirewallRuleInner.class, - this.client.getContext()); + public PollerFlux, OutboundFirewallRuleInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String outboundRuleFqdn) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OutboundFirewallRuleInner.class, OutboundFirewallRuleInner.class, + this.client.getContext()); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -642,23 +523,17 @@ public PollerFlux, OutboundFirewallRuleInn private PollerFlux, OutboundFirewallRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OutboundFirewallRuleInner.class, - OutboundFirewallRuleInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OutboundFirewallRuleInner.class, OutboundFirewallRuleInner.class, context); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -667,16 +542,16 @@ private PollerFlux, OutboundFirewallRuleIn * @return the {@link SyncPoller} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn).getSyncPoller(); + public SyncPoller, OutboundFirewallRuleInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String outboundRuleFqdn) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn).getSyncPoller(); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -686,16 +561,16 @@ public SyncPoller, OutboundFirewallRuleInn * @return the {@link SyncPoller} for polling of an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn, context).getSyncPoller(); + public SyncPoller, OutboundFirewallRuleInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn, context).getSyncPoller(); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -704,18 +579,17 @@ public SyncPoller, OutboundFirewallRuleInn * @return an Azure SQL DB Server Outbound Firewall Rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -725,18 +599,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL DB Server Outbound Firewall Rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -745,16 +618,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundFirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn) { + public OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, + String outboundRuleFqdn) { return createOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn).block(); } /** * Create a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -764,16 +637,16 @@ public OutboundFirewallRuleInner createOrUpdate( * @return an Azure SQL DB Server Outbound Firewall Rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundFirewallRuleInner createOrUpdate( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + public OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn, context).block(); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -782,13 +655,11 @@ public OutboundFirewallRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -802,31 +673,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -836,13 +696,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -856,28 +714,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter outboundRuleFqdn is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - outboundRuleFqdn, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -886,21 +735,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -910,21 +757,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, outboundRuleFqdn, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -933,16 +779,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String outboundRuleFqdn) { - return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String outboundRuleFqdn) { + return this.beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn).getSyncPoller(); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -952,16 +798,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String outboundRuleFqdn, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn, context).getSyncPoller(); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -971,16 +817,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String outboundRuleFqdn) { - return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn) - .last() + return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -990,18 +835,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String outboundRuleFqdn, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String outboundRuleFqdn, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,9 +859,9 @@ public void delete(String resourceGroupName, String serverName, String outboundR /** * Deletes a outbound firewall rule with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -1032,9 +876,8 @@ public void delete(String resourceGroupName, String serverName, String outboundR /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1046,31 +889,21 @@ private Mono> listByServerNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1078,29 +911,19 @@ private Mono> listByServerNextSinglePag * @return a list of outbound rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java index ef9305b2771d3..6ecfbbaff2d22 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateEndpointConnectionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,100 +70,73 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi @Host("{$host}") @ServiceInterface(name = "SqlManagementClientP") public interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,57 +146,37 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @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 private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -229,38 +186,23 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -269,16 +211,15 @@ private Mono> listByServerSinglePa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,18 +228,17 @@ public PagedFlux listByServerAsync(String resour * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,9 +252,9 @@ public PagedIterable listByServer(String resourc /** * Gets all private endpoint connections on a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,16 +263,16 @@ public PagedIterable listByServer(String resourc * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -341,13 +281,11 @@ public PagedIterable listByServer( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,39 +295,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -399,13 +324,11 @@ public Mono> getWithResponseAsync( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,36 +338,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, privateEndpointConnectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,17 +364,17 @@ private Mono> getWithResponseAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { + public Mono getAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -473,16 +384,16 @@ public Mono getAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).block(); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,35 +402,30 @@ public Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { + public PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { return getWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, Context.NONE).getValue(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -529,16 +435,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -547,30 +449,20 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -578,17 +470,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -598,16 +485,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -616,27 +499,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -644,31 +519,23 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -677,34 +544,24 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + privateEndpointConnectionName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -712,22 +569,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, + String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters) .getSyncPoller(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -736,48 +591,41 @@ public SyncPoller, PrivateEndpointCon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) .getSyncPoller(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -785,48 +633,39 @@ public Mono createOrUpdateAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).block(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. - * @param parameters A private endpoint connection. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -834,21 +673,17 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String serverName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) .block(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -857,13 +692,11 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -873,37 +706,24 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -913,13 +733,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -929,34 +747,23 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - privateEndpointConnectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, privateEndpointConnectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -965,21 +772,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -989,21 +794,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1012,16 +816,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1031,16 +835,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context) + .getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1050,16 +855,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1069,18 +873,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1094,9 +897,9 @@ public void delete(String resourceGroupName, String serverName, String privateEn /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param context The context to associate with this operation. @@ -1105,21 +908,20 @@ public void delete(String resourceGroupName, String serverName, String privateEn * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, + Context context) { deleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1127,62 +929,42 @@ private Mono> listByServerNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java index 19e7e5ccb9eef..c5ab0d95f4868 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.sql.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateLinkResourcesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,68 +62,51 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource @Host("{$host}") @ServiceInterface(name = "SqlManagementClientP") public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/privateLinkResources/{groupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("groupName") String groupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("groupName") String groupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -128,57 +116,37 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @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 private link resources for SQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -188,38 +156,23 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -228,16 +181,15 @@ private Mono> listByServerSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,18 +198,17 @@ public PagedFlux listByServerAsync(String resourceGrou * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -271,9 +222,9 @@ public PagedIterable listByServer(String resourceGroup /** * Gets the private link resources for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,32 +233,30 @@ public PagedIterable listByServer(String resourceGroup * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link 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 a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String groupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -320,50 +269,36 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - groupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for SQL server along with {@link Response} on successful completion of {@link - * Mono}. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String groupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -376,30 +311,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - groupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,9 +340,9 @@ public Mono getAsync(String resourceGroupName, String /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @param context The context to associate with this operation. @@ -427,16 +352,16 @@ public Mono getAsync(String resourceGroupName, String * @return a private link resource for SQL server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String groupName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String groupName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, groupName, context).block(); } /** * Gets a private link resource for SQL server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,14 +376,13 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName, /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -466,62 +390,42 @@ private Mono> listByServerNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java index 173258cdc7ff0..09c7a022e0e95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java @@ -25,24 +25,28 @@ import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecommendedSensitivityLabelsClient. */ +/** + * An instance of this class provides access to all the operations defined in RecommendedSensitivityLabelsClient. + */ public final class RecommendedSensitivityLabelsClientImpl implements RecommendedSensitivityLabelsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RecommendedSensitivityLabelsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RecommendedSensitivityLabelsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RecommendedSensitivityLabelsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - RecommendedSensitivityLabelsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RecommendedSensitivityLabelsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -53,47 +57,36 @@ public final class RecommendedSensitivityLabelsClientImpl implements Recommended @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RecommendedSensitivityLabelsService { - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, - Context context); + @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, Context context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, RecommendedSensitivityLabelUpdateList parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -106,10 +99,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -117,29 +108,19 @@ public Mono> updateWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -147,17 +128,11 @@ public Mono> updateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, RecommendedSensitivityLabelUpdateList parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -170,10 +145,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -181,36 +154,25 @@ private Mono> updateWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, RecommendedSensitivityLabelUpdateList parameters) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(ignored -> Mono.empty()); @@ -218,12 +180,12 @@ public Mono updateAsync( /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -231,32 +193,25 @@ public Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - RecommendedSensitivityLabelUpdateList parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + RecommendedSensitivityLabelUpdateList parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Update recommended sensitivity labels states of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of recommended sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( - String resourceGroupName, - String serverName, - String databaseName, + public void update(String resourceGroupName, String serverName, String databaseName, RecommendedSensitivityLabelUpdateList parameters) { updateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java index 9a53faa46ac62..35f412fd0ed3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.sql.models.RecoverableDatabaseListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecoverableDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoverableDatabasesClient. + */ public final class RecoverableDatabasesClientImpl implements RecoverableDatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RecoverableDatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RecoverableDatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RecoverableDatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(RecoverableDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RecoverableDatabasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,68 +62,51 @@ public final class RecoverableDatabasesClientImpl implements RecoverableDatabase @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RecoverableDatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/recoverableDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/recoverableDatabases/{databaseName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -128,57 +116,37 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -188,38 +156,23 @@ private Mono> listByServerSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -228,16 +181,15 @@ private Mono> listByServerSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,18 +198,17 @@ public PagedFlux listByServerAsync(String resourceGrou * @return a list of recoverable databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -271,9 +222,9 @@ public PagedIterable listByServer(String resourceGroup /** * Gets a list of recoverable databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,16 +233,16 @@ public PagedIterable listByServer(String resourceGroup * @return a list of recoverable databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,13 +251,11 @@ public PagedIterable listByServer( * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -319,33 +268,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -355,13 +292,11 @@ public Mono> getWithResponseAsync( * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -374,30 +309,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,9 +338,9 @@ public Mono getAsync(String resourceGroupName, String /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -425,16 +350,16 @@ public Mono getAsync(String resourceGroupName, String * @return a recoverable database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** * Gets a recoverable database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,14 +374,13 @@ public RecoverableDatabaseInner get(String resourceGroupName, String serverName, /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -464,62 +388,42 @@ private Mono> listByServerNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java index 5dee6d9f09ad7..8c0ce2f399fd3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java @@ -30,24 +30,28 @@ import com.azure.resourcemanager.sql.models.RecoverableManagedDatabaseListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecoverableManagedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoverableManagedDatabasesClient. + */ public final class RecoverableManagedDatabasesClientImpl implements RecoverableManagedDatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RecoverableManagedDatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RecoverableManagedDatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RecoverableManagedDatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - RecoverableManagedDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RecoverableManagedDatabasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,68 +62,54 @@ public final class RecoverableManagedDatabasesClientImpl implements RecoverableM @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RecoverableManagedDatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/recoverableDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("recoverableDatabaseName") String recoverableDatabaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -130,57 +120,37 @@ private Mono> listByInstanceSingl .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -191,38 +161,23 @@ private Mono> listByInstanceSingl .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -230,18 +185,17 @@ private Mono> listByInstanceSingl * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,18 +204,17 @@ public PagedFlux listByInstanceAsync( * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -269,16 +222,16 @@ private PagedFlux listByInstanceAsync( * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of recoverable managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,16 +240,16 @@ public PagedIterable listByInstance( * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,13 +258,11 @@ public PagedIterable listByInstance( * @return a recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -322,38 +273,25 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (recoverableDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter recoverableDatabaseName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter recoverableDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - recoverableDatabaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + recoverableDatabaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @param context The context to associate with this operation. @@ -363,13 +301,11 @@ public Mono> getWithResponseAsync( * @return a recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -380,35 +316,24 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (recoverableDatabaseName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter recoverableDatabaseName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter recoverableDatabaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - recoverableDatabaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, recoverableDatabaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -417,17 +342,17 @@ private Mono> getWithResponseAsync( * @return a recoverable managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @param context The context to associate with this operation. @@ -437,16 +362,16 @@ public Mono getAsync( * @return a recoverable managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName, context).block(); } /** * Gets a recoverable managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -455,22 +380,21 @@ public Response getWithResponse( * @return a recoverable managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecoverableManagedDatabaseInner get( - String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) { + public RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName) { return getWithResponse(resourceGroupName, managedInstanceName, recoverableDatabaseName, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -478,62 +402,42 @@ private Mono> listByInstanceNextS return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java index 464db7c90227d..76d22ede061df 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java @@ -37,22 +37,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ReplicationLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in ReplicationLinksClient. + */ public final class ReplicationLinksClientImpl implements ReplicationLinksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ReplicationLinksService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ReplicationLinksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ReplicationLinksClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ReplicationLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ReplicationLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -63,146 +69,100 @@ public final class ReplicationLinksClientImpl implements ReplicationLinksClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface ReplicationLinksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/replicationLinks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") - @ExpectedResponses({200}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("linkId") String linkId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") - @ExpectedResponses({200, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("linkId") String linkId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("linkId") String linkId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss") - @ExpectedResponses({200, 202}) + Mono>> failover(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverAllowDataLoss( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("linkId") String linkId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/replicationLinks") - @ExpectedResponses({200}) + Mono>> failoverAllowDataLoss(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -215,42 +175,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -258,16 +199,14 @@ private Mono> listByDatabaseSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -280,39 +219,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,18 +244,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -342,8 +264,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -351,9 +273,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,16 +284,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of replication links on database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -381,16 +303,16 @@ public PagedIterable listByDatabase( * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -400,13 +322,11 @@ public PagedIterable listByDatabase( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -422,34 +342,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -460,13 +367,11 @@ public Mono> getWithResponseAsync( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -482,31 +387,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -516,17 +410,17 @@ private Mono> getWithResponseAsync( * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String linkId) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -537,16 +431,16 @@ public Mono getAsync( * @return a replication link along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } /** * Gets a replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -562,9 +456,9 @@ public ReplicationLinkInner get(String resourceGroupName, String serverName, Str /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -574,13 +468,11 @@ public ReplicationLinkInner get(String resourceGroupName, String serverName, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -596,32 +488,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -632,13 +512,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -654,29 +532,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -686,21 +554,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -711,21 +577,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -735,16 +600,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String linkId) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId).getSyncPoller(); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -755,16 +620,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId, context).getSyncPoller(); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -775,16 +640,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId) - .last() + return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -795,18 +659,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String linkId, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, linkId, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -821,9 +684,9 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes the replication link. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The linkId parameter. @@ -833,16 +696,16 @@ public void delete(String resourceGroupName, String serverName, String databaseN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + public void delete(String resourceGroupName, String serverName, String databaseName, String linkId, + Context context) { deleteAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -852,13 +715,11 @@ public void delete( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -874,34 +735,21 @@ public Mono>> failoverWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -912,13 +760,11 @@ public Mono>> failoverWithResponseAsync( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -934,31 +780,20 @@ private Mono>> failoverWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .failover( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -968,25 +803,19 @@ private Mono>> failoverWithResponseAsync( * @return the {@link PollerFlux} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ReplicationLinkInner> beginFailoverAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ReplicationLinkInner.class, - ReplicationLinkInner.class, - this.client.getContext()); + public PollerFlux, ReplicationLinkInner> + beginFailoverAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationLinkInner.class, ReplicationLinkInner.class, this.client.getContext()); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1000,19 +829,17 @@ public PollerFlux, ReplicationLinkInner> beginF private PollerFlux, ReplicationLinkInner> beginFailoverAsync( String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ReplicationLinkInner.class, ReplicationLinkInner.class, context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationLinkInner.class, ReplicationLinkInner.class, context); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1022,16 +849,16 @@ private PollerFlux, ReplicationLinkInner> begin * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginFailover( - String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId).getSyncPoller(); + public SyncPoller, ReplicationLinkInner> beginFailover(String resourceGroupName, + String serverName, String databaseName, String linkId) { + return this.beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId).getSyncPoller(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1042,16 +869,16 @@ public SyncPoller, ReplicationLinkInner> beginF * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginFailover( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId, context).getSyncPoller(); + public SyncPoller, ReplicationLinkInner> beginFailover(String resourceGroupName, + String serverName, String databaseName, String linkId, Context context) { + return this.beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId, context).getSyncPoller(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1061,18 +888,17 @@ public SyncPoller, ReplicationLinkInner> beginF * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId) - .last() + public Mono failoverAsync(String resourceGroupName, String serverName, String databaseName, + String linkId) { + return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1083,18 +909,17 @@ public Mono failoverAsync( * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId, context) - .last() + private Mono failoverAsync(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context) { + return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1104,16 +929,16 @@ private Mono failoverAsync( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner failover( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public ReplicationLinkInner failover(String resourceGroupName, String serverName, String databaseName, + String linkId) { return failoverAsync(resourceGroupName, serverName, databaseName, linkId).block(); } /** * Fails over from the current primary server to this server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1124,16 +949,16 @@ public ReplicationLinkInner failover( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner failover( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + public ReplicationLinkInner failover(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context) { return failoverAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1143,13 +968,11 @@ public ReplicationLinkInner failover( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public Mono>> failoverAllowDataLossWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String linkId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1165,34 +988,22 @@ public Mono>> failoverAllowDataLossWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .failoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.failoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1203,13 +1014,11 @@ public Mono>> failoverAllowDataLossWithResponseAsync( * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverAllowDataLossWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + private Mono>> failoverAllowDataLossWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String linkId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1225,31 +1034,20 @@ private Mono>> failoverAllowDataLossWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter linkId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .failoverAllowDataLoss( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - linkId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.failoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1261,23 +1059,17 @@ private Mono>> failoverAllowDataLossWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ReplicationLinkInner> beginFailoverAllowDataLossAsync( String resourceGroupName, String serverName, String databaseName, String linkId) { - Mono>> mono = - failoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ReplicationLinkInner.class, - ReplicationLinkInner.class, - this.client.getContext()); + Mono>> mono + = failoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, databaseName, linkId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationLinkInner.class, ReplicationLinkInner.class, this.client.getContext()); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1291,19 +1083,17 @@ public PollerFlux, ReplicationLinkInner> beginF private PollerFlux, ReplicationLinkInner> beginFailoverAllowDataLossAsync( String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - failoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ReplicationLinkInner.class, ReplicationLinkInner.class, context); + Mono>> mono + = failoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReplicationLinkInner.class, ReplicationLinkInner.class, context); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1313,16 +1103,17 @@ private PollerFlux, ReplicationLinkInner> begin * @return the {@link SyncPoller} for polling of a replication link. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginFailoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId).getSyncPoller(); + public SyncPoller, ReplicationLinkInner> + beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, String linkId) { + return this.beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId) + .getSyncPoller(); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1335,15 +1126,15 @@ public SyncPoller, ReplicationLinkInner> beginF @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ReplicationLinkInner> beginFailoverAllowDataLoss( String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId, context) + return this.beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId, context) .getSyncPoller(); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1353,18 +1144,17 @@ public SyncPoller, ReplicationLinkInner> beginF * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAllowDataLossAsync( - String resourceGroupName, String serverName, String databaseName, String linkId) { - return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId) - .last() + public Mono failoverAllowDataLossAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { + return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1375,18 +1165,17 @@ public Mono failoverAllowDataLossAsync( * @return a replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAllowDataLossAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { - return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId, context) - .last() + private Mono failoverAllowDataLossAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { + return beginFailoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1396,16 +1185,16 @@ private Mono failoverAllowDataLossAsync( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner failoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId) { + public ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, + String linkId) { return failoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId).block(); } /** * Fails over from the current primary server to this server allowing data loss. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1416,16 +1205,16 @@ public ReplicationLinkInner failoverAllowDataLoss( * @return a replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner failoverAllowDataLoss( - String resourceGroupName, String serverName, String databaseName, String linkId, Context context) { + public ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context) { return failoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1433,13 +1222,11 @@ public ReplicationLinkInner failoverAllowDataLoss( * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1449,41 +1236,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1492,13 +1261,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1508,38 +1275,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1548,16 +1300,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1566,18 +1317,17 @@ public PagedFlux listByServerAsync(String resourceGroupNam * @return a list of replication links as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1591,9 +1341,9 @@ public PagedIterable listByServer(String resourceGroupName /** * Gets a list of replication links. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1602,16 +1352,15 @@ public PagedIterable listByServer(String resourceGroupName * @return a list of replication links as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1623,31 +1372,21 @@ private Mono> listByDatabaseNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1655,37 +1394,26 @@ private Mono> listByDatabaseNextSinglePageAs * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1697,31 +1425,21 @@ private Mono> listByServerNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1729,29 +1447,19 @@ private Mono> listByServerNextSinglePageAsyn * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java index 7003fdc5ac2db..eb1d528168e57 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java @@ -30,24 +30,28 @@ import com.azure.resourcemanager.sql.models.RestorableDroppedDatabaseListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RestorableDroppedDatabasesClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorableDroppedDatabasesClient. + */ public final class RestorableDroppedDatabasesClientImpl implements RestorableDroppedDatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RestorableDroppedDatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RestorableDroppedDatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RestorableDroppedDatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - RestorableDroppedDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RestorableDroppedDatabasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,68 +62,52 @@ public final class RestorableDroppedDatabasesClientImpl implements RestorableDro @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RestorableDroppedDatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/restorableDroppedDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -129,57 +117,37 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -189,38 +157,23 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,16 +182,15 @@ private Mono> listByServerSinglePa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -247,18 +199,17 @@ public PagedFlux listByServerAsync(String resour * @return a list of restorable dropped databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -272,9 +223,9 @@ public PagedIterable listByServer(String resourc /** * Gets a list of restorable dropped databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,16 +234,16 @@ public PagedIterable listByServer(String resourc * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,13 +252,11 @@ public PagedIterable listByServer( * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String restorableDroppedDatabaseId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -317,39 +266,24 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -359,13 +293,11 @@ public Mono> getWithResponseAsync( * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String restorableDroppedDatabaseId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -375,36 +307,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, restorableDroppedDatabaseId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -413,17 +333,17 @@ private Mono> getWithResponseAsync( * @return a restorable dropped database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId) { + public Mono getAsync(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId) { return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -433,16 +353,16 @@ public Mono getAsync( * @return a restorable dropped database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId, Context context) { return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId, context).block(); } /** * Gets a restorable dropped database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,21 +371,20 @@ public Response getWithResponse( * @return a restorable dropped database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorableDroppedDatabaseInner get( - String resourceGroupName, String serverName, String restorableDroppedDatabaseId) { + public RestorableDroppedDatabaseInner get(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId) { return getWithResponse(resourceGroupName, serverName, restorableDroppedDatabaseId, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -473,62 +392,42 @@ private Mono> listByServerNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java index 56fed8ce4f3af..ccca73f706eda 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java @@ -34,24 +34,24 @@ * An instance of this class provides access to all the operations defined in RestorableDroppedManagedDatabasesClient. */ public final class RestorableDroppedManagedDatabasesClientImpl implements RestorableDroppedManagedDatabasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RestorableDroppedManagedDatabasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RestorableDroppedManagedDatabasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RestorableDroppedManagedDatabasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - RestorableDroppedManagedDatabasesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(RestorableDroppedManagedDatabasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,68 +62,54 @@ public final class RestorableDroppedManagedDatabasesClientImpl implements Restor @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RestorableDroppedManagedDatabasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -134,57 +120,37 @@ private Mono> listByInstanc .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -195,38 +161,23 @@ private Mono> listByInstanc .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -234,18 +185,17 @@ private Mono> listByInstanc * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,18 +204,17 @@ public PagedFlux listByInstanceAsync( * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -273,16 +222,16 @@ private PagedFlux listByInstanceAsync( * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of restorable dropped managed databases. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,32 +240,30 @@ public PagedIterable listByInstance( * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restorable dropped managed database along with {@link Response} on successful completion of {@link - * Mono}. + * @return a restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -327,56 +274,41 @@ public Mono> getWithResponseAsyn .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restorable dropped managed database along with {@link Response} on successful completion of {@link - * Mono}. + * @return a restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -387,36 +319,24 @@ private Mono> getWithResponseAsy .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (restorableDroppedDatabaseId == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter restorableDroppedDatabaseId is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -425,17 +345,17 @@ private Mono> getWithResponseAsy * @return a restorable dropped managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param context The context to associate with this operation. @@ -445,17 +365,17 @@ public Mono getAsync( * @return a restorable dropped managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, context) .block(); } /** * Gets a restorable dropped managed database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,86 +384,65 @@ public Response getWithResponse( * @return a restorable dropped managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorableDroppedManagedDatabaseInner get( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + public RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { return getWithResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, Context.NONE) .getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java index b3c65e13c4e2b..f3e28703615f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java @@ -39,22 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RestorePointsClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorePointsClient. + */ public final class RestorePointsClientImpl implements RestorePointsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RestorePointsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of RestorePointsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RestorePointsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(RestorePointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(RestorePointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,104 +71,74 @@ public final class RestorePointsClientImpl implements RestorePointsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientR") public interface RestorePointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/restorePoints") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/restorePoints") - @ExpectedResponses({200, 201, 202}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CreateDatabaseRestorePointDefinition parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("restorePointName") String restorePointName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("restorePointName") String restorePointName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database restore points along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database restore points along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,59 +151,38 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of database restore points along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of database restore points along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -240,39 +195,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,18 +220,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of database restore points as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -302,8 +240,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of database restore points as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -311,9 +249,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,16 +260,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of database restore points as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of database restore points. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -341,16 +279,16 @@ public PagedIterable listByDatabase( * @return a list of database restore points as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -360,16 +298,11 @@ public PagedIterable listByDatabase( * @return database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters) { + public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,10 +315,8 @@ public Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -395,26 +326,16 @@ public Mono>> createWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -425,17 +346,11 @@ public Mono>> createWithResponseAsync( * @return database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -448,10 +363,8 @@ private Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -460,24 +373,15 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -487,28 +391,19 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RestorePointInner> beginCreateAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - RestorePointInner.class, - RestorePointInner.class, - this.client.getContext()); + public PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RestorePointInner.class, RestorePointInner.class, this.client.getContext()); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -519,26 +414,20 @@ public PollerFlux, RestorePointInner> beginCreateA * @return the {@link PollerFlux} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RestorePointInner> beginCreateAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context) { + private PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), RestorePointInner.class, RestorePointInner.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RestorePointInner.class, RestorePointInner.class, context); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -548,19 +437,16 @@ private PollerFlux, RestorePointInner> beginCreate * @return the {@link SyncPoller} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RestorePointInner> beginCreate( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + public SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { + return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -571,20 +457,16 @@ public SyncPoller, RestorePointInner> beginCreate( * @return the {@link SyncPoller} for polling of database restore points. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RestorePointInner> beginCreate( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + public SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { + return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -594,21 +476,17 @@ public SyncPoller, RestorePointInner> beginCreate( * @return database restore points on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String resourceGroupName, - String serverName, - String databaseName, + public Mono createAsync(String resourceGroupName, String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters) - .last() + return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -619,22 +497,17 @@ public Mono createAsync( * @return database restore points on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context) - .last() + private Mono createAsync(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context) { + return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -644,19 +517,16 @@ private Mono createAsync( * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner create( - String resourceGroupName, - String serverName, - String databaseName, + public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { return createAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** * Creates a restore point for a data warehouse. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The definition for creating the restore point of this database. @@ -667,20 +537,16 @@ public RestorePointInner create( * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner create( - String resourceGroupName, - String serverName, - String databaseName, - CreateDatabaseRestorePointDefinition parameters, - Context context) { + public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context) { return createAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -690,13 +556,11 @@ public RestorePointInner create( * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -713,34 +577,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter restorePointName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - restorePointName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + restorePointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -751,13 +602,11 @@ public Mono> getWithResponseAsync( * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -774,31 +623,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter restorePointName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - restorePointName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, restorePointName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -808,17 +646,17 @@ private Mono> getWithResponseAsync( * @return a restore point on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -829,16 +667,16 @@ public Mono getAsync( * @return a restore point along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); } /** * Gets a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -848,16 +686,16 @@ public Response getWithResponse( * @return a restore point. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner get( - String resourceGroupName, String serverName, String databaseName, String restorePointName) { + public RestorePointInner get(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { return getWithResponse(resourceGroupName, serverName, databaseName, restorePointName, Context.NONE).getValue(); } /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -867,13 +705,11 @@ public RestorePointInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -890,32 +726,20 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter restorePointName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - restorePointName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, restorePointName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -926,13 +750,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -949,29 +771,19 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter restorePointName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - restorePointName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, restorePointName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -981,17 +793,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String restorePointName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) .flatMap(ignored -> Mono.empty()); } /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -1002,16 +814,16 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String serverName, String databaseName, String restorePointName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); } /** * Deletes a restore point. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param restorePointName The name of the restore point. @@ -1026,14 +838,13 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -1041,37 +852,27 @@ private Mono> listByDatabaseNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, Context context) { @@ -1079,23 +880,13 @@ private Mono> listByDatabaseNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java index ba680bd56dfdf..07716e33833d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java @@ -37,22 +37,28 @@ import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SensitivityLabelsClient. */ +/** + * An instance of this class provides access to all the operations defined in SensitivityLabelsClient. + */ public final class SensitivityLabelsClientImpl implements SensitivityLabelsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SensitivityLabelsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SensitivityLabelsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SensitivityLabelsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SensitivityLabelsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SensitivityLabelsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -63,216 +69,139 @@ public final class SensitivityLabelsClientImpl implements SensitivityLabelsClien @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SensitivityLabelsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCurrentByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("$skipToken") String skipToken, - @QueryParam("$count") Boolean count, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({200}) + Mono> listCurrentByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, + @QueryParam("$count") Boolean count, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SensitivityLabelUpdateList parameters, - Context context); + @BodyParam("application/json") SensitivityLabelUpdateList parameters, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendedByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("$skipToken") String skipToken, + Mono> listRecommendedByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, @QueryParam("includeDisabledRecommendations") Boolean includeDisabledRecommendations, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") SensitivityLabelSource sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SensitivityLabelInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SensitivityLabelInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}/disable") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disableRecommendation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + Mono> disableRecommendation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}/enable") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> enableRecommendation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, - @PathParam("columnName") String columnName, + Mono> enableRecommendation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") String sensitivityLabelSource, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/sensitivityLabels") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCurrentByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRecommendedByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -282,21 +211,14 @@ Mono> listByDatabaseNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter) { + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String skipToken, Boolean count, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -309,45 +231,24 @@ private Mono> listCurrentByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listCurrentByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - skipToken, - count, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, skipToken, count, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -358,22 +259,14 @@ private Mono> listCurrentByDatabaseSinglePa * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter, - Context context) { + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String skipToken, Boolean count, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -386,42 +279,23 @@ private Mono> listCurrentByDatabaseSinglePa return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listCurrentByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - skipToken, - count, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, skipToken, + count, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -433,25 +307,17 @@ private Mono> listCurrentByDatabaseSinglePa * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter) { - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, skipToken, count, filter), - nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean count, String filter) { + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -460,23 +326,20 @@ public PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final String skipToken = null; final Boolean count = null; final String filter = null; - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, skipToken, count, filter), - nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -489,26 +352,18 @@ public PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCurrentByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter, - Context context) { - return new PagedFlux<>( - () -> - listCurrentByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, skipToken, count, filter, context), + private PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean count, String filter, Context context) { + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + skipToken, count, filter, context), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -517,8 +372,8 @@ private PagedFlux listCurrentByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listCurrentByDatabase(String resourceGroupName, String serverName, + String databaseName) { final String skipToken = null; final Boolean count = null; final String filter = null; @@ -528,9 +383,9 @@ public PagedIterable listCurrentByDatabase( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -543,39 +398,31 @@ public PagedIterable listCurrentByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean count, - String filter, - Context context) { + public PagedIterable listCurrentByDatabase(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean count, String filter, Context context) { return new PagedIterable<>( listCurrentByDatabaseAsync(resourceGroupName, serverName, databaseName, skipToken, count, filter, context)); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, SensitivityLabelUpdateList parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -588,10 +435,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -599,29 +444,19 @@ public Mono> updateWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -629,17 +464,11 @@ public Mono> updateWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, SensitivityLabelUpdateList parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -652,10 +481,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -663,46 +490,38 @@ private Mono> updateWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) .flatMap(ignored -> Mono.empty()); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -710,38 +529,34 @@ public Mono updateAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - SensitivityLabelUpdateList parameters, - Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Update sensitivity labels of a given database using an operations batch. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters A list of sensitivity label update operations. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( - String resourceGroupName, String serverName, String databaseName, SensitivityLabelUpdateList parameters) { + public void update(String resourceGroupName, String serverName, String databaseName, + SensitivityLabelUpdateList parameters) { updateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -751,21 +566,15 @@ public void update( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter) { + String resourceGroupName, String serverName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -778,45 +587,24 @@ private Mono> listRecommendedByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listRecommendedByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, skipToken, includeDisabledRecommendations, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -827,22 +615,15 @@ private Mono> listRecommendedByDatabaseSing * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { + String resourceGroupName, String serverName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -855,42 +636,24 @@ private Mono> listRecommendedByDatabaseSing return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listRecommendedByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + skipToken, includeDisabledRecommendations, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -902,25 +665,19 @@ private Mono> listRecommendedByDatabaseSing * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter) { + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter) { return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, skipToken, includeDisabledRecommendations, filter), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, skipToken, + includeDisabledRecommendations, filter), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -929,23 +686,22 @@ public PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final String skipToken = null; final Boolean includeDisabledRecommendations = null; final String filter = null; return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, serverName, databaseName, skipToken, includeDisabledRecommendations, filter), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, skipToken, + includeDisabledRecommendations, filter), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -958,32 +714,19 @@ public PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRecommendedByDatabaseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { + private PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context) { return new PagedFlux<>( - () -> - listRecommendedByDatabaseSinglePageAsync( - resourceGroupName, - serverName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - context), + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, skipToken, + includeDisabledRecommendations, filter, context), nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -992,21 +735,20 @@ private PagedFlux listRecommendedByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listRecommendedByDatabase(String resourceGroupName, String serverName, + String databaseName) { final String skipToken = null; final Boolean includeDisabledRecommendations = null; final String filter = null; - return new PagedIterable<>( - listRecommendedByDatabaseAsync( - resourceGroupName, serverName, databaseName, skipToken, includeDisabledRecommendations, filter)); + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, serverName, databaseName, + skipToken, includeDisabledRecommendations, filter)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -1019,30 +761,17 @@ public PagedIterable listRecommendedByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase( - String resourceGroupName, - String serverName, - String databaseName, - String skipToken, - Boolean includeDisabledRecommendations, - String filter, - Context context) { - return new PagedIterable<>( - listRecommendedByDatabaseAsync( - resourceGroupName, - serverName, - databaseName, - skipToken, - includeDisabledRecommendations, - filter, - context)); + public PagedIterable listRecommendedByDatabase(String resourceGroupName, String serverName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context) { + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, serverName, databaseName, + skipToken, includeDisabledRecommendations, filter, context)); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1052,23 +781,16 @@ public PagedIterable listRecommendedByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1090,42 +812,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (sensitivityLabelSource == null) { - return Mono - .error( - new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1136,24 +842,16 @@ public Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of {@link - * Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelSource sensitivityLabelSource, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1175,39 +873,25 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (sensitivityLabelSource == null) { - return Mono - .error( - new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1220,24 +904,17 @@ private Mono> getWithResponseAsync( * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + sensitivityLabelSource).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1251,32 +928,18 @@ public Mono getAsync( * @return the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource, - Context context) { - return getWithResponseAsync( - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelSource sensitivityLabelSource, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + sensitivityLabelSource, context).block(); } /** * Gets the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1289,31 +952,17 @@ public Response getWithResponse( * @return the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner get( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelSource sensitivityLabelSource) { - return getWithResponse( - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - Context.NONE) - .getValue(); + public SensitivityLabelInner get(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + sensitivityLabelSource, Context.NONE).getValue(); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1326,19 +975,12 @@ public SensitivityLabelInner get( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1360,10 +1002,8 @@ public Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1373,31 +1013,17 @@ public Mono> createOrUpdateWithResponseAsync( final String sensitivityLabelSource = "current"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1411,20 +1037,12 @@ public Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1446,10 +1064,8 @@ private Mono> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1459,28 +1075,16 @@ private Mono> createOrUpdateWithResponseAsync( final String sensitivityLabelSource = "current"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1493,24 +1097,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1524,25 +1121,18 @@ public Mono createOrUpdateAsync( * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters, + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, parameters, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName, parameters, context).block(); } /** * Creates or updates the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1555,31 +1145,17 @@ public Response createOrUpdateWithResponse( * @return a sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - SensitivityLabelInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - parameters, - Context.NONE) - .getValue(); + public SensitivityLabelInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName, parameters, Context.NONE).getValue(); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1591,18 +1167,11 @@ public SensitivityLabelInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1624,36 +1193,22 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "current"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1666,19 +1221,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1700,33 +1247,21 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "current"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), + context); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1738,22 +1273,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName) { return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) .flatMap(ignored -> Mono.empty()); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1766,24 +1296,17 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + context).block(); } /** * Deletes the sensitivity label of a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1794,22 +1317,17 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - deleteWithResponse( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void delete(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName) { + deleteWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + Context.NONE); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1821,18 +1339,11 @@ public void delete( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1854,36 +1365,22 @@ public Mono> disableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; return FluxUtil - .withContext( - context -> - service - .disableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1896,19 +1393,11 @@ public Mono> disableRecommendationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { + private Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1930,33 +1419,21 @@ private Mono> disableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service - .disableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1968,23 +1445,17 @@ private Mono> disableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableRecommendationAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return disableRecommendationWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - .flatMap(ignored -> Mono.empty()); + public Mono disableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { + return disableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1997,24 +1468,17 @@ public Mono disableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disableRecommendationWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return disableRecommendationWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response disableRecommendationWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return disableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, context).block(); } /** * Disables sensitivity recommendations on a given column. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2025,22 +1489,17 @@ public Response disableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disableRecommendation( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - disableRecommendationWithResponse( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void disableRecommendation(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { + disableRecommendationWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName, Context.NONE); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2052,18 +1511,11 @@ public void disableRecommendation( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { + public Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2085,36 +1537,22 @@ public Mono> enableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; return FluxUtil - .withContext( - context -> - service - .enableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2127,19 +1565,11 @@ public Mono> enableRecommendationWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> enableRecommendationWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { + private Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2161,33 +1591,21 @@ private Mono> enableRecommendationWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service - .enableRecommendation( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - schemaName, - tableName, - columnName, - sensitivityLabelSource, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2199,23 +1617,17 @@ private Mono> enableRecommendationWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enableRecommendationAsync( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - return enableRecommendationWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - .flatMap(ignored -> Mono.empty()); + public Mono enableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { + return enableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName).flatMap(ignored -> Mono.empty()); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2228,24 +1640,17 @@ public Mono enableRecommendationAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response enableRecommendationWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName, - Context context) { - return enableRecommendationWithResponseAsync( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, context) - .block(); + public Response enableRecommendationWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return enableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, + columnName, context).block(); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -2256,22 +1661,17 @@ public Response enableRecommendationWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enableRecommendation( - String resourceGroupName, - String serverName, - String databaseName, - String schemaName, - String tableName, - String columnName) { - enableRecommendationWithResponse( - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, Context.NONE); + public void enableRecommendation(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { + enableRecommendationWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + Context.NONE); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2279,16 +1679,14 @@ public void enableRecommendation( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String filter) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2301,43 +1699,23 @@ private Mono> listByDatabaseSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2346,16 +1724,14 @@ private Mono> listByDatabaseSinglePageAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2368,40 +1744,23 @@ private Mono> listByDatabaseSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - filter, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2411,18 +1770,17 @@ private Mono> listByDatabaseSinglePageAsync * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2431,19 +1789,18 @@ public PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { final String filter = null; - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2454,8 +1811,8 @@ public PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -2463,9 +1820,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2474,17 +1831,17 @@ private PagedFlux listByDatabaseAsync( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { final String filter = null; return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); } /** * Gets the sensitivity labels of a given database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -2495,16 +1852,15 @@ public PagedIterable listByDatabase( * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, String filter, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2516,32 +1872,22 @@ private Mono> listCurrentByDatabaseNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2549,37 +1895,26 @@ private Mono> listCurrentByDatabaseNextSing * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCurrentByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listCurrentByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2591,32 +1926,22 @@ private Mono> listRecommendedByDatabaseNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2624,37 +1949,26 @@ private Mono> listRecommendedByDatabaseNext * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRecommendedByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listRecommendedByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2666,31 +1980,21 @@ private Mono> listByDatabaseNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2698,29 +2002,19 @@ private Mono> listByDatabaseNextSinglePageA * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java index 80792db5ac06d..d1fa0b2b71759 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java @@ -44,24 +44,24 @@ */ public final class ServerAdvancedThreatProtectionSettingsClientImpl implements ServerAdvancedThreatProtectionSettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerAdvancedThreatProtectionSettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerAdvancedThreatProtectionSettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerAdvancedThreatProtectionSettingsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerAdvancedThreatProtectionSettingsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ServerAdvancedThreatProtectionSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -72,85 +72,63 @@ public final class ServerAdvancedThreatProtectionSettingsClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerAdvancedThreatProtectionSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({200}) + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerAdvancedThreatProtectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -160,57 +138,37 @@ private Mono> listByServerSin return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -220,38 +178,23 @@ private Mono> listByServerSin return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,18 +202,17 @@ private Mono> listByServerSin * @return a list of the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,71 +221,68 @@ public PagedFlux listByServerAsync( * @return a list of the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection states as paginated response with {@link - * PagedIterable}. + * @return a list of the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, + String serverName) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Get a list of the server's Advanced Threat Protection states. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the server's Advanced Threat Protection states as paginated response with {@link - * PagedIterable}. + * @return a list of the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 server's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -353,39 +292,26 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -393,19 +319,14 @@ public 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 server's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,36 +336,24 @@ private Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, advancedThreatProtectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,17 +362,17 @@ private Mono> getWithResponseAsync * @return a server's Advanced Threat Protection state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { + public Mono getAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName) { return getWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -473,19 +382,16 @@ public Mono getAsync( * @return a server's Advanced Threat Protection state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, context).block(); } /** * Get a server's Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -494,16 +400,16 @@ public Response getWithResponse( * @return a server's Advanced Threat Protection state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAdvancedThreatProtectionInner get( - String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) { + public ServerAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName) { return getWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, Context.NONE).getValue(); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -513,16 +419,11 @@ public ServerAdvancedThreatProtectionInner get( * @return a server Advanced Threat Protection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -532,16 +433,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -550,27 +447,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -581,17 +468,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server Advanced Threat Protection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, AdvancedThreatProtectionName advancedThreatProtectionName, + ServerAdvancedThreatProtectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -601,16 +483,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (advancedThreatProtectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter advancedThreatProtectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -619,24 +497,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advancedThreatProtectionName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -647,28 +517,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAdvancedThreatProtectionInner.class, - ServerAdvancedThreatProtectionInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerAdvancedThreatProtectionInner.class, + ServerAdvancedThreatProtectionInner.class, this.client.getContext()); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -680,31 +542,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, advancedThreatProtectionName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAdvancedThreatProtectionInner.class, - ServerAdvancedThreatProtectionInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + advancedThreatProtectionName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerAdvancedThreatProtectionInner.class, + ServerAdvancedThreatProtectionInner.class, context); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -715,20 +568,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters) + beginCreateOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters) .getSyncPoller(); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -740,22 +590,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAdvancedThreatProtectionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + beginCreateOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, advancedThreatProtectionName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context) .getSyncPoller(); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -765,21 +612,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a server Advanced Threat Protection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -790,23 +633,18 @@ public Mono createOrUpdateAsync( * @return a server Advanced Threat Protection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, advancedThreatProtectionName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -816,19 +654,16 @@ private Mono createOrUpdateAsync( * @return a server Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters) { + public ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters).block(); } /** * Creates or updates an Advanced Threat Protection state. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -839,11 +674,8 @@ public ServerAdvancedThreatProtectionInner createOrUpdate( * @return a server Advanced Threat Protection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAdvancedThreatProtectionInner createOrUpdate( - String resourceGroupName, - String serverName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ServerAdvancedThreatProtectionInner parameters, + public ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context) .block(); @@ -851,14 +683,13 @@ public ServerAdvancedThreatProtectionInner createOrUpdate( /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -866,62 +697,42 @@ private Mono> listByServerNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java index b7cdd2bbaa086..62f4bbfc4e2ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java @@ -28,22 +28,28 @@ import java.util.List; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAdvisorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAdvisorsClient. + */ public final class ServerAdvisorsClientImpl implements ServerAdvisorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerAdvisorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerAdvisorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerAdvisorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerAdvisorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerAdvisorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -54,61 +60,40 @@ public final class ServerAdvisorsClientImpl implements ServerAdvisorsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerAdvisorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advisors") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advisors/{advisorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("advisorName") String advisorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("advisorName") String advisorName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/advisors/{advisorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("advisorName") String advisorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AdvisorInner parameters, - @HeaderParam("Accept") String accept, - Context context); + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("advisorName") String advisorName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AdvisorInner parameters, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,13 +102,11 @@ Mono> update( * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByServerWithResponseAsync( - String resourceGroupName, String serverName, String expand) { + public Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, + String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -133,33 +116,21 @@ public Mono>> listByServerWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -169,13 +140,11 @@ public Mono>> listByServerWithResponseAsync( * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listByServerWithResponseAsync( - String resourceGroupName, String serverName, String expand, Context context) { + private Mono>> listByServerWithResponseAsync(String resourceGroupName, + String serverName, String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -185,30 +154,20 @@ private Mono>> listByServerWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -224,9 +183,9 @@ public Mono> listByServerAsync(String resourceGroupName, Stri /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -236,16 +195,16 @@ public Mono> listByServerAsync(String resourceGroupName, Stri * @return a list of server advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByServerWithResponse( - String resourceGroupName, String serverName, String expand, Context context) { + public Response> listByServerWithResponse(String resourceGroupName, String serverName, + String expand, Context context) { return listByServerWithResponseAsync(resourceGroupName, serverName, expand, context).block(); } /** * Gets a list of server advisors. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -260,9 +219,9 @@ public List listByServer(String resourceGroupName, String serverNa /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,13 +230,11 @@ public List listByServer(String resourceGroupName, String serverNa * @return a server advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String advisorName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String advisorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -290,33 +247,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param context The context to associate with this operation. @@ -326,13 +271,11 @@ public Mono> getWithResponseAsync( * @return a server advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String advisorName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -345,30 +288,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -384,9 +317,9 @@ public Mono getAsync(String resourceGroupName, String serverName, /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param context The context to associate with this operation. @@ -396,16 +329,16 @@ public Mono getAsync(String resourceGroupName, String serverName, * @return a server advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String advisorName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String advisorName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, advisorName, context).block(); } /** * Gets a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -420,26 +353,24 @@ public AdvisorInner get(String resourceGroupName, String serverName, String advi /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -452,10 +383,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -464,27 +393,16 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -492,17 +410,15 @@ public 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of {@link - * Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -515,10 +431,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -527,24 +441,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - advisorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -554,17 +459,17 @@ private Mono> updateWithResponseAsync( * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters) { return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -575,16 +480,16 @@ public Mono updateAsync( * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters, Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters, context).block(); } /** * Updates a server advisor. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. * @param parameters The requested advisor resource state. @@ -594,8 +499,8 @@ public Response updateWithResponse( * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner update( - String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters) { + public AdvisorInner update(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters) { return updateWithResponse(resourceGroupName, serverName, advisorName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java index 3e02cd8547b15..9c26dc91a4442 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java @@ -27,23 +27,28 @@ import com.azure.resourcemanager.sql.fluent.models.ServerAutomaticTuningInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAutomaticTuningsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAutomaticTuningsClient. + */ public final class ServerAutomaticTuningsClientImpl implements ServerAutomaticTuningsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerAutomaticTuningsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerAutomaticTuningsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerAutomaticTuningsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ServerAutomaticTuningsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerAutomaticTuningsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -54,43 +59,31 @@ public final class ServerAutomaticTuningsClientImpl implements ServerAutomaticTu @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerAutomaticTuningsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/automaticTuning/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/automaticTuning/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerAutomaticTuningInner parameters, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerAutomaticTuningInner parameters, @HeaderParam("Accept") String accept, Context context); } /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -98,13 +91,11 @@ Mono> update( * @return server-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -114,32 +105,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,13 +128,11 @@ public Mono> getWithResponseAsync( * @return server-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -164,29 +142,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -200,9 +169,9 @@ public Mono getAsync(String resourceGroupName, Strin /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,16 +180,16 @@ public Mono getAsync(String resourceGroupName, Strin * @return server-level Automatic Tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, context).block(); } /** * Retrieves server automatic tuning options. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -234,9 +203,9 @@ public ServerAutomaticTuningInner get(String resourceGroupName, String serverNam /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,13 +214,11 @@ public ServerAutomaticTuningInner get(String resourceGroupName, String serverNam * @return server-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String serverName, ServerAutomaticTuningInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -261,10 +228,8 @@ public Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -273,26 +238,16 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -302,13 +257,11 @@ public Mono> updateWithResponseAsync( * @return server-level Automatic Tuning along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String serverName, ServerAutomaticTuningInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -318,10 +271,8 @@ private Mono> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -330,23 +281,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -355,17 +298,17 @@ private Mono> updateWithResponseAsync( * @return server-level Automatic Tuning on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters) { return updateWithResponseAsync(resourceGroupName, serverName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -375,16 +318,16 @@ public Mono updateAsync( * @return server-level Automatic Tuning along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters, Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters, Context context) { return updateWithResponseAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Update automatic tuning options on server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,8 +336,8 @@ public Response updateWithResponse( * @return server-level Automatic Tuning. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAutomaticTuningInner update( - String resourceGroupName, String serverName, ServerAutomaticTuningInner parameters) { + public ServerAutomaticTuningInner update(String resourceGroupName, String serverName, + ServerAutomaticTuningInner parameters) { return updateWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java index b1ec9964ad3a8..38d2e4f74502f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java @@ -39,24 +39,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerAzureADAdministratorsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerAzureADAdministratorsClient. + */ public final class ServerAzureADAdministratorsClientImpl implements ServerAzureADAdministratorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerAzureADAdministratorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerAzureADAdministratorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerAzureADAdministratorsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerAzureADAdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerAzureADAdministratorsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,100 +71,73 @@ public final class ServerAzureADAdministratorsClientImpl implements ServerAzureA @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerAzureADAdministratorsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/administrators") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/administrators/{administratorName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/administrators/{administratorName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerAzureADAdministratorInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/administrators/{administratorName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("administratorName") AdministratorName administratorName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure Active Directory administrators in a server along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -170,57 +147,37 @@ private Mono> listByServerSingleP return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure Active Directory administrators in a server along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -230,38 +187,23 @@ private Mono> listByServerSingleP return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -270,16 +212,15 @@ private Mono> listByServerSingleP */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,24 +229,23 @@ public PagedFlux listByServerAsync(String resou * @return a list of Azure Active Directory administrators in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Active Directory administrators in a server as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -314,44 +254,42 @@ public PagedIterable listByServer(String resour /** * Gets a list of Azure Active Directory administrators in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Active Directory administrators in a server as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AdministratorName administratorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,50 +303,36 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AdministratorName administratorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -422,30 +346,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,17 +368,17 @@ private Mono> getWithResponseAsync( * @return a Azure Active Directory administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, AdministratorName administratorName) { + public Mono getAsync(String resourceGroupName, String serverName, + AdministratorName administratorName) { return getWithResponseAsync(resourceGroupName, serverName, administratorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -474,16 +388,16 @@ public Mono getAsync( * @return a Azure Active Directory administrator along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, administratorName, context).block(); } /** * Gets a Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -492,36 +406,31 @@ public Response getWithResponse( * @return a Azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADAdministratorInner get( - String resourceGroupName, String serverName, AdministratorName administratorName) { + public ServerAzureADAdministratorInner get(String resourceGroupName, String serverName, + AdministratorName administratorName) { return getWithResponse(resourceGroupName, serverName, administratorName, Context.NONE).getValue(); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,10 +444,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -547,27 +454,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -575,21 +472,16 @@ public 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 azure Active Directory administrator along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory administrator along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, AdministratorName administratorName, ServerAzureADAdministratorInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -603,10 +495,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -615,24 +505,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -643,28 +524,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerAzureADAdministratorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, AdministratorName administratorName, ServerAzureADAdministratorInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, administratorName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAzureADAdministratorInner.class, - ServerAzureADAdministratorInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, administratorName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerAzureADAdministratorInner.class, ServerAzureADAdministratorInner.class, + this.client.getContext()); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -676,30 +549,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerAzureADAdministratorInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, AdministratorName administratorName, + ServerAzureADAdministratorInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, administratorName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAzureADAdministratorInner.class, - ServerAzureADAdministratorInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, administratorName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerAzureADAdministratorInner.class, ServerAzureADAdministratorInner.class, + context); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -710,18 +574,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAzureADAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, + String resourceGroupName, String serverName, AdministratorName administratorName, ServerAzureADAdministratorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters) + .getSyncPoller(); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -733,20 +596,17 @@ public SyncPoller, ServerAzureADAdmi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAzureADAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, context) + String resourceGroupName, String serverName, AdministratorName administratorName, + ServerAzureADAdministratorInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, context) .getSyncPoller(); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -756,21 +616,17 @@ public SyncPoller, ServerAzureADAdmi * @return azure Active Directory administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -781,22 +637,17 @@ public Mono createOrUpdateAsync( * @return azure Active Directory administrator on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -806,19 +657,16 @@ private Mono createOrUpdateAsync( * @return azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADAdministratorInner createOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters) { + public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters).block(); } /** * Creates or updates an existing Azure Active Directory administrator. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -829,20 +677,16 @@ public ServerAzureADAdministratorInner createOrUpdate( * @return azure Active Directory administrator. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADAdministratorInner createOrUpdate( - String resourceGroupName, - String serverName, - AdministratorName administratorName, - ServerAzureADAdministratorInner parameters, - Context context) { + public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, + AdministratorName administratorName, ServerAzureADAdministratorInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, administratorName, parameters, context).block(); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -851,13 +695,11 @@ public ServerAzureADAdministratorInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -871,31 +713,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -905,13 +736,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -925,28 +754,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter administratorName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - administratorName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -955,21 +775,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AdministratorName administratorName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, administratorName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AdministratorName administratorName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, administratorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -979,21 +797,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, administratorName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, administratorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1002,16 +819,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AdministratorName administratorName) { - return beginDeleteAsync(resourceGroupName, serverName, administratorName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AdministratorName administratorName) { + return this.beginDeleteAsync(resourceGroupName, serverName, administratorName).getSyncPoller(); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -1021,16 +838,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, administratorName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AdministratorName administratorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, administratorName, context).getSyncPoller(); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1040,16 +857,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, AdministratorName administratorName) { - return beginDeleteAsync(resourceGroupName, serverName, administratorName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, administratorName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -1059,18 +875,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Admin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, administratorName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, AdministratorName administratorName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, administratorName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1084,9 +899,9 @@ public void delete(String resourceGroupName, String serverName, AdministratorNam /** * Deletes the Azure Active Directory administrator with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -1095,21 +910,20 @@ public void delete(String resourceGroupName, String serverName, AdministratorNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, AdministratorName administratorName, Context context) { + public void delete(String resourceGroupName, String serverName, AdministratorName administratorName, + Context context) { deleteAsync(resourceGroupName, serverName, administratorName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1117,62 +931,42 @@ private Mono> listByServerNextSin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java index e7ff60b7407b2..30e7e7d0507ce 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java @@ -43,24 +43,24 @@ * An instance of this class provides access to all the operations defined in ServerAzureADOnlyAuthenticationsClient. */ public final class ServerAzureADOnlyAuthenticationsClientImpl implements ServerAzureADOnlyAuthenticationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerAzureADOnlyAuthenticationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerAzureADOnlyAuthenticationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerAzureADOnlyAuthenticationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerAzureADOnlyAuthenticationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ServerAzureADOnlyAuthenticationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -71,100 +71,73 @@ public final class ServerAzureADOnlyAuthenticationsClientImpl implements ServerA @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerAzureADOnlyAuthenticationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/azureADOnlyAuthentications") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerAzureADOnlyAuthenticationInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/azureADOnlyAuthentications/{authenticationName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("authenticationName") AuthenticationName authenticationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,57 +147,37 @@ private Mono> listByServerSi return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -234,132 +187,113 @@ private Mono> listByServerSi return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedFlux}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, + String serverName) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Gets a list of server Azure Active Directory only authentications. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server Azure Active Directory only authentications as paginated response with {@link - * PagedIterable}. + * @return a list of server Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AuthenticationName authenticationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -373,33 +307,21 @@ public Mono> getWithResponseAsync .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -407,16 +329,14 @@ public 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 specific Azure Active Directory only authentication property along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, AuthenticationName authenticationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -430,30 +350,20 @@ private Mono> getWithResponseAsyn .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -462,17 +372,17 @@ private Mono> getWithResponseAsyn * @return a specific Azure Active Directory only authentication property on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { + public Mono getAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName) { return getWithResponseAsync(resourceGroupName, serverName, authenticationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -482,16 +392,16 @@ public Mono getAsync( * @return a specific Azure Active Directory only authentication property along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, authenticationName, context).block(); } /** * Gets a specific Azure Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -500,38 +410,33 @@ public Response getWithResponse( * @return a specific Azure Active Directory only authentication property. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADOnlyAuthenticationInner get( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { + public ServerAzureADOnlyAuthenticationInner get(String resourceGroupName, String serverName, + AuthenticationName authenticationName) { return getWithResponse(resourceGroupName, serverName, authenticationName, Context.NONE).getValue(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -545,10 +450,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -557,51 +460,36 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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 azure Active Directory only authentication along with {@link Response} on successful completion of {@link - * Mono}. + * @return azure Active Directory only authentication along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -615,10 +503,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -627,29 +513,20 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -657,33 +534,25 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, authenticationName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAzureADOnlyAuthenticationInner.class, - ServerAzureADOnlyAuthenticationInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, authenticationName, parameters); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ServerAzureADOnlyAuthenticationInner.class, + ServerAzureADOnlyAuthenticationInner.class, this.client.getContext()); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -692,35 +561,26 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, AuthenticationName authenticationName, + ServerAzureADOnlyAuthenticationInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, authenticationName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerAzureADOnlyAuthenticationInner.class, - ServerAzureADOnlyAuthenticationInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, authenticationName, parameters, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), ServerAzureADOnlyAuthenticationInner.class, + ServerAzureADOnlyAuthenticationInner.class, context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -728,24 +588,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, + beginCreateOrUpdate(String resourceGroupName, String serverName, AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters) + .getSyncPoller(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -754,52 +612,44 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerAzureADOnlyAuthenticationInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters, context) + beginCreateOrUpdate(String resourceGroupName, String serverName, AuthenticationName authenticationName, + ServerAzureADOnlyAuthenticationInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters, context) .getSyncPoller(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -807,51 +657,43 @@ public Mono createOrUpdateAsync( * @return azure Active Directory only authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters) { + public ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters).block(); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication - * property. + * property. * @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. @@ -859,20 +701,16 @@ public ServerAzureADOnlyAuthenticationInner createOrUpdate( * @return azure Active Directory only authentication. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerAzureADOnlyAuthenticationInner createOrUpdate( - String resourceGroupName, - String serverName, - AuthenticationName authenticationName, - ServerAzureADOnlyAuthenticationInner parameters, - Context context) { + public ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, String serverName, + AuthenticationName authenticationName, ServerAzureADOnlyAuthenticationInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, authenticationName, parameters, context).block(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -881,13 +719,11 @@ public ServerAzureADOnlyAuthenticationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -901,31 +737,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -935,13 +760,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -955,28 +778,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter authenticationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - authenticationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -985,21 +799,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, authenticationName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, authenticationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1009,21 +821,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, authenticationName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, authenticationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1032,16 +843,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AuthenticationName authenticationName) { - return beginDeleteAsync(resourceGroupName, serverName, authenticationName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AuthenticationName authenticationName) { + return this.beginDeleteAsync(resourceGroupName, serverName, authenticationName).getSyncPoller(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1051,16 +862,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, authenticationName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + AuthenticationName authenticationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, authenticationName, context).getSyncPoller(); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1070,16 +881,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, AuthenticationName authenticationName) { - return beginDeleteAsync(resourceGroupName, serverName, authenticationName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, authenticationName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1089,18 +899,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Authe * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, authenticationName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, AuthenticationName authenticationName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, authenticationName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1114,9 +923,9 @@ public void delete(String resourceGroupName, String serverName, AuthenticationNa /** * Deletes an existing server Active Directory only authentication property. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -1125,21 +934,20 @@ public void delete(String resourceGroupName, String serverName, AuthenticationNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context) { + public void delete(String resourceGroupName, String serverName, AuthenticationName authenticationName, + Context context) { deleteAsync(resourceGroupName, serverName, authenticationName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1147,62 +955,42 @@ private Mono> listByServerNe return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java index 754deda117a52..a10ac1921cfc5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java @@ -37,24 +37,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerBlobAuditingPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerBlobAuditingPoliciesClient. + */ public final class ServerBlobAuditingPoliciesClientImpl implements ServerBlobAuditingPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerBlobAuditingPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerBlobAuditingPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerBlobAuditingPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerBlobAuditingPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerBlobAuditingPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,85 +69,63 @@ public final class ServerBlobAuditingPoliciesClientImpl implements ServerBlobAud @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerBlobAuditingPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/auditingSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/auditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/auditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerBlobAuditingPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -153,57 +135,37 @@ private Mono> listByServerSinglePag return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -213,38 +175,23 @@ private Mono> listByServerSinglePag return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,16 +200,15 @@ private Mono> listByServerSinglePag */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,18 +217,17 @@ public PagedFlux listByServerAsync(String resourc * @return a list of server auditing settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -296,9 +241,9 @@ public PagedIterable listByServer(String resource /** * Lists auditing settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,16 +252,16 @@ public PagedIterable listByServer(String resource * @return a list of server auditing settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -324,13 +269,11 @@ public PagedIterable listByServer( * @return a server's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -340,34 +283,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -376,13 +307,11 @@ public Mono> getWithResponseAsync( * @return a server's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,31 +321,21 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -430,9 +349,9 @@ public Mono getAsync(String resourceGroupName, St /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,16 +360,16 @@ public Mono getAsync(String resourceGroupName, St * @return a server's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, context).block(); } /** * Gets a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -464,9 +383,9 @@ public ServerBlobAuditingPolicyInner get(String resourceGroupName, String server /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,13 +394,11 @@ public ServerBlobAuditingPolicyInner get(String resourceGroupName, String server * @return a server blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -491,10 +408,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -504,27 +419,17 @@ public Mono>> createOrUpdateWithResponseAsync( final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -534,13 +439,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -550,10 +453,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -563,24 +464,15 @@ private Mono>> createOrUpdateWithResponseAsync( final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - blobAuditingPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -590,25 +482,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerBlobAuditingPolicyInner.class, - ServerBlobAuditingPolicyInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerBlobAuditingPolicyInner.class, ServerBlobAuditingPolicyInner.class, + this.client.getContext()); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -619,26 +506,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerBlobAuditingPolicyInner.class, - ServerBlobAuditingPolicyInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerBlobAuditingPolicyInner.class, ServerBlobAuditingPolicyInner.class, + context); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -647,16 +529,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + public SyncPoller, ServerBlobAuditingPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -668,14 +550,14 @@ public SyncPoller, ServerBlobAuditingP @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -684,18 +566,17 @@ public SyncPoller, ServerBlobAuditingP * @return a server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -705,18 +586,17 @@ public Mono createOrUpdateAsync( * @return a server blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -725,16 +605,16 @@ private Mono createOrUpdateAsync( * @return a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { + public ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); } /** * Creates or updates a server's blob auditing policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. @@ -744,21 +624,20 @@ public ServerBlobAuditingPolicyInner createOrUpdate( * @return a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBlobAuditingPolicyInner createOrUpdate( - String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { + public ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ServerBlobAuditingPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -766,62 +645,42 @@ private Mono> listByServerNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java index b9f0cd74c4a01..4a5a17a54c4f8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java @@ -38,23 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerConnectionPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerConnectionPoliciesClient. + */ public final class ServerConnectionPoliciesClientImpl implements ServerConnectionPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerConnectionPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerConnectionPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerConnectionPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ServerConnectionPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerConnectionPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,85 +70,63 @@ public final class ServerConnectionPoliciesClientImpl implements ServerConnectio @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerConnectionPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/connectionPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/connectionPolicies/{connectionPolicyName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("connectionPolicyName") ConnectionPolicyName connectionPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/connectionPolicies/{connectionPolicyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("connectionPolicyName") ConnectionPolicyName connectionPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerConnectionPolicyInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerConnectionPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -153,57 +136,37 @@ private Mono> listByServerSinglePageA return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -213,38 +176,23 @@ private Mono> listByServerSinglePageA return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,16 +201,15 @@ private Mono> listByServerSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,18 +218,17 @@ public PagedFlux listByServerAsync(String resourceG * @return a list of server connection policy objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -296,9 +242,9 @@ public PagedIterable listByServer(String resourceGr /** * Lists connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,16 +253,16 @@ public PagedIterable listByServer(String resourceGr * @return a list of server connection policy objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,13 +271,11 @@ public PagedIterable listByServer( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -345,33 +289,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter connectionPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - connectionPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + connectionPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -381,13 +313,11 @@ public Mono> getWithResponseAsync( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ConnectionPolicyName connectionPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -401,30 +331,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter connectionPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - connectionPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, connectionPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -433,17 +353,17 @@ private Mono> getWithResponseAsync( * @return a server connection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName) { + public Mono getAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, connectionPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -453,16 +373,16 @@ public Mono getAsync( * @return a server connection policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, connectionPolicyName, context).block(); } /** * Gets a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -471,16 +391,16 @@ public Response getWithResponse( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConnectionPolicyInner get( - String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName) { + public ServerConnectionPolicyInner get(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName) { return getWithResponse(resourceGroupName, serverName, connectionPolicyName, Context.NONE).getValue(); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -490,16 +410,11 @@ public ServerConnectionPolicyInner get( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -513,10 +428,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter connectionPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -525,27 +438,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - connectionPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + connectionPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -556,17 +459,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server connection policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -580,10 +478,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter connectionPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -592,24 +488,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - connectionPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, connectionPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -620,27 +507,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerConnectionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, connectionPolicyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConnectionPolicyInner.class, - ServerConnectionPolicyInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, connectionPolicyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConnectionPolicyInner.class, ServerConnectionPolicyInner.class, + this.client.getContext()); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -652,29 +532,21 @@ public PollerFlux, ServerConnectionPolic */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerConnectionPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context) { + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, + ServerConnectionPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerConnectionPolicyInner.class, - ServerConnectionPolicyInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerConnectionPolicyInner.class, ServerConnectionPolicyInner.class, + context); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -685,19 +557,17 @@ private PollerFlux, ServerConnectionPoli */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConnectionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters) .getSyncPoller(); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -709,20 +579,17 @@ public SyncPoller, ServerConnectionPolic */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerConnectionPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context) + String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, + ServerConnectionPolicyInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context) .getSyncPoller(); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -732,21 +599,17 @@ public SyncPoller, ServerConnectionPolic * @return a server connection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -757,22 +620,17 @@ public Mono createOrUpdateAsync( * @return a server connection policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -782,19 +640,16 @@ private Mono createOrUpdateAsync( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConnectionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters) { + public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters).block(); } /** * Updates a server connection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -805,25 +660,20 @@ public ServerConnectionPolicyInner createOrUpdate( * @return a server connection policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConnectionPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - ConnectionPolicyName connectionPolicyName, - ServerConnectionPolicyInner parameters, - Context context) { + public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, + ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -831,62 +681,42 @@ private Mono> listByServerNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java index 3d45358ac6982..9f11ff894dd28 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java @@ -37,24 +37,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerDevOpsAuditSettingsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerDevOpsAuditSettingsClient. + */ public final class ServerDevOpsAuditSettingsClientImpl implements ServerDevOpsAuditSettingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerDevOpsAuditSettingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerDevOpsAuditSettingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerDevOpsAuditSettingsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerDevOpsAuditSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerDevOpsAuditSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,85 +69,63 @@ public final class ServerDevOpsAuditSettingsClientImpl implements ServerDevOpsAu @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerDevOpsAuditSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/devOpsAuditingSettings") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("devOpsAuditingSettingsName") String devOpsAuditingSettingsName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("devOpsAuditingSettingsName") String devOpsAuditingSettingsName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerDevOpsAuditingSettingsInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -153,57 +135,37 @@ private Mono> listByServerSingl return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -213,38 +175,23 @@ private Mono> listByServerSingl return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,16 +200,15 @@ private Mono> listByServerSingl */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,18 +217,17 @@ public PagedFlux listByServerAsync(String res * @return a list of server DevOps audit settings as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -296,9 +241,9 @@ public PagedIterable listByServer(String reso /** * Lists DevOps audit settings of a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,16 +252,16 @@ public PagedIterable listByServer(String reso * @return a list of server DevOps audit settings as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,13 +270,11 @@ public PagedIterable listByServer( * @return a server's DevOps audit settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String devOpsAuditingSettingsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -341,39 +284,24 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (devOpsAuditingSettingsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter devOpsAuditingSettingsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter devOpsAuditingSettingsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - devOpsAuditingSettingsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param context The context to associate with this operation. @@ -383,13 +311,11 @@ public Mono> getWithResponseAsync( * @return a server's DevOps audit settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String devOpsAuditingSettingsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -399,36 +325,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (devOpsAuditingSettingsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter devOpsAuditingSettingsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter devOpsAuditingSettingsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - devOpsAuditingSettingsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, devOpsAuditingSettingsName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -437,17 +351,17 @@ private Mono> getWithResponseAsync( * @return a server's DevOps audit settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName) { + public Mono getAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName) { return getWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param context The context to associate with this operation. @@ -457,16 +371,16 @@ public Mono getAsync( * @return a server's DevOps audit settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, context).block(); } /** * Gets a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,16 +389,16 @@ public Response getWithResponse( * @return a server's DevOps audit settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDevOpsAuditingSettingsInner get( - String resourceGroupName, String serverName, String devOpsAuditingSettingsName) { + public ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName) { return getWithResponse(resourceGroupName, serverName, devOpsAuditingSettingsName, Context.NONE).getValue(); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -494,16 +408,11 @@ public ServerDevOpsAuditingSettingsInner get( * @return a server DevOps auditing settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -513,16 +422,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (devOpsAuditingSettingsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter devOpsAuditingSettingsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter devOpsAuditingSettingsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -531,27 +436,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - devOpsAuditingSettingsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -562,17 +457,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server DevOps auditing settings along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -582,16 +472,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (devOpsAuditingSettingsName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter devOpsAuditingSettingsName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter devOpsAuditingSettingsName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -600,24 +486,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - devOpsAuditingSettingsName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -628,28 +506,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerDevOpsAuditingSettingsInner.class, - ServerDevOpsAuditingSettingsInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerDevOpsAuditingSettingsInner.class, + ServerDevOpsAuditingSettingsInner.class, this.client.getContext()); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -661,31 +531,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerDevOpsAuditingSettingsInner.class, - ServerDevOpsAuditingSettingsInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + devOpsAuditingSettingsName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerDevOpsAuditingSettingsInner.class, + ServerDevOpsAuditingSettingsInner.class, context); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -696,20 +556,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, + beginCreateOrUpdate(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters) .getSyncPoller(); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -721,21 +578,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) + beginCreateOrUpdate(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .getSyncPoller(); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -745,21 +599,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a server DevOps auditing settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -770,12 +620,8 @@ public Mono createOrUpdateAsync( * @return a server DevOps auditing settings on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -783,9 +629,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -795,19 +641,16 @@ private Mono createOrUpdateAsync( * @return a server DevOps auditing settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDevOpsAuditingSettingsInner createOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters) { + public ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).block(); } /** * Creates or updates a server's DevOps audit settings. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. @@ -818,26 +661,21 @@ public ServerDevOpsAuditingSettingsInner createOrUpdate( * @return a server DevOps auditing settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDevOpsAuditingSettingsInner createOrUpdate( - String resourceGroupName, - String serverName, - String devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, - Context context) { + public ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -845,62 +683,42 @@ private Mono> listByServerNextS return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java index 5d74ba3b38de8..47f4de94124cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerDnsAliasesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerDnsAliasesClient. + */ public final class ServerDnsAliasesClientImpl implements ServerDnsAliasesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerDnsAliasesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerDnsAliasesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerDnsAliasesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerDnsAliasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerDnsAliasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,116 +72,80 @@ public final class ServerDnsAliasesClientImpl implements ServerDnsAliasesClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerDnsAliasesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/dnsAliases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/dnsAliases/{dnsAliasName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/dnsAliases/{dnsAliasName}/acquire") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> acquire( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, - @PathParam("subscriptionId") String subscriptionId, + Mono>> acquire(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerDnsAliasAcquisition parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerDnsAliasAcquisition parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DNS aliases for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -185,57 +155,37 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server DNS aliases for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,38 +195,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -285,16 +220,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,18 +237,17 @@ public PagedFlux listByServerAsync(String resourceGroupName * @return a list of server DNS aliases for a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -328,9 +261,9 @@ public PagedIterable listByServer(String resourceGroupName, /** * Gets a list of server DNS aliases for a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,16 +272,16 @@ public PagedIterable listByServer(String resourceGroupName, * @return a list of server DNS aliases for a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -357,13 +290,11 @@ public PagedIterable listByServer( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -376,33 +307,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -412,13 +331,11 @@ public Mono> getWithResponseAsync( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,30 +348,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,9 +377,9 @@ public Mono getAsync(String resourceGroupName, String serve /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -482,16 +389,16 @@ public Mono getAsync(String resourceGroupName, String serve * @return a server DNS alias along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, dnsAliasName, context).block(); } /** * Gets a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -506,9 +413,9 @@ public ServerDnsAliasInner get(String resourceGroupName, String serverName, Stri /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -517,13 +424,11 @@ public ServerDnsAliasInner get(String resourceGroupName, String serverName, Stri * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -536,33 +441,21 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -572,13 +465,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String dnsAliasName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -591,30 +482,20 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -623,25 +504,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String dnsAliasName) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, dnsAliasName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerDnsAliasInner.class, - ServerDnsAliasInner.class, - this.client.getContext()); + public PollerFlux, ServerDnsAliasInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String dnsAliasName) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, dnsAliasName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerDnsAliasInner.class, ServerDnsAliasInner.class, this.client.getContext()); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -651,22 +526,20 @@ public PollerFlux, ServerDnsAliasInner> beginCre * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerDnsAliasInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + private PollerFlux, ServerDnsAliasInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String dnsAliasName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, dnsAliasName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerDnsAliasInner.class, ServerDnsAliasInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, dnsAliasName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerDnsAliasInner.class, ServerDnsAliasInner.class, context); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -675,16 +548,16 @@ private PollerFlux, ServerDnsAliasInner> beginCr * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName).getSyncPoller(); + public SyncPoller, ServerDnsAliasInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String dnsAliasName) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName).getSyncPoller(); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -694,16 +567,16 @@ public SyncPoller, ServerDnsAliasInner> beginCre * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerDnsAliasInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName, context).getSyncPoller(); + public SyncPoller, ServerDnsAliasInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String dnsAliasName, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName, context).getSyncPoller(); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -712,18 +585,17 @@ public SyncPoller, ServerDnsAliasInner> beginCre * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String dnsAliasName) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String dnsAliasName) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -733,18 +605,17 @@ public Mono createOrUpdateAsync( * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, dnsAliasName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -759,9 +630,9 @@ public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serve /** * Creates a server DNS alias. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -771,16 +642,16 @@ public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serve * @return a server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDnsAliasInner createOrUpdate( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serverName, String dnsAliasName, + Context context) { return createOrUpdateAsync(resourceGroupName, serverName, dnsAliasName, context).block(); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -789,13 +660,11 @@ public ServerDnsAliasInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -808,31 +677,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -842,13 +700,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -861,28 +717,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -891,20 +738,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String dnsAliasName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String dnsAliasName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, dnsAliasName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -914,21 +759,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, dnsAliasName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, dnsAliasName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -937,16 +781,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String dnsAliasName) { - return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String dnsAliasName) { + return this.beginDeleteAsync(resourceGroupName, serverName, dnsAliasName).getSyncPoller(); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -956,16 +800,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String dnsAliasName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String dnsAliasName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, dnsAliasName, context).getSyncPoller(); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -975,16 +819,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String dnsAliasName) { - return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -995,16 +838,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String dnsAliasName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, dnsAliasName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1018,9 +860,9 @@ public void delete(String resourceGroupName, String serverName, String dnsAliasN /** * Deletes the server DNS alias with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. @@ -1035,25 +877,23 @@ public void delete(String resourceGroupName, String serverName, String dnsAliasN /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> acquireWithResponseAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { + public Mono>> acquireWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName, ServerDnsAliasAcquisition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1066,10 +906,8 @@ public Mono>> acquireWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1079,29 +917,19 @@ public Mono>> acquireWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .acquire( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.acquire(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1109,17 +937,11 @@ public Mono>> acquireWithResponseAsync( * @return a server DNS alias along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> acquireWithResponseAsync( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context) { + private Mono>> acquireWithResponseAsync(String resourceGroupName, String serverName, + String dnsAliasName, ServerDnsAliasAcquisition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1132,10 +954,8 @@ private Mono>> acquireWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter dnsAliasName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1144,55 +964,40 @@ private Mono>> acquireWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .acquire( - this.client.getEndpoint(), - resourceGroupName, - serverName, - dnsAliasName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.acquire(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { - Mono>> mono = - acquireWithResponseAsync(resourceGroupName, serverName, dnsAliasName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerDnsAliasInner.class, - ServerDnsAliasInner.class, - this.client.getContext()); + public PollerFlux, ServerDnsAliasInner> beginAcquireAsync(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { + Mono>> mono + = acquireWithResponseAsync(resourceGroupName, serverName, dnsAliasName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerDnsAliasInner.class, ServerDnsAliasInner.class, this.client.getContext()); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1200,48 +1005,42 @@ public PollerFlux, ServerDnsAliasInner> beginAcq * @return the {@link PollerFlux} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerDnsAliasInner> beginAcquireAsync( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context) { + private PollerFlux, ServerDnsAliasInner> beginAcquireAsync(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - acquireWithResponseAsync(resourceGroupName, serverName, dnsAliasName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerDnsAliasInner.class, ServerDnsAliasInner.class, context); + Mono>> mono + = acquireWithResponseAsync(resourceGroupName, serverName, dnsAliasName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerDnsAliasInner.class, ServerDnsAliasInner.class, context); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerDnsAliasInner> beginAcquire( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { - return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters).getSyncPoller(); + public SyncPoller, ServerDnsAliasInner> beginAcquire(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { + return this.beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters).getSyncPoller(); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1249,44 +1048,39 @@ public SyncPoller, ServerDnsAliasInner> beginAcq * @return the {@link SyncPoller} for polling of a server DNS alias. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerDnsAliasInner> beginAcquire( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context) { - return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters, context).getSyncPoller(); + public SyncPoller, ServerDnsAliasInner> beginAcquire(String resourceGroupName, + String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters, Context context) { + return this.beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters, context).getSyncPoller(); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireAsync( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { - return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters) - .last() + public Mono acquireAsync(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters) { + return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1294,44 +1088,39 @@ public Mono acquireAsync( * @return a server DNS alias on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono acquireAsync( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context) { - return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters, context) - .last() + private Mono acquireAsync(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters, Context context) { + return beginAcquireAsync(resourceGroupName, serverName, dnsAliasName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDnsAliasInner acquire( - String resourceGroupName, String serverName, String dnsAliasName, ServerDnsAliasAcquisition parameters) { + public ServerDnsAliasInner acquire(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters) { return acquireAsync(resourceGroupName, serverName, dnsAliasName, parameters).block(); } /** * Acquires server DNS alias from another server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. - * @param parameters A server dns alias acquisition request. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1339,20 +1128,15 @@ public ServerDnsAliasInner acquire( * @return a server DNS alias. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerDnsAliasInner acquire( - String resourceGroupName, - String serverName, - String dnsAliasName, - ServerDnsAliasAcquisition parameters, - Context context) { + public ServerDnsAliasInner acquire(String resourceGroupName, String serverName, String dnsAliasName, + ServerDnsAliasAcquisition parameters, Context context) { return acquireAsync(resourceGroupName, serverName, dnsAliasName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1364,31 +1148,21 @@ private Mono> listByServerNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1401,23 +1175,13 @@ private Mono> listByServerNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java index c2f3d121311d0..4f76d349a5323 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerKeysClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerKeysClient. + */ public final class ServerKeysClientImpl implements ServerKeysClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerKeysService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerKeysClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerKeysClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,85 +70,57 @@ public final class ServerKeysClientImpl implements ServerKeysClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerKeysService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/keys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/keys/{keyName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/keys/{keyName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerKeyInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/keys/{keyName}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerKeyInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -150,13 +128,11 @@ Mono> listByServerNext( * @return a list of server keys along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -166,41 +142,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,13 +167,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of server keys along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -225,38 +181,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -265,16 +206,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,16 +224,15 @@ public PagedFlux listByServerAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,9 +246,9 @@ public PagedIterable listByServer(String resourceGroupName, Stri /** * Gets a list of server keys. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,9 +263,9 @@ public PagedIterable listByServer(String resourceGroupName, Stri /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,13 +274,11 @@ public PagedIterable listByServer(String resourceGroupName, Stri * @return a server key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String keyName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String keyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,33 +291,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -390,13 +315,11 @@ public Mono> getWithResponseAsync( * @return a server key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String keyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String keyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,30 +332,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -448,9 +361,9 @@ public Mono getAsync(String resourceGroupName, String serverName /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -460,16 +373,16 @@ public Mono getAsync(String resourceGroupName, String serverName * @return a server key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String keyName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String keyName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, keyName, context).block(); } /** * Gets a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -484,14 +397,14 @@ public ServerKeyInner get(String resourceGroupName, String serverName, String ke /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -499,13 +412,11 @@ public ServerKeyInner get(String resourceGroupName, String serverName, String ke * @return a server key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String keyName, ServerKeyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -518,10 +429,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -530,32 +439,21 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -564,13 +462,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -583,10 +479,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -595,29 +489,20 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -625,30 +510,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, keyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerKeyInner.class, - ServerKeyInner.class, - this.client.getContext()); + public PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, keyName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerKeyInner.class, ServerKeyInner.class, this.client.getContext()); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -657,27 +536,25 @@ public PollerFlux, ServerKeyInner> beginCreateOrUpdat * @return the {@link PollerFlux} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context) { + private PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, keyName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerKeyInner.class, ServerKeyInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, keyName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerKeyInner.class, ServerKeyInner.class, context); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -685,21 +562,21 @@ private PollerFlux, ServerKeyInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerKeyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters).getSyncPoller(); + public SyncPoller, ServerKeyInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters).getSyncPoller(); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -708,21 +585,22 @@ public SyncPoller, ServerKeyInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of a server key. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerKeyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, context).getSyncPoller(); + public SyncPoller, ServerKeyInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String keyName, ServerKeyInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, context) + .getSyncPoller(); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -730,23 +608,22 @@ public SyncPoller, ServerKeyInner> beginCreateOrUpdat * @return a server key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -755,23 +632,22 @@ public Mono createOrUpdateAsync( * @return a server key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -779,21 +655,21 @@ private Mono createOrUpdateAsync( * @return a server key. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerKeyInner createOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters) { + public ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, keyName, parameters).block(); } /** * Creates or updates a server key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be - * in the format of 'vault_key_version'. For example, if the keyId is - * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be - * formatted as: YourVaultName_YourKeyName_YourKeyVersion. + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -802,16 +678,16 @@ public ServerKeyInner createOrUpdate( * @return a server key. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerKeyInner createOrUpdate( - String resourceGroupName, String serverName, String keyName, ServerKeyInner parameters, Context context) { + public ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, String keyName, + ServerKeyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, keyName, parameters, context).block(); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -820,13 +696,11 @@ public ServerKeyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String keyName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String keyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -839,31 +713,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -873,13 +736,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String keyName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String keyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -892,28 +753,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - keyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -922,20 +774,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String keyName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String keyName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, keyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -945,21 +795,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String keyName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String keyName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, keyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, keyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -969,14 +818,14 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String keyName) { - return beginDeleteAsync(resourceGroupName, serverName, keyName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, serverName, keyName).getSyncPoller(); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -986,16 +835,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String keyName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, keyName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String keyName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, keyName, context).getSyncPoller(); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,16 +854,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String keyName) { - return beginDeleteAsync(resourceGroupName, serverName, keyName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, keyName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -1025,16 +873,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String keyName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, keyName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, keyName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1048,9 +895,9 @@ public void delete(String resourceGroupName, String serverName, String keyName) /** * Deletes the server key with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be deleted. * @param context The context to associate with this operation. @@ -1065,9 +912,8 @@ public void delete(String resourceGroupName, String serverName, String keyName, /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1079,31 +925,21 @@ private Mono> listByServerNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1116,23 +952,13 @@ private Mono> listByServerNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java index d573b09895b3c..ce5630896f9a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.ServerOperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerOperationsClient. + */ public final class ServerOperationsClientImpl implements ServerOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerOperationsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,52 +62,42 @@ public final class ServerOperationsClientImpl implements ServerOperationsClient @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/operations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -111,57 +107,37 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of operations performed on the server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,38 +147,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -211,16 +172,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,18 +189,17 @@ public PagedFlux listByServerAsync(String resourceGroupNam * @return a list of operations performed on the server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,9 +213,9 @@ public PagedIterable listByServer(String resourceGroupName /** * Gets a list of operations performed on the server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,21 +224,20 @@ public PagedIterable listByServer(String resourceGroupName * @return a list of operations performed on the server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 to a list server operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -287,62 +245,42 @@ private Mono> listByServerNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response to a list server operations request along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java index b5a39db9db9c7..01ffc14be4593 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. + */ public final class ServerSecurityAlertPoliciesClientImpl implements ServerSecurityAlertPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerSecurityAlertPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerSecurityAlertPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerSecurityAlertPoliciesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerSecurityAlertPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerSecurityAlertPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,85 +70,63 @@ public final class ServerSecurityAlertPoliciesClientImpl implements ServerSecuri @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerSecurityAlertPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/securityAlertPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({200, 202}) + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerSecurityAlertPolicyInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the server's threat detection policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -154,57 +136,37 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @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 server's threat detection policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -214,38 +176,23 @@ private Mono> listByServerSinglePa return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,16 +201,15 @@ private Mono> listByServerSinglePa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,18 +218,17 @@ public PagedFlux listByServerAsync(String resour * @return the server's threat detection policies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -297,9 +242,9 @@ public PagedIterable listByServer(String resourc /** * Get the server's threat detection policies. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,16 +253,16 @@ public PagedIterable listByServer(String resourc * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -326,13 +271,11 @@ public PagedIterable listByServer( * @return a server's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -342,38 +285,25 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -383,16 +313,11 @@ public Mono> getWithResponseAsync( * @return a server's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -402,35 +327,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,17 +353,17 @@ private Mono> getWithResponseAsync( * @return a server's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { + public Mono getAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -459,19 +373,16 @@ public Mono getAsync( * @return a server's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName, context).block(); } /** * Get a server's security alert policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -480,16 +391,16 @@ public Response getWithResponse( * @return a server's security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerSecurityAlertPolicyInner get( - String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { + public ServerSecurityAlertPolicyInner get(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponse(resourceGroupName, serverName, securityAlertPolicyName, Context.NONE).getValue(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -499,16 +410,11 @@ public ServerSecurityAlertPolicyInner get( * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -518,15 +424,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -535,27 +438,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -566,17 +459,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ServerSecurityAlertPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -586,15 +474,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (securityAlertPolicyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter securityAlertPolicyName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -603,24 +488,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - securityAlertPolicyName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -631,28 +507,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerSecurityAlertPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerSecurityAlertPolicyInner.class, - ServerSecurityAlertPolicyInner.class, - this.client.getContext()); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerSecurityAlertPolicyInner.class, ServerSecurityAlertPolicyInner.class, + this.client.getContext()); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -664,31 +532,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, securityAlertPolicyName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerSecurityAlertPolicyInner.class, - ServerSecurityAlertPolicyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + securityAlertPolicyName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerSecurityAlertPolicyInner.class, ServerSecurityAlertPolicyInner.class, + context); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -699,19 +558,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters) .getSyncPoller(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -723,20 +580,18 @@ public SyncPoller, ServerSecurityAler */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context) + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ServerSecurityAlertPolicyInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context) .getSyncPoller(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -746,21 +601,17 @@ public SyncPoller, ServerSecurityAler * @return a server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -771,11 +622,8 @@ public Mono createOrUpdateAsync( * @return a server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context) .last() @@ -784,9 +632,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -796,19 +644,16 @@ private Mono createOrUpdateAsync( * @return a server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters) { + public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters).block(); } /** * Creates or updates a threat detection policy. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. @@ -819,25 +664,21 @@ public ServerSecurityAlertPolicyInner createOrUpdate( * @return a server security alert policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerSecurityAlertPolicyInner createOrUpdate( - String resourceGroupName, - String serverName, - SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, - ServerSecurityAlertPolicyInner parameters, + public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -845,62 +686,42 @@ private Mono> listByServerNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java index f5d8b905959c2..d8c0e6bf51b7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java @@ -38,23 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerTrustCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerTrustCertificatesClient. + */ public final class ServerTrustCertificatesClientImpl implements ServerTrustCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerTrustCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerTrustCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerTrustCertificatesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create(ServerTrustCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ServerTrustCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,100 +70,75 @@ public final class ServerTrustCertificatesClientImpl implements ServerTrustCerti @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerTrustCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/serverTrustCertificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, - @PathParam("subscriptionId") String subscriptionId, + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerTrustCertificateInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerTrustCertificateInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance along - * with {@link PagedResponse} on successful completion of {@link Mono}. + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,57 +149,37 @@ private Mono> listByInstanceSinglePag .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance along - * with {@link PagedResponse} on successful completion of {@link Mono}. + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -230,132 +190,113 @@ private Mono> listByInstanceSinglePag .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedFlux}. + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedFlux}. + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -370,33 +311,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @param context The context to associate with this operation. @@ -404,16 +333,14 @@ public 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 server trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -428,70 +355,60 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, certificateName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server trust certificate that was uploaded from box to Sql Managed Instance on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String managedInstanceName, String certificateName) { + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String certificateName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, certificateName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with {@link - * Response}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String certificateName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, certificateName, context).block(); } /** * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -500,16 +417,16 @@ public Response getWithResponse( * @return a server trust certificate that was uploaded from box to Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerTrustCertificateInner get( - String resourceGroupName, String managedInstanceName, String certificateName) { + public ServerTrustCertificateInner get(String resourceGroupName, String managedInstanceName, + String certificateName) { return getWithResponse(resourceGroupName, managedInstanceName, certificateName, Context.NONE).getValue(); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -517,19 +434,14 @@ public ServerTrustCertificateInner 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 server trust certificate imported from box to enable connection between box and Sql Managed Instance - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -544,10 +456,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -556,27 +466,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -585,20 +485,14 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -613,10 +507,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -625,24 +517,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -650,31 +533,24 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerTrustCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, + String resourceGroupName, String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, certificateName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerTrustCertificateInner.class, - ServerTrustCertificateInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, certificateName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerTrustCertificateInner.class, ServerTrustCertificateInner.class, + this.client.getContext()); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -683,34 +559,25 @@ public PollerFlux, ServerTrustCertificat * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerTrustCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context) { + String resourceGroupName, String managedInstanceName, String certificateName, + ServerTrustCertificateInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, managedInstanceName, certificateName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerTrustCertificateInner.class, - ServerTrustCertificateInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, + certificateName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerTrustCertificateInner.class, ServerTrustCertificateInner.class, + context); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -718,23 +585,21 @@ private PollerFlux, ServerTrustCertifica * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerTrustCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, + String resourceGroupName, String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters) .getSyncPoller(); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -743,24 +608,22 @@ public SyncPoller, ServerTrustCertificat * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of server trust certificate imported from box to enable connection - * between box and Sql Managed Instance. + * between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerTrustCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters, context) + String resourceGroupName, String managedInstanceName, String certificateName, + ServerTrustCertificateInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters, context) .getSyncPoller(); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -768,24 +631,20 @@ public SyncPoller, ServerTrustCertificat * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -794,15 +653,11 @@ public Mono createOrUpdateAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -810,9 +665,9 @@ private Mono createOrUpdateAsync( /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -822,19 +677,16 @@ private Mono createOrUpdateAsync( * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerTrustCertificateInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters) { + public ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters).block(); } /** * Uploads a server trust certificate from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. @@ -845,21 +697,17 @@ public ServerTrustCertificateInner createOrUpdate( * @return server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerTrustCertificateInner createOrUpdate( - String resourceGroupName, - String managedInstanceName, - String certificateName, - ServerTrustCertificateInner parameters, - Context context) { + public ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String certificateName, ServerTrustCertificateInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, certificateName, parameters, context) .block(); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -868,13 +716,11 @@ public ServerTrustCertificateInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -889,31 +735,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -923,13 +758,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -944,28 +777,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - certificateName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, certificateName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -974,21 +798,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String certificateName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, certificateName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String certificateName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, certificateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -998,21 +820,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String certificateName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, managedInstanceName, certificateName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, certificateName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1021,16 +842,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String certificateName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String certificateName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName).getSyncPoller(); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -1040,16 +861,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String certificateName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName, context).getSyncPoller(); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1059,16 +880,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String certificateName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName) - .last() + return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -1078,18 +898,17 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String managedInstanceName, String certificateName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String certificateName, + Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, certificateName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1103,9 +922,9 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to delete. * @param context The context to associate with this operation. @@ -1120,14 +939,13 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates in instance along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -1135,62 +953,42 @@ private Mono> listByInstanceNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of server trust certificates in instance along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java index a1b7712687967..eff3aaebffd74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerTrustGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerTrustGroupsClient. + */ public final class ServerTrustGroupsClientImpl implements ServerTrustGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerTrustGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerTrustGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerTrustGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerTrustGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerTrustGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,110 +70,78 @@ public final class ServerTrustGroupsClientImpl implements ServerTrustGroupsClien @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerTrustGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/serverTrustGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/serverTrustGroups/{serverTrustGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("serverTrustGroupName") String serverTrustGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/serverTrustGroups/{serverTrustGroupName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("serverTrustGroupName") String serverTrustGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerTrustGroupInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerTrustGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations" - + "/{locationName}/serverTrustGroups/{serverTrustGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("locationName") String locationName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("serverTrustGroupName") String serverTrustGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/serverTrustGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("$host") String endpoint, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -175,13 +149,11 @@ Mono> listByInstanceNext( * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName) { + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -191,41 +163,23 @@ private Mono> listByLocationSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,13 +188,11 @@ private Mono> listByLocationSinglePageAsync * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName, Context context) { + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -250,38 +202,23 @@ private Mono> listByLocationSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - resourceGroupName, - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -290,16 +227,15 @@ private Mono> listByLocationSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,18 +244,17 @@ public PagedFlux listByLocationAsync(String resourceGroup * @return a list of server trust groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync( - String resourceGroupName, String locationName, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), + private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -333,9 +268,9 @@ public PagedIterable listByLocation(String resourceGroupN /** * Lists a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,16 +279,16 @@ public PagedIterable listByLocation(String resourceGroupN * @return a list of server trust groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation( - String resourceGroupName, String locationName, Context context) { + public PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context) { return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); } /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,13 +297,11 @@ public PagedIterable listByLocation( * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,33 +315,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -418,13 +339,11 @@ public Mono> getWithResponseAsync( * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -438,30 +357,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,17 +379,17 @@ private Mono> getWithResponseAsync( * @return a server trust group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String locationName, String serverTrustGroupName) { + public Mono getAsync(String resourceGroupName, String locationName, + String serverTrustGroupName) { return getWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -490,16 +399,16 @@ public Mono getAsync( * @return a server trust group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context) { return getWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, context).block(); } /** * Gets a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -514,9 +423,9 @@ public ServerTrustGroupInner get(String resourceGroupName, String locationName, /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -526,13 +435,11 @@ public ServerTrustGroupInner get(String resourceGroupName, String locationName, * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -546,10 +453,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -558,27 +463,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -589,17 +484,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a server trust group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -613,10 +502,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -625,24 +512,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -654,23 +532,18 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerTrustGroupInner> beginCreateOrUpdateAsync( String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServerTrustGroupInner.class, - ServerTrustGroupInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerTrustGroupInner.class, ServerTrustGroupInner.class, + this.client.getContext()); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -682,25 +555,20 @@ public PollerFlux, ServerTrustGroupInner> begi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerTrustGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, + String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerTrustGroupInner.class, ServerTrustGroupInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, locationName, + serverTrustGroupName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerTrustGroupInner.class, ServerTrustGroupInner.class, context); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -712,15 +580,15 @@ private PollerFlux, ServerTrustGroupInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate( String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters) .getSyncPoller(); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -732,20 +600,17 @@ public SyncPoller, ServerTrustGroupInner> begi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerTrustGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, + String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters, context) .getSyncPoller(); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -755,18 +620,17 @@ public SyncPoller, ServerTrustGroupInner> begi * @return a server trust group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -777,12 +641,8 @@ public Mono createOrUpdateAsync( * @return a server trust group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -790,9 +650,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -802,16 +662,16 @@ private Mono createOrUpdateAsync( * @return a server trust group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerTrustGroupInner createOrUpdate( - String resourceGroupName, String locationName, String serverTrustGroupName, ServerTrustGroupInner parameters) { + public ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters).block(); } /** * Creates or updates a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -822,20 +682,16 @@ public ServerTrustGroupInner createOrUpdate( * @return a server trust group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerTrustGroupInner createOrUpdate( - String resourceGroupName, - String locationName, - String serverTrustGroupName, - ServerTrustGroupInner parameters, - Context context) { + public ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationName, + String serverTrustGroupName, ServerTrustGroupInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, locationName, serverTrustGroupName, parameters, context).block(); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -844,13 +700,11 @@ public ServerTrustGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -864,31 +718,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -898,13 +741,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -918,28 +759,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter serverTrustGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - locationName, - serverTrustGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,21 +780,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String serverTrustGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String serverTrustGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -972,21 +802,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, locationName, serverTrustGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -995,16 +824,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String serverTrustGroupName) { - return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String serverTrustGroupName) { + return this.beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName).getSyncPoller(); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -1014,16 +843,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String locationName, + String serverTrustGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName, context).getSyncPoller(); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1033,16 +862,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String locationName, String serverTrustGroupName) { - return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName) - .last() + return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -1052,18 +880,17 @@ public Mono deleteAsync(String resourceGroupName, String locationName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String locationName, String serverTrustGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String locationName, String serverTrustGroupName, + Context context) { + return beginDeleteAsync(resourceGroupName, locationName, serverTrustGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1077,9 +904,9 @@ public void delete(String resourceGroupName, String locationName, String serverT /** * Deletes a server trust group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -1094,24 +921,22 @@ public void delete(String resourceGroupName, String locationName, String serverT /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 server trust groups by instance name along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1122,57 +947,37 @@ private Mono> listByInstanceSinglePageAsync .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a server trust groups by instance name along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1183,38 +988,23 @@ private Mono> listByInstanceSinglePageAsync .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstance( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1223,16 +1013,15 @@ private Mono> listByInstanceSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1241,18 +1030,17 @@ public PagedFlux listByInstanceAsync(String resourceGroup * @return a server trust groups by instance name as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1266,9 +1054,9 @@ public PagedIterable listByInstance(String resourceGroupN /** * Gets a server trust groups by instance name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1277,16 +1065,15 @@ public PagedIterable listByInstance(String resourceGroupN * @return a server trust groups by instance name as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance( - String resourceGroupName, String managedInstanceName, Context context) { + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context) { return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1298,31 +1085,21 @@ private Mono> listByLocationNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1330,37 +1107,26 @@ private Mono> listByLocationNextSinglePageA * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1372,31 +1138,21 @@ private Mono> listByInstanceNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1404,29 +1160,19 @@ private Mono> listByInstanceNextSinglePageA * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByInstanceNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java index b345206b3f784..5d03b525f9c66 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.ServerUsageListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerUsagesClient. + */ public final class ServerUsagesClientImpl implements ServerUsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerUsagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerUsagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerUsagesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(ServerUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ServerUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,37 +62,29 @@ public final class ServerUsagesClientImpl implements ServerUsagesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerUsagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/usages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -94,13 +92,11 @@ Mono> listByServerNext( * @return server usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -110,41 +106,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,13 +131,11 @@ private Mono> listByServerSinglePageAsync( * @return server usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,38 +145,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -209,16 +170,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,18 +187,17 @@ public PagedFlux listByServerAsync(String resourceGroupName, S * @return server usages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -252,9 +211,9 @@ public PagedIterable listByServer(String resourceGroupName, St /** * Gets server usages. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,9 +228,8 @@ public PagedIterable listByServer(String resourceGroupName, St /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -283,31 +241,21 @@ private Mono> listByServerNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -320,23 +268,13 @@ private Mono> listByServerNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java index afc9efeb68126..b37a3498485b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java @@ -34,26 +34,28 @@ import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ServerVulnerabilityAssessmentsClient. + */ public final class ServerVulnerabilityAssessmentsClientImpl implements ServerVulnerabilityAssessmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServerVulnerabilityAssessmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServerVulnerabilityAssessmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServerVulnerabilityAssessmentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - ServerVulnerabilityAssessmentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ServerVulnerabilityAssessmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -64,100 +66,73 @@ public final class ServerVulnerabilityAssessmentsClientImpl implements ServerVul @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServerVulnerabilityAssessmentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/vulnerabilityAssessments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerVulnerabilityAssessmentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,57 +142,37 @@ private Mono> listByServerSing return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,38 +182,23 @@ private Mono> listByServerSing return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -266,18 +206,17 @@ private Mono> listByServerSing * @return a list of the server's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync( - String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,18 +225,17 @@ public PagedFlux listByServerAsync( * @return a list of the server's vulnerability assessments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,9 +249,9 @@ public PagedIterable listByServer(String res /** * Lists the vulnerability assessment policies associated with a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -322,32 +260,30 @@ public PagedIterable listByServer(String res * @return a list of the server's vulnerability assessments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the server's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the server's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,59 +293,39 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @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 server's vulnerability assessment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the server's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,36 +335,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, vulnerabilityAssessmentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -457,17 +361,17 @@ private Mono> getWithResponseAsync( * @return the server's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono getAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -477,19 +381,16 @@ public Mono getAsync( * @return the server's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, context).block(); } /** * Gets the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -498,8 +399,8 @@ public Response getWithResponse( * @return the server's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerVulnerabilityAssessmentInner get( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public ServerVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, Context.NONE).getValue(); } @@ -507,9 +408,9 @@ public ServerVulnerabilityAssessmentInner get( * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -519,16 +420,12 @@ public ServerVulnerabilityAssessmentInner get( * @return a server vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -538,16 +435,12 @@ public Mono> createOrUpdateWithResp return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -556,19 +449,9 @@ public Mono> createOrUpdateWithResp } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -576,9 +459,9 @@ public Mono> createOrUpdateWithResp * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -589,17 +472,12 @@ public Mono> createOrUpdateWithResp * @return a server vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + ServerVulnerabilityAssessmentInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -609,16 +487,12 @@ private Mono> createOrUpdateWithRes return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -627,26 +501,18 @@ private Mono> createOrUpdateWithRes } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -656,11 +522,8 @@ private Mono> createOrUpdateWithRes * @return a server vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -669,9 +532,9 @@ public Mono createOrUpdateAsync( * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -682,24 +545,20 @@ public Mono createOrUpdateAsync( * @return a server vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + ServerVulnerabilityAssessmentInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, + context).block(); } /** * Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. @@ -709,21 +568,17 @@ public Response createOrUpdateWithResponse( * @return a server vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerVulnerabilityAssessmentInner createOrUpdate( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - ServerVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, Context.NONE) - .getValue(); + public ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, ServerVulnerabilityAssessmentInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, + Context.NONE).getValue(); } /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -732,13 +587,11 @@ public ServerVulnerabilityAssessmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -748,37 +601,24 @@ public Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -788,16 +628,11 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -807,34 +642,23 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (vulnerabilityAssessmentName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter vulnerabilityAssessmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - vulnerabilityAssessmentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, vulnerabilityAssessmentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -843,17 +667,17 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono deleteAsync(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName) .flatMap(ignored -> Mono.empty()); } /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. @@ -863,19 +687,16 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, context).block(); } /** * Removes the server's vulnerability assessment. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -883,21 +704,20 @@ public Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public void delete(String resourceGroupName, String serverName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { deleteWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, Context.NONE); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -905,62 +725,42 @@ private Mono> listByServerNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java index 24f3c339c44fe..64d3effe88754 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java @@ -48,21 +48,24 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ServersClient. */ -public final class ServersClientImpl - implements InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete, - ServersClient { - /** The proxy service used to perform REST calls. */ +/** + * An instance of this class provides access to all the operations defined in ServersClient. + */ +public final class ServersClientImpl implements InnerSupportsGet, InnerSupportsListing, + InnerSupportsDelete, ServersClient { + /** + * The proxy service used to perform REST calls. + */ private final ServersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of ServersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServersClientImpl(SqlManagementClientImpl client) { @@ -77,166 +80,116 @@ public final class ServersClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface ServersService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}") - @ExpectedResponses({200}) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @QueryParam("$expand") String expand, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}") - @ExpectedResponses({200, 201, 202}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerInner parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerUpdate parameters, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/import") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ImportNewDatabaseDefinition parameters, - @HeaderParam("Accept") String accept, + Mono>> importDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ImportNewDatabaseDefinition parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkNameAvailabilityWithResponseAsync( - CheckNameAvailabilityRequest parameters) { + public Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -245,44 +198,32 @@ public Mono> checkNameAvailabilityW } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - CheckNameAvailabilityRequest parameters, Context context) { + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -291,19 +232,13 @@ private Mono> checkNameAvailability } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,14 +246,14 @@ private Mono> checkNameAvailability * @return the result of a name availability check on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkNameAvailabilityAsync( - CheckNameAvailabilityRequest parameters) { + public Mono + checkNameAvailabilityAsync(CheckNameAvailabilityRequest parameters) { return checkNameAvailabilityWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,14 +262,14 @@ public Mono checkNameAvailabilityAsync( * @return the result of a name availability check along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest parameters, Context context) { + public Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context) { return checkNameAvailabilityWithResponseAsync(parameters, context).block(); } /** * Determines whether a resource can be created with the specified name. - * + * * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -348,101 +283,66 @@ public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailab /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -456,7 +356,7 @@ public PagedFlux listAsync(String expand) { /** * Gets a list of all servers 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 a list of all servers in the subscription as paginated response with {@link PagedFlux}. @@ -469,7 +369,7 @@ public PagedFlux listAsync() { /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -479,13 +379,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String expand, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(expand, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all servers 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 a list of all servers in the subscription as paginated response with {@link PagedIterable}. @@ -498,7 +398,7 @@ public PagedIterable list() { /** * Gets a list of all servers in the subscription. - * + * * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -513,119 +413,82 @@ public PagedIterable list(String expand, Context context) { /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of servers in a resource groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of servers in a resource groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, String expand, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -634,16 +497,15 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -652,16 +514,15 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String expand = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -671,16 +532,15 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -694,9 +554,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) /** * Gets a list of servers in a resource groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -711,9 +571,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName, /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -722,13 +582,11 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String serverName, String expand) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -738,33 +596,21 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serverName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -774,13 +620,11 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String serverName, String expand, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -790,30 +634,20 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - expand, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serverName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -829,9 +663,9 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. @@ -841,16 +675,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin * @return a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String serverName, String expand, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, + String expand, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, serverName, expand, context).block(); } /** * Gets a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -865,9 +699,9 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -876,13 +710,11 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -892,10 +724,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -904,26 +734,16 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -933,13 +753,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, ServerInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -949,10 +767,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -961,23 +777,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -986,21 +794,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); + public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, this.client.getContext()); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1010,22 +816,20 @@ public PollerFlux, ServerInner> beginCreateOrUpdateAsync * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, ServerInner parameters, Context context) { + private PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, context); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1034,16 +838,16 @@ private PollerFlux, ServerInner> beginCreateOrUpdateAsyn * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1053,16 +857,16 @@ public SyncPoller, ServerInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, ServerInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1072,16 +876,15 @@ public SyncPoller, ServerInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1091,18 +894,17 @@ public Mono createOrUpdateAsync(String resourceGroupName, String se * @return an Azure SQL Database server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, ServerInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1117,9 +919,9 @@ public ServerInner createOrUpdate(String resourceGroupName, String serverName, S /** * Creates or updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1129,16 +931,16 @@ public ServerInner createOrUpdate(String resourceGroupName, String serverName, S * @return an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner createOrUpdate( - String resourceGroupName, String serverName, ServerInner parameters, Context context) { + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1148,10 +950,8 @@ public ServerInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1161,30 +961,20 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1193,13 +983,11 @@ public Mono>> deleteWithResponseAsync(String resourceG * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1209,27 +997,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1239,17 +1019,15 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1258,20 +1036,19 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1280,14 +1057,14 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName) { - return beginDeleteAsync(resourceGroupName, serverName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, serverName).getSyncPoller(); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1296,16 +1073,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, context).getSyncPoller(); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1319,9 +1096,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName) { /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1331,16 +1108,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1353,9 +1129,9 @@ public void delete(String resourceGroupName, String serverName) { /** * Deletes a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1369,9 +1145,9 @@ public void delete(String resourceGroupName, String serverName, Context context) /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1380,13 +1156,11 @@ public void delete(String resourceGroupName, String serverName, Context context) * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1396,10 +1170,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1408,26 +1180,16 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1437,13 +1199,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1453,10 +1213,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1465,23 +1223,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1490,20 +1240,18 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginUpdateAsync( - String resourceGroupName, String serverName, ServerUpdate parameters) { + public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, + String serverName, ServerUpdate parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, this.client.getContext()); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1513,22 +1261,20 @@ public PollerFlux, ServerInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerInner> beginUpdateAsync( - String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { + private PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, + String serverName, ServerUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, context); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1537,16 +1283,16 @@ private PollerFlux, ServerInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginUpdate( - String resourceGroupName, String serverName, ServerUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1556,16 +1302,16 @@ public SyncPoller, ServerInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginUpdate( - String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1575,16 +1321,15 @@ public SyncPoller, ServerInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, parameters) - .last() + return beginUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1594,18 +1339,17 @@ public Mono updateAsync(String resourceGroupName, String serverName * @return an Azure SQL Database server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1620,9 +1364,9 @@ public ServerInner update(String resourceGroupName, String serverName, ServerUpd /** * Updates a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -1638,25 +1382,23 @@ public ServerInner update(String resourceGroupName, String serverName, ServerUpd /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> importDatabaseWithResponseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { + public Mono>> importDatabaseWithResponseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1666,10 +1408,8 @@ public Mono>> importDatabaseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1678,43 +1418,31 @@ public Mono>> importDatabaseWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .importDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.importDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return an ImportExport operation result resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> importDatabaseWithResponseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context) { + private Mono>> importDatabaseWithResponseAsync(String resourceGroupName, + String serverName, ImportNewDatabaseDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1724,10 +1452,8 @@ private Mono>> importDatabaseWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1736,23 +1462,15 @@ private Mono>> importDatabaseWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .importDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.importDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1763,23 +1481,18 @@ private Mono>> importDatabaseWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ImportExportOperationResultInner> beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { - Mono>> mono = - importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - this.client.getContext()); + Mono>> mono + = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, this.client.getContext()); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -1790,26 +1503,21 @@ private Mono>> importDatabaseWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ImportExportOperationResultInner> - beginImportDatabaseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context) { + beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, - context); + Mono>> mono + = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, context); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1820,14 +1528,14 @@ private Mono>> importDatabaseWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -1838,16 +1546,16 @@ private Mono>> importDatabaseWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ImportExportOperationResultInner> - beginImportDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, + Context context) { + return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1856,18 +1564,17 @@ private Mono>> importDatabaseWithResponseAsync( * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono importDatabaseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters) - .last() + public Mono importDatabaseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { + return beginImportDatabaseAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -1877,18 +1584,17 @@ public Mono importDatabaseAsync( * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono importDatabaseAsync( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono importDatabaseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters, Context context) { + return beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1897,16 +1603,16 @@ private Mono importDatabaseAsync( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { + public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { return importDatabaseAsync(resourceGroupName, serverName, parameters).block(); } /** * Imports a bacpac into a new database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -1916,16 +1622,15 @@ public ImportExportOperationResultInner importDatabase( * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importDatabase( - String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context) { + public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters, Context context) { return importDatabaseAsync(resourceGroupName, serverName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1937,31 +1642,20 @@ private Mono> listNextSinglePageAsync(String nextLink return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1974,31 +1668,20 @@ private Mono> listNextSinglePageAsync(String nextLink return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2010,32 +1693,22 @@ private Mono> listByResourceGroupNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -2048,23 +1721,13 @@ private Mono> listByResourceGroupNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java index 727b9e5022b90..9d6357e41728f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java @@ -27,22 +27,28 @@ import com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SqlAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SqlAgentsClient. + */ public final class SqlAgentsClientImpl implements SqlAgentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SqlAgentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SqlAgentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SqlAgentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SqlAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SqlAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -53,58 +59,46 @@ public final class SqlAgentsClientImpl implements SqlAgentsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SqlAgentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/sqlAgent/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/managedInstances/{managedInstanceName}/sqlAgent/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SqlAgentConfigurationInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SqlAgentConfigurationInner parameters, @HeaderParam("Accept") String accept, Context context); } /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return current instance sql agent configuration along with {@link Response} on successful completion of {@link - * Mono}. + * @return current instance sql agent configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -115,48 +109,35 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 current instance sql agent configuration along with {@link Response} on successful completion of {@link - * Mono}. + * @return current instance sql agent configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,29 +148,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -204,9 +176,9 @@ public Mono getAsync(String resourceGroupName, Strin /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -215,16 +187,16 @@ public Mono getAsync(String resourceGroupName, Strin * @return current instance sql agent configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String managedInstanceName, Context context) { + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, context).block(); } /** * Gets current instance sql agent configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -238,25 +210,23 @@ public SqlAgentConfigurationInner get(String resourceGroupName, String managedIn /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SqlAgentConfigurationInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -267,10 +237,8 @@ public Mono> createOrUpdateWithResponseAsyn .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -280,42 +248,31 @@ public Mono> createOrUpdateWithResponseAsyn final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, SqlAgentConfigurationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -326,10 +283,8 @@ private Mono> createOrUpdateWithResponseAsy .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -338,44 +293,36 @@ private Mono> createOrUpdateWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - managedInstanceName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + SqlAgentConfigurationInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -383,26 +330,26 @@ public Mono createOrUpdateAsync( * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, SqlAgentConfigurationInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } /** * Puts new sql agent configuration to instance. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters A recoverable managed database resource. + * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a recoverable managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SqlAgentConfigurationInner createOrUpdate( - String resourceGroupName, String managedInstanceName, SqlAgentConfigurationInner parameters) { + public SqlAgentConfigurationInner createOrUpdate(String resourceGroupName, String managedInstanceName, + SqlAgentConfigurationInner parameters) { return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java index b97b027b16186..be24054ce1584 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the SqlManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {SqlManagementClientImpl.class}) +/** + * A builder for creating a new instance of the SqlManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { SqlManagementClientImpl.class }) public final class SqlManagementClientBuilder { /* * The subscription ID that identifies an Azure subscription. @@ -24,7 +26,7 @@ public final class SqlManagementClientBuilder { /** * Sets The subscription ID that identifies an Azure subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the SqlManagementClientBuilder. */ @@ -40,7 +42,7 @@ public SqlManagementClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the SqlManagementClientBuilder. */ @@ -56,7 +58,7 @@ public SqlManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the SqlManagementClientBuilder. */ @@ -72,7 +74,7 @@ public SqlManagementClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the SqlManagementClientBuilder. */ @@ -88,7 +90,7 @@ public SqlManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the SqlManagementClientBuilder. */ @@ -104,7 +106,7 @@ public SqlManagementClientBuilder defaultPollInterval(Duration defaultPollInterv /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the SqlManagementClientBuilder. */ @@ -115,30 +117,22 @@ public SqlManagementClientBuilder serializerAdapter(SerializerAdapter serializer /** * Builds an instance of SqlManagementClientImpl with the provided parameters. - * + * * @return an instance of SqlManagementClientImpl. */ public SqlManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - SqlManagementClientImpl client = - new SqlManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + 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(); + SqlManagementClientImpl client = new SqlManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java index b43d464da869e..080ebdaadb8cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java @@ -11,9 +11,6 @@ import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import com.azure.resourcemanager.sql.fluent.BackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.CapabilitiesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; -import com.azure.resourcemanager.sql.fluent.DataWarehouseUserActivitiesOperationsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAdvisorsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAutomaticTuningsClient; @@ -23,13 +20,16 @@ import com.azure.resourcemanager.sql.fluent.DatabaseOperationsClient; import com.azure.resourcemanager.sql.fluent.DatabaseRecommendedActionsClient; import com.azure.resourcemanager.sql.fluent.DatabaseSchemasClient; +import com.azure.resourcemanager.sql.fluent.DatabasesClient; import com.azure.resourcemanager.sql.fluent.DatabaseSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.DatabaseTablesClient; import com.azure.resourcemanager.sql.fluent.DatabaseUsagesClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentRuleBaselinesClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.DatabasesClient; +import com.azure.resourcemanager.sql.fluent.DataMaskingPoliciesClient; +import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; +import com.azure.resourcemanager.sql.fluent.DataWarehouseUserActivitiesOperationsClient; import com.azure.resourcemanager.sql.fluent.DeletedServersClient; import com.azure.resourcemanager.sql.fluent.DistributedAvailabilityGroupsClient; import com.azure.resourcemanager.sql.fluent.ElasticPoolOperationsClient; @@ -41,18 +41,18 @@ import com.azure.resourcemanager.sql.fluent.FailoverGroupsClient; import com.azure.resourcemanager.sql.fluent.FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.GeoBackupPoliciesClient; -import com.azure.resourcemanager.sql.fluent.IPv6FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.InstanceFailoverGroupsClient; import com.azure.resourcemanager.sql.fluent.InstancePoolsClient; +import com.azure.resourcemanager.sql.fluent.IPv6FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.JobAgentsClient; import com.azure.resourcemanager.sql.fluent.JobCredentialsClient; import com.azure.resourcemanager.sql.fluent.JobExecutionsClient; +import com.azure.resourcemanager.sql.fluent.JobsClient; import com.azure.resourcemanager.sql.fluent.JobStepExecutionsClient; import com.azure.resourcemanager.sql.fluent.JobStepsClient; import com.azure.resourcemanager.sql.fluent.JobTargetExecutionsClient; import com.azure.resourcemanager.sql.fluent.JobTargetGroupsClient; import com.azure.resourcemanager.sql.fluent.JobVersionsClient; -import com.azure.resourcemanager.sql.fluent.JobsClient; import com.azure.resourcemanager.sql.fluent.LedgerDigestUploadsOperationsClient; import com.azure.resourcemanager.sql.fluent.LongTermRetentionBackupsClient; import com.azure.resourcemanager.sql.fluent.LongTermRetentionManagedInstanceBackupsClient; @@ -65,6 +65,7 @@ import com.azure.resourcemanager.sql.fluent.ManagedDatabaseRecommendedSensitivityLabelsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseRestoreDetailsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSchemasClient; +import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityEventsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSensitivityLabelsClient; @@ -73,7 +74,6 @@ import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdministratorsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAzureADOnlyAuthenticationsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceEncryptionProtectorsClient; @@ -82,9 +82,9 @@ import com.azure.resourcemanager.sql.fluent.ManagedInstanceOperationsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateEndpointConnectionsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateLinkResourcesClient; +import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceTdeCertificatesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; import com.azure.resourcemanager.sql.fluent.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.ManagedServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.ManagedServerSecurityAlertPoliciesClient; @@ -111,12 +111,12 @@ import com.azure.resourcemanager.sql.fluent.ServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.ServerKeysClient; import com.azure.resourcemanager.sql.fluent.ServerOperationsClient; +import com.azure.resourcemanager.sql.fluent.ServersClient; import com.azure.resourcemanager.sql.fluent.ServerSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.ServerTrustCertificatesClient; import com.azure.resourcemanager.sql.fluent.ServerTrustGroupsClient; import com.azure.resourcemanager.sql.fluent.ServerUsagesClient; import com.azure.resourcemanager.sql.fluent.ServerVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ServersClient; import com.azure.resourcemanager.sql.fluent.SqlAgentsClient; import com.azure.resourcemanager.sql.fluent.SqlManagementClient; import com.azure.resourcemanager.sql.fluent.SubscriptionUsagesClient; @@ -133,844 +133,985 @@ import com.azure.resourcemanager.sql.fluent.WorkloadGroupsClient; import java.time.Duration; -/** Initializes a new instance of the SqlManagementClientImpl type. */ +/** + * Initializes a new instance of the SqlManagementClientImpl type. + */ @ServiceClient(builder = SqlManagementClientBuilder.class) public final class SqlManagementClientImpl extends AzureServiceClient implements SqlManagementClient { - /** The subscription ID that identifies an Azure subscription. */ + /** + * The subscription ID that identifies an Azure subscription. + */ private final String subscriptionId; /** * Gets The subscription ID that identifies an Azure subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The BackupShortTermRetentionPoliciesClient object to access its operations. */ + /** + * The BackupShortTermRetentionPoliciesClient object to access its operations. + */ private final BackupShortTermRetentionPoliciesClient backupShortTermRetentionPolicies; /** * Gets the BackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the BackupShortTermRetentionPoliciesClient object. */ public BackupShortTermRetentionPoliciesClient getBackupShortTermRetentionPolicies() { return this.backupShortTermRetentionPolicies; } - /** The ServerBlobAuditingPoliciesClient object to access its operations. */ + /** + * The ServerBlobAuditingPoliciesClient object to access its operations. + */ private final ServerBlobAuditingPoliciesClient serverBlobAuditingPolicies; /** * Gets the ServerBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ServerBlobAuditingPoliciesClient object. */ public ServerBlobAuditingPoliciesClient getServerBlobAuditingPolicies() { return this.serverBlobAuditingPolicies; } - /** The DatabaseBlobAuditingPoliciesClient object to access its operations. */ + /** + * The DatabaseBlobAuditingPoliciesClient object to access its operations. + */ private final DatabaseBlobAuditingPoliciesClient databaseBlobAuditingPolicies; /** * Gets the DatabaseBlobAuditingPoliciesClient object to access its operations. - * + * * @return the DatabaseBlobAuditingPoliciesClient object. */ public DatabaseBlobAuditingPoliciesClient getDatabaseBlobAuditingPolicies() { return this.databaseBlobAuditingPolicies; } - /** The ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. */ + /** + * The ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. + */ private final ExtendedDatabaseBlobAuditingPoliciesClient extendedDatabaseBlobAuditingPolicies; /** * Gets the ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ExtendedDatabaseBlobAuditingPoliciesClient object. */ public ExtendedDatabaseBlobAuditingPoliciesClient getExtendedDatabaseBlobAuditingPolicies() { return this.extendedDatabaseBlobAuditingPolicies; } - /** The ExtendedServerBlobAuditingPoliciesClient object to access its operations. */ + /** + * The ExtendedServerBlobAuditingPoliciesClient object to access its operations. + */ private final ExtendedServerBlobAuditingPoliciesClient extendedServerBlobAuditingPolicies; /** * Gets the ExtendedServerBlobAuditingPoliciesClient object to access its operations. - * + * * @return the ExtendedServerBlobAuditingPoliciesClient object. */ public ExtendedServerBlobAuditingPoliciesClient getExtendedServerBlobAuditingPolicies() { return this.extendedServerBlobAuditingPolicies; } - /** The DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. */ + /** + * The DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + */ private final DatabaseAdvancedThreatProtectionSettingsClient databaseAdvancedThreatProtectionSettings; /** * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. - * + * * @return the DatabaseAdvancedThreatProtectionSettingsClient object. */ public DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings() { return this.databaseAdvancedThreatProtectionSettings; } - /** The DatabaseAdvisorsClient object to access its operations. */ + /** + * The DatabaseAdvisorsClient object to access its operations. + */ private final DatabaseAdvisorsClient databaseAdvisors; /** * Gets the DatabaseAdvisorsClient object to access its operations. - * + * * @return the DatabaseAdvisorsClient object. */ public DatabaseAdvisorsClient getDatabaseAdvisors() { return this.databaseAdvisors; } - /** The DatabaseAutomaticTuningsClient object to access its operations. */ + /** + * The DatabaseAutomaticTuningsClient object to access its operations. + */ private final DatabaseAutomaticTuningsClient databaseAutomaticTunings; /** * Gets the DatabaseAutomaticTuningsClient object to access its operations. - * + * * @return the DatabaseAutomaticTuningsClient object. */ public DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings() { return this.databaseAutomaticTunings; } - /** The DatabaseColumnsClient object to access its operations. */ + /** + * The DatabaseColumnsClient object to access its operations. + */ private final DatabaseColumnsClient databaseColumns; /** * Gets the DatabaseColumnsClient object to access its operations. - * + * * @return the DatabaseColumnsClient object. */ public DatabaseColumnsClient getDatabaseColumns() { return this.databaseColumns; } - /** The DatabaseExtensionsOperationsClient object to access its operations. */ + /** + * The DatabaseExtensionsOperationsClient object to access its operations. + */ private final DatabaseExtensionsOperationsClient databaseExtensionsOperations; /** * Gets the DatabaseExtensionsOperationsClient object to access its operations. - * + * * @return the DatabaseExtensionsOperationsClient object. */ public DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations() { return this.databaseExtensionsOperations; } - /** The DatabaseOperationsClient object to access its operations. */ + /** + * The DatabaseOperationsClient object to access its operations. + */ private final DatabaseOperationsClient databaseOperations; /** * Gets the DatabaseOperationsClient object to access its operations. - * + * * @return the DatabaseOperationsClient object. */ public DatabaseOperationsClient getDatabaseOperations() { return this.databaseOperations; } - /** The DatabaseRecommendedActionsClient object to access its operations. */ + /** + * The DatabaseRecommendedActionsClient object to access its operations. + */ private final DatabaseRecommendedActionsClient databaseRecommendedActions; /** * Gets the DatabaseRecommendedActionsClient object to access its operations. - * + * * @return the DatabaseRecommendedActionsClient object. */ public DatabaseRecommendedActionsClient getDatabaseRecommendedActions() { return this.databaseRecommendedActions; } - /** The DatabasesClient object to access its operations. */ + /** + * The DatabasesClient object to access its operations. + */ private final DatabasesClient databases; /** * Gets the DatabasesClient object to access its operations. - * + * * @return the DatabasesClient object. */ public DatabasesClient getDatabases() { return this.databases; } - /** The DatabaseSchemasClient object to access its operations. */ + /** + * The DatabaseSchemasClient object to access its operations. + */ private final DatabaseSchemasClient databaseSchemas; /** * Gets the DatabaseSchemasClient object to access its operations. - * + * * @return the DatabaseSchemasClient object. */ public DatabaseSchemasClient getDatabaseSchemas() { return this.databaseSchemas; } - /** The DatabaseSecurityAlertPoliciesClient object to access its operations. */ + /** + * The DatabaseSecurityAlertPoliciesClient object to access its operations. + */ private final DatabaseSecurityAlertPoliciesClient databaseSecurityAlertPolicies; /** * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. - * + * * @return the DatabaseSecurityAlertPoliciesClient object. */ public DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies() { return this.databaseSecurityAlertPolicies; } - /** The DatabaseTablesClient object to access its operations. */ + /** + * The DatabaseTablesClient object to access its operations. + */ private final DatabaseTablesClient databaseTables; /** * Gets the DatabaseTablesClient object to access its operations. - * + * * @return the DatabaseTablesClient object. */ public DatabaseTablesClient getDatabaseTables() { return this.databaseTables; } - /** The DatabaseUsagesClient object to access its operations. */ + /** + * The DatabaseUsagesClient object to access its operations. + */ private final DatabaseUsagesClient databaseUsages; /** * Gets the DatabaseUsagesClient object to access its operations. - * + * * @return the DatabaseUsagesClient object. */ public DatabaseUsagesClient getDatabaseUsages() { return this.databaseUsages; } - /** The DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. */ + /** + * The DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. + */ private final DatabaseVulnerabilityAssessmentRuleBaselinesClient databaseVulnerabilityAssessmentRuleBaselines; /** * Gets the DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ public DatabaseVulnerabilityAssessmentRuleBaselinesClient getDatabaseVulnerabilityAssessmentRuleBaselines() { return this.databaseVulnerabilityAssessmentRuleBaselines; } - /** The DatabaseVulnerabilityAssessmentsClient object to access its operations. */ + /** + * The DatabaseVulnerabilityAssessmentsClient object to access its operations. + */ private final DatabaseVulnerabilityAssessmentsClient databaseVulnerabilityAssessments; /** * Gets the DatabaseVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentsClient object. */ public DatabaseVulnerabilityAssessmentsClient getDatabaseVulnerabilityAssessments() { return this.databaseVulnerabilityAssessments; } - /** The DatabaseVulnerabilityAssessmentScansClient object to access its operations. */ + /** + * The DatabaseVulnerabilityAssessmentScansClient object to access its operations. + */ private final DatabaseVulnerabilityAssessmentScansClient databaseVulnerabilityAssessmentScans; /** * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. - * + * * @return the DatabaseVulnerabilityAssessmentScansClient object. */ public DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans() { return this.databaseVulnerabilityAssessmentScans; } - /** The DataMaskingPoliciesClient object to access its operations. */ + /** + * The DataMaskingPoliciesClient object to access its operations. + */ private final DataMaskingPoliciesClient dataMaskingPolicies; /** * Gets the DataMaskingPoliciesClient object to access its operations. - * + * * @return the DataMaskingPoliciesClient object. */ public DataMaskingPoliciesClient getDataMaskingPolicies() { return this.dataMaskingPolicies; } - /** The DataMaskingRulesClient object to access its operations. */ + /** + * The DataMaskingRulesClient object to access its operations. + */ private final DataMaskingRulesClient dataMaskingRules; /** * Gets the DataMaskingRulesClient object to access its operations. - * + * * @return the DataMaskingRulesClient object. */ public DataMaskingRulesClient getDataMaskingRules() { return this.dataMaskingRules; } - /** The DataWarehouseUserActivitiesOperationsClient object to access its operations. */ + /** + * The DataWarehouseUserActivitiesOperationsClient object to access its operations. + */ private final DataWarehouseUserActivitiesOperationsClient dataWarehouseUserActivitiesOperations; /** * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. - * + * * @return the DataWarehouseUserActivitiesOperationsClient object. */ public DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations() { return this.dataWarehouseUserActivitiesOperations; } - /** The DeletedServersClient object to access its operations. */ + /** + * The DeletedServersClient object to access its operations. + */ private final DeletedServersClient deletedServers; /** * Gets the DeletedServersClient object to access its operations. - * + * * @return the DeletedServersClient object. */ public DeletedServersClient getDeletedServers() { return this.deletedServers; } - /** The DistributedAvailabilityGroupsClient object to access its operations. */ + /** + * The DistributedAvailabilityGroupsClient object to access its operations. + */ private final DistributedAvailabilityGroupsClient distributedAvailabilityGroups; /** * Gets the DistributedAvailabilityGroupsClient object to access its operations. - * + * * @return the DistributedAvailabilityGroupsClient object. */ public DistributedAvailabilityGroupsClient getDistributedAvailabilityGroups() { return this.distributedAvailabilityGroups; } - /** The ElasticPoolOperationsClient object to access its operations. */ + /** + * The ElasticPoolOperationsClient object to access its operations. + */ private final ElasticPoolOperationsClient elasticPoolOperations; /** * Gets the ElasticPoolOperationsClient object to access its operations. - * + * * @return the ElasticPoolOperationsClient object. */ public ElasticPoolOperationsClient getElasticPoolOperations() { return this.elasticPoolOperations; } - /** The ElasticPoolsClient object to access its operations. */ + /** + * The ElasticPoolsClient object to access its operations. + */ private final ElasticPoolsClient elasticPools; /** * Gets the ElasticPoolsClient object to access its operations. - * + * * @return the ElasticPoolsClient object. */ public ElasticPoolsClient getElasticPools() { return this.elasticPools; } - /** The EncryptionProtectorsClient object to access its operations. */ + /** + * The EncryptionProtectorsClient object to access its operations. + */ private final EncryptionProtectorsClient encryptionProtectors; /** * Gets the EncryptionProtectorsClient object to access its operations. - * + * * @return the EncryptionProtectorsClient object. */ public EncryptionProtectorsClient getEncryptionProtectors() { return this.encryptionProtectors; } - /** The EndpointCertificatesClient object to access its operations. */ + /** + * The EndpointCertificatesClient object to access its operations. + */ private final EndpointCertificatesClient endpointCertificates; /** * Gets the EndpointCertificatesClient object to access its operations. - * + * * @return the EndpointCertificatesClient object. */ public EndpointCertificatesClient getEndpointCertificates() { return this.endpointCertificates; } - /** The FailoverGroupsClient object to access its operations. */ + /** + * The FailoverGroupsClient object to access its operations. + */ private final FailoverGroupsClient failoverGroups; /** * Gets the FailoverGroupsClient object to access its operations. - * + * * @return the FailoverGroupsClient object. */ public FailoverGroupsClient getFailoverGroups() { return this.failoverGroups; } - /** The FirewallRulesClient object to access its operations. */ + /** + * The FirewallRulesClient object to access its operations. + */ private final FirewallRulesClient firewallRules; /** * Gets the FirewallRulesClient object to access its operations. - * + * * @return the FirewallRulesClient object. */ public FirewallRulesClient getFirewallRules() { return this.firewallRules; } - /** The GeoBackupPoliciesClient object to access its operations. */ + /** + * The GeoBackupPoliciesClient object to access its operations. + */ private final GeoBackupPoliciesClient geoBackupPolicies; /** * Gets the GeoBackupPoliciesClient object to access its operations. - * + * * @return the GeoBackupPoliciesClient object. */ public GeoBackupPoliciesClient getGeoBackupPolicies() { return this.geoBackupPolicies; } - /** The InstanceFailoverGroupsClient object to access its operations. */ + /** + * The InstanceFailoverGroupsClient object to access its operations. + */ private final InstanceFailoverGroupsClient instanceFailoverGroups; /** * Gets the InstanceFailoverGroupsClient object to access its operations. - * + * * @return the InstanceFailoverGroupsClient object. */ public InstanceFailoverGroupsClient getInstanceFailoverGroups() { return this.instanceFailoverGroups; } - /** The InstancePoolsClient object to access its operations. */ + /** + * The InstancePoolsClient object to access its operations. + */ private final InstancePoolsClient instancePools; /** * Gets the InstancePoolsClient object to access its operations. - * + * * @return the InstancePoolsClient object. */ public InstancePoolsClient getInstancePools() { return this.instancePools; } - /** The IPv6FirewallRulesClient object to access its operations. */ + /** + * The IPv6FirewallRulesClient object to access its operations. + */ private final IPv6FirewallRulesClient iPv6FirewallRules; /** * Gets the IPv6FirewallRulesClient object to access its operations. - * + * * @return the IPv6FirewallRulesClient object. */ public IPv6FirewallRulesClient getIPv6FirewallRules() { return this.iPv6FirewallRules; } - /** The JobAgentsClient object to access its operations. */ + /** + * The JobAgentsClient object to access its operations. + */ private final JobAgentsClient jobAgents; /** * Gets the JobAgentsClient object to access its operations. - * + * * @return the JobAgentsClient object. */ public JobAgentsClient getJobAgents() { return this.jobAgents; } - /** The JobCredentialsClient object to access its operations. */ + /** + * The JobCredentialsClient object to access its operations. + */ private final JobCredentialsClient jobCredentials; /** * Gets the JobCredentialsClient object to access its operations. - * + * * @return the JobCredentialsClient object. */ public JobCredentialsClient getJobCredentials() { return this.jobCredentials; } - /** The JobExecutionsClient object to access its operations. */ + /** + * The JobExecutionsClient object to access its operations. + */ private final JobExecutionsClient jobExecutions; /** * Gets the JobExecutionsClient object to access its operations. - * + * * @return the JobExecutionsClient object. */ public JobExecutionsClient getJobExecutions() { return this.jobExecutions; } - /** The JobsClient object to access its operations. */ + /** + * The JobsClient object to access its operations. + */ private final JobsClient jobs; /** * Gets the JobsClient object to access its operations. - * + * * @return the JobsClient object. */ public JobsClient getJobs() { return this.jobs; } - /** The JobStepExecutionsClient object to access its operations. */ + /** + * The JobStepExecutionsClient object to access its operations. + */ private final JobStepExecutionsClient jobStepExecutions; /** * Gets the JobStepExecutionsClient object to access its operations. - * + * * @return the JobStepExecutionsClient object. */ public JobStepExecutionsClient getJobStepExecutions() { return this.jobStepExecutions; } - /** The JobStepsClient object to access its operations. */ + /** + * The JobStepsClient object to access its operations. + */ private final JobStepsClient jobSteps; /** * Gets the JobStepsClient object to access its operations. - * + * * @return the JobStepsClient object. */ public JobStepsClient getJobSteps() { return this.jobSteps; } - /** The JobTargetExecutionsClient object to access its operations. */ + /** + * The JobTargetExecutionsClient object to access its operations. + */ private final JobTargetExecutionsClient jobTargetExecutions; /** * Gets the JobTargetExecutionsClient object to access its operations. - * + * * @return the JobTargetExecutionsClient object. */ public JobTargetExecutionsClient getJobTargetExecutions() { return this.jobTargetExecutions; } - /** The JobTargetGroupsClient object to access its operations. */ + /** + * The JobTargetGroupsClient object to access its operations. + */ private final JobTargetGroupsClient jobTargetGroups; /** * Gets the JobTargetGroupsClient object to access its operations. - * + * * @return the JobTargetGroupsClient object. */ public JobTargetGroupsClient getJobTargetGroups() { return this.jobTargetGroups; } - /** The JobVersionsClient object to access its operations. */ + /** + * The JobVersionsClient object to access its operations. + */ private final JobVersionsClient jobVersions; /** * Gets the JobVersionsClient object to access its operations. - * + * * @return the JobVersionsClient object. */ public JobVersionsClient getJobVersions() { return this.jobVersions; } - /** The LedgerDigestUploadsOperationsClient object to access its operations. */ + /** + * The LedgerDigestUploadsOperationsClient object to access its operations. + */ private final LedgerDigestUploadsOperationsClient ledgerDigestUploadsOperations; /** * Gets the LedgerDigestUploadsOperationsClient object to access its operations. - * + * * @return the LedgerDigestUploadsOperationsClient object. */ public LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations() { return this.ledgerDigestUploadsOperations; } - /** The CapabilitiesClient object to access its operations. */ + /** + * The CapabilitiesClient object to access its operations. + */ private final CapabilitiesClient capabilities; /** * Gets the CapabilitiesClient object to access its operations. - * + * * @return the CapabilitiesClient object. */ public CapabilitiesClient getCapabilities() { return this.capabilities; } - /** The LongTermRetentionBackupsClient object to access its operations. */ + /** + * The LongTermRetentionBackupsClient object to access its operations. + */ private final LongTermRetentionBackupsClient longTermRetentionBackups; /** * Gets the LongTermRetentionBackupsClient object to access its operations. - * + * * @return the LongTermRetentionBackupsClient object. */ public LongTermRetentionBackupsClient getLongTermRetentionBackups() { return this.longTermRetentionBackups; } - /** The LongTermRetentionManagedInstanceBackupsClient object to access its operations. */ + /** + * The LongTermRetentionManagedInstanceBackupsClient object to access its operations. + */ private final LongTermRetentionManagedInstanceBackupsClient longTermRetentionManagedInstanceBackups; /** * Gets the LongTermRetentionManagedInstanceBackupsClient object to access its operations. - * + * * @return the LongTermRetentionManagedInstanceBackupsClient object. */ public LongTermRetentionManagedInstanceBackupsClient getLongTermRetentionManagedInstanceBackups() { return this.longTermRetentionManagedInstanceBackups; } - /** The LongTermRetentionPoliciesClient object to access its operations. */ + /** + * The LongTermRetentionPoliciesClient object to access its operations. + */ private final LongTermRetentionPoliciesClient longTermRetentionPolicies; /** * Gets the LongTermRetentionPoliciesClient object to access its operations. - * + * * @return the LongTermRetentionPoliciesClient object. */ public LongTermRetentionPoliciesClient getLongTermRetentionPolicies() { return this.longTermRetentionPolicies; } - /** The MaintenanceWindowOptionsOperationsClient object to access its operations. */ + /** + * The MaintenanceWindowOptionsOperationsClient object to access its operations. + */ private final MaintenanceWindowOptionsOperationsClient maintenanceWindowOptionsOperations; /** * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. - * + * * @return the MaintenanceWindowOptionsOperationsClient object. */ public MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations() { return this.maintenanceWindowOptionsOperations; } - /** The MaintenanceWindowsOperationsClient object to access its operations. */ + /** + * The MaintenanceWindowsOperationsClient object to access its operations. + */ private final MaintenanceWindowsOperationsClient maintenanceWindowsOperations; /** * Gets the MaintenanceWindowsOperationsClient object to access its operations. - * + * * @return the MaintenanceWindowsOperationsClient object. */ public MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations() { return this.maintenanceWindowsOperations; } - /** The ManagedBackupShortTermRetentionPoliciesClient object to access its operations. */ + /** + * The ManagedBackupShortTermRetentionPoliciesClient object to access its operations. + */ private final ManagedBackupShortTermRetentionPoliciesClient managedBackupShortTermRetentionPolicies; /** * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedBackupShortTermRetentionPoliciesClient object. */ public ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies() { return this.managedBackupShortTermRetentionPolicies; } - /** The ManagedDatabaseColumnsClient object to access its operations. */ + /** + * The ManagedDatabaseColumnsClient object to access its operations. + */ private final ManagedDatabaseColumnsClient managedDatabaseColumns; /** * Gets the ManagedDatabaseColumnsClient object to access its operations. - * + * * @return the ManagedDatabaseColumnsClient object. */ public ManagedDatabaseColumnsClient getManagedDatabaseColumns() { return this.managedDatabaseColumns; } - /** The ManagedDatabaseQueriesClient object to access its operations. */ + /** + * The ManagedDatabaseQueriesClient object to access its operations. + */ private final ManagedDatabaseQueriesClient managedDatabaseQueries; /** * Gets the ManagedDatabaseQueriesClient object to access its operations. - * + * * @return the ManagedDatabaseQueriesClient object. */ public ManagedDatabaseQueriesClient getManagedDatabaseQueries() { return this.managedDatabaseQueries; } - /** The ManagedDatabaseRestoreDetailsClient object to access its operations. */ + /** + * The ManagedDatabaseRestoreDetailsClient object to access its operations. + */ private final ManagedDatabaseRestoreDetailsClient managedDatabaseRestoreDetails; /** * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. - * + * * @return the ManagedDatabaseRestoreDetailsClient object. */ public ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails() { return this.managedDatabaseRestoreDetails; } - /** The ManagedDatabasesClient object to access its operations. */ + /** + * The ManagedDatabasesClient object to access its operations. + */ private final ManagedDatabasesClient managedDatabases; /** * Gets the ManagedDatabasesClient object to access its operations. - * + * * @return the ManagedDatabasesClient object. */ public ManagedDatabasesClient getManagedDatabases() { return this.managedDatabases; } - /** The ManagedDatabaseSchemasClient object to access its operations. */ + /** + * The ManagedDatabaseSchemasClient object to access its operations. + */ private final ManagedDatabaseSchemasClient managedDatabaseSchemas; /** * Gets the ManagedDatabaseSchemasClient object to access its operations. - * + * * @return the ManagedDatabaseSchemasClient object. */ public ManagedDatabaseSchemasClient getManagedDatabaseSchemas() { return this.managedDatabaseSchemas; } - /** The ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. */ + /** + * The ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. + */ private final ManagedDatabaseSecurityAlertPoliciesClient managedDatabaseSecurityAlertPolicies; /** * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ManagedDatabaseSecurityAlertPoliciesClient object. */ public ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies() { return this.managedDatabaseSecurityAlertPolicies; } - /** The ManagedDatabaseSecurityEventsClient object to access its operations. */ + /** + * The ManagedDatabaseSecurityEventsClient object to access its operations. + */ private final ManagedDatabaseSecurityEventsClient managedDatabaseSecurityEvents; /** * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. - * + * * @return the ManagedDatabaseSecurityEventsClient object. */ public ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents() { return this.managedDatabaseSecurityEvents; } - /** The ManagedDatabaseSensitivityLabelsClient object to access its operations. */ + /** + * The ManagedDatabaseSensitivityLabelsClient object to access its operations. + */ private final ManagedDatabaseSensitivityLabelsClient managedDatabaseSensitivityLabels; /** * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. - * + * * @return the ManagedDatabaseSensitivityLabelsClient object. */ public ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels() { return this.managedDatabaseSensitivityLabels; } - /** The ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. */ + /** + * The ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. + */ private final ManagedDatabaseRecommendedSensitivityLabelsClient managedDatabaseRecommendedSensitivityLabels; /** * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. - * + * * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. */ public ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels() { return this.managedDatabaseRecommendedSensitivityLabels; } - /** The ManagedDatabaseTablesClient object to access its operations. */ + /** + * The ManagedDatabaseTablesClient object to access its operations. + */ private final ManagedDatabaseTablesClient managedDatabaseTables; /** * Gets the ManagedDatabaseTablesClient object to access its operations. - * + * * @return the ManagedDatabaseTablesClient object. */ public ManagedDatabaseTablesClient getManagedDatabaseTables() { return this.managedDatabaseTables; } - /** The ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. */ + /** + * The ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. + */ private final ManagedDatabaseTransparentDataEncryptionsClient managedDatabaseTransparentDataEncryptions; /** * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. - * + * * @return the ManagedDatabaseTransparentDataEncryptionsClient object. */ public ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions() { return this.managedDatabaseTransparentDataEncryptions; } - /** The ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. */ - private final ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient - managedDatabaseVulnerabilityAssessmentRuleBaselines; + /** + * The ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. + */ + private final ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient managedDatabaseVulnerabilityAssessmentRuleBaselines; /** * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ public ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient @@ -978,169 +1119,196 @@ public ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTranspa return this.managedDatabaseVulnerabilityAssessmentRuleBaselines; } - /** The ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. */ + /** + * The ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. + */ private final ManagedDatabaseVulnerabilityAssessmentsClient managedDatabaseVulnerabilityAssessments; /** * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. */ public ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments() { return this.managedDatabaseVulnerabilityAssessments; } - /** The ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. */ + /** + * The ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. + */ private final ManagedDatabaseVulnerabilityAssessmentScansClient managedDatabaseVulnerabilityAssessmentScans; /** * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. - * + * * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. */ public ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans() { return this.managedDatabaseVulnerabilityAssessmentScans; } - /** The ManagedInstanceAdministratorsClient object to access its operations. */ + /** + * The ManagedInstanceAdministratorsClient object to access its operations. + */ private final ManagedInstanceAdministratorsClient managedInstanceAdministrators; /** * Gets the ManagedInstanceAdministratorsClient object to access its operations. - * + * * @return the ManagedInstanceAdministratorsClient object. */ public ManagedInstanceAdministratorsClient getManagedInstanceAdministrators() { return this.managedInstanceAdministrators; } - /** The ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. */ + /** + * The ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. + */ private final ManagedInstanceAzureADOnlyAuthenticationsClient managedInstanceAzureADOnlyAuthentications; /** * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. - * + * * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. */ public ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications() { return this.managedInstanceAzureADOnlyAuthentications; } - /** The ManagedInstanceEncryptionProtectorsClient object to access its operations. */ + /** + * The ManagedInstanceEncryptionProtectorsClient object to access its operations. + */ private final ManagedInstanceEncryptionProtectorsClient managedInstanceEncryptionProtectors; /** * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. - * + * * @return the ManagedInstanceEncryptionProtectorsClient object. */ public ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors() { return this.managedInstanceEncryptionProtectors; } - /** The ManagedInstanceKeysClient object to access its operations. */ + /** + * The ManagedInstanceKeysClient object to access its operations. + */ private final ManagedInstanceKeysClient managedInstanceKeys; /** * Gets the ManagedInstanceKeysClient object to access its operations. - * + * * @return the ManagedInstanceKeysClient object. */ public ManagedInstanceKeysClient getManagedInstanceKeys() { return this.managedInstanceKeys; } - /** The ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. */ + /** + * The ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. + */ private final ManagedInstanceLongTermRetentionPoliciesClient managedInstanceLongTermRetentionPolicies; /** * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedInstanceLongTermRetentionPoliciesClient object. */ public ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies() { return this.managedInstanceLongTermRetentionPolicies; } - /** The ManagedInstanceOperationsClient object to access its operations. */ + /** + * The ManagedInstanceOperationsClient object to access its operations. + */ private final ManagedInstanceOperationsClient managedInstanceOperations; /** * Gets the ManagedInstanceOperationsClient object to access its operations. - * + * * @return the ManagedInstanceOperationsClient object. */ public ManagedInstanceOperationsClient getManagedInstanceOperations() { return this.managedInstanceOperations; } - /** The ManagedInstancePrivateEndpointConnectionsClient object to access its operations. */ + /** + * The ManagedInstancePrivateEndpointConnectionsClient object to access its operations. + */ private final ManagedInstancePrivateEndpointConnectionsClient managedInstancePrivateEndpointConnections; /** * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. - * + * * @return the ManagedInstancePrivateEndpointConnectionsClient object. */ public ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections() { return this.managedInstancePrivateEndpointConnections; } - /** The ManagedInstancePrivateLinkResourcesClient object to access its operations. */ + /** + * The ManagedInstancePrivateLinkResourcesClient object to access its operations. + */ private final ManagedInstancePrivateLinkResourcesClient managedInstancePrivateLinkResources; /** * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. - * + * * @return the ManagedInstancePrivateLinkResourcesClient object. */ public ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources() { return this.managedInstancePrivateLinkResources; } - /** The ManagedInstancesClient object to access its operations. */ + /** + * The ManagedInstancesClient object to access its operations. + */ private final ManagedInstancesClient managedInstances; /** * Gets the ManagedInstancesClient object to access its operations. - * + * * @return the ManagedInstancesClient object. */ public ManagedInstancesClient getManagedInstances() { return this.managedInstances; } - /** The ManagedInstanceTdeCertificatesClient object to access its operations. */ + /** + * The ManagedInstanceTdeCertificatesClient object to access its operations. + */ private final ManagedInstanceTdeCertificatesClient managedInstanceTdeCertificates; /** * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. - * + * * @return the ManagedInstanceTdeCertificatesClient object. */ public ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates() { return this.managedInstanceTdeCertificates; } - /** The ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. */ + /** + * The ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. + */ private final ManagedInstanceVulnerabilityAssessmentsClient managedInstanceVulnerabilityAssessments; /** * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ManagedInstanceVulnerabilityAssessmentsClient object. */ public ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments() { return this.managedInstanceVulnerabilityAssessments; } - /** The ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. */ - private final ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient - managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; + /** + * The ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. + */ + private final ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; /** * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. - * + * * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. */ public ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient @@ -1148,516 +1316,602 @@ public ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabi return this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; } - /** The ManagedServerDnsAliasesClient object to access its operations. */ + /** + * The ManagedServerDnsAliasesClient object to access its operations. + */ private final ManagedServerDnsAliasesClient managedServerDnsAliases; /** * Gets the ManagedServerDnsAliasesClient object to access its operations. - * + * * @return the ManagedServerDnsAliasesClient object. */ public ManagedServerDnsAliasesClient getManagedServerDnsAliases() { return this.managedServerDnsAliases; } - /** The ManagedServerSecurityAlertPoliciesClient object to access its operations. */ + /** + * The ManagedServerSecurityAlertPoliciesClient object to access its operations. + */ private final ManagedServerSecurityAlertPoliciesClient managedServerSecurityAlertPolicies; /** * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ManagedServerSecurityAlertPoliciesClient object. */ public ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies() { return this.managedServerSecurityAlertPolicies; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The OutboundFirewallRulesClient object to access its operations. */ + /** + * The OutboundFirewallRulesClient object to access its operations. + */ private final OutboundFirewallRulesClient outboundFirewallRules; /** * Gets the OutboundFirewallRulesClient object to access its operations. - * + * * @return the OutboundFirewallRulesClient object. */ public OutboundFirewallRulesClient getOutboundFirewallRules() { return this.outboundFirewallRules; } - /** The PrivateEndpointConnectionsClient object to access its operations. */ + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ private final PrivateEndpointConnectionsClient privateEndpointConnections; /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { return this.privateEndpointConnections; } - /** The PrivateLinkResourcesClient object to access its operations. */ + /** + * The PrivateLinkResourcesClient object to access its operations. + */ private final PrivateLinkResourcesClient privateLinkResources; /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ public PrivateLinkResourcesClient getPrivateLinkResources() { return this.privateLinkResources; } - /** The RecoverableDatabasesClient object to access its operations. */ + /** + * The RecoverableDatabasesClient object to access its operations. + */ private final RecoverableDatabasesClient recoverableDatabases; /** * Gets the RecoverableDatabasesClient object to access its operations. - * + * * @return the RecoverableDatabasesClient object. */ public RecoverableDatabasesClient getRecoverableDatabases() { return this.recoverableDatabases; } - /** The RecoverableManagedDatabasesClient object to access its operations. */ + /** + * The RecoverableManagedDatabasesClient object to access its operations. + */ private final RecoverableManagedDatabasesClient recoverableManagedDatabases; /** * Gets the RecoverableManagedDatabasesClient object to access its operations. - * + * * @return the RecoverableManagedDatabasesClient object. */ public RecoverableManagedDatabasesClient getRecoverableManagedDatabases() { return this.recoverableManagedDatabases; } - /** The ReplicationLinksClient object to access its operations. */ + /** + * The ReplicationLinksClient object to access its operations. + */ private final ReplicationLinksClient replicationLinks; /** * Gets the ReplicationLinksClient object to access its operations. - * + * * @return the ReplicationLinksClient object. */ public ReplicationLinksClient getReplicationLinks() { return this.replicationLinks; } - /** The RestorableDroppedDatabasesClient object to access its operations. */ + /** + * The RestorableDroppedDatabasesClient object to access its operations. + */ private final RestorableDroppedDatabasesClient restorableDroppedDatabases; /** * Gets the RestorableDroppedDatabasesClient object to access its operations. - * + * * @return the RestorableDroppedDatabasesClient object. */ public RestorableDroppedDatabasesClient getRestorableDroppedDatabases() { return this.restorableDroppedDatabases; } - /** The RestorableDroppedManagedDatabasesClient object to access its operations. */ + /** + * The RestorableDroppedManagedDatabasesClient object to access its operations. + */ private final RestorableDroppedManagedDatabasesClient restorableDroppedManagedDatabases; /** * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. - * + * * @return the RestorableDroppedManagedDatabasesClient object. */ public RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases() { return this.restorableDroppedManagedDatabases; } - /** The RestorePointsClient object to access its operations. */ + /** + * The RestorePointsClient object to access its operations. + */ private final RestorePointsClient restorePoints; /** * Gets the RestorePointsClient object to access its operations. - * + * * @return the RestorePointsClient object. */ public RestorePointsClient getRestorePoints() { return this.restorePoints; } - /** The SensitivityLabelsClient object to access its operations. */ + /** + * The SensitivityLabelsClient object to access its operations. + */ private final SensitivityLabelsClient sensitivityLabels; /** * Gets the SensitivityLabelsClient object to access its operations. - * + * * @return the SensitivityLabelsClient object. */ public SensitivityLabelsClient getSensitivityLabels() { return this.sensitivityLabels; } - /** The RecommendedSensitivityLabelsClient object to access its operations. */ + /** + * The RecommendedSensitivityLabelsClient object to access its operations. + */ private final RecommendedSensitivityLabelsClient recommendedSensitivityLabels; /** * Gets the RecommendedSensitivityLabelsClient object to access its operations. - * + * * @return the RecommendedSensitivityLabelsClient object. */ public RecommendedSensitivityLabelsClient getRecommendedSensitivityLabels() { return this.recommendedSensitivityLabels; } - /** The ServerAdvancedThreatProtectionSettingsClient object to access its operations. */ + /** + * The ServerAdvancedThreatProtectionSettingsClient object to access its operations. + */ private final ServerAdvancedThreatProtectionSettingsClient serverAdvancedThreatProtectionSettings; /** * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. - * + * * @return the ServerAdvancedThreatProtectionSettingsClient object. */ public ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings() { return this.serverAdvancedThreatProtectionSettings; } - /** The ServerAdvisorsClient object to access its operations. */ + /** + * The ServerAdvisorsClient object to access its operations. + */ private final ServerAdvisorsClient serverAdvisors; /** * Gets the ServerAdvisorsClient object to access its operations. - * + * * @return the ServerAdvisorsClient object. */ public ServerAdvisorsClient getServerAdvisors() { return this.serverAdvisors; } - /** The ServerAutomaticTuningsClient object to access its operations. */ + /** + * The ServerAutomaticTuningsClient object to access its operations. + */ private final ServerAutomaticTuningsClient serverAutomaticTunings; /** * Gets the ServerAutomaticTuningsClient object to access its operations. - * + * * @return the ServerAutomaticTuningsClient object. */ public ServerAutomaticTuningsClient getServerAutomaticTunings() { return this.serverAutomaticTunings; } - /** The ServerAzureADAdministratorsClient object to access its operations. */ + /** + * The ServerAzureADAdministratorsClient object to access its operations. + */ private final ServerAzureADAdministratorsClient serverAzureADAdministrators; /** * Gets the ServerAzureADAdministratorsClient object to access its operations. - * + * * @return the ServerAzureADAdministratorsClient object. */ public ServerAzureADAdministratorsClient getServerAzureADAdministrators() { return this.serverAzureADAdministrators; } - /** The ServerAzureADOnlyAuthenticationsClient object to access its operations. */ + /** + * The ServerAzureADOnlyAuthenticationsClient object to access its operations. + */ private final ServerAzureADOnlyAuthenticationsClient serverAzureADOnlyAuthentications; /** * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. - * + * * @return the ServerAzureADOnlyAuthenticationsClient object. */ public ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications() { return this.serverAzureADOnlyAuthentications; } - /** The ServerConnectionPoliciesClient object to access its operations. */ + /** + * The ServerConnectionPoliciesClient object to access its operations. + */ private final ServerConnectionPoliciesClient serverConnectionPolicies; /** * Gets the ServerConnectionPoliciesClient object to access its operations. - * + * * @return the ServerConnectionPoliciesClient object. */ public ServerConnectionPoliciesClient getServerConnectionPolicies() { return this.serverConnectionPolicies; } - /** The ServerDevOpsAuditSettingsClient object to access its operations. */ + /** + * The ServerDevOpsAuditSettingsClient object to access its operations. + */ private final ServerDevOpsAuditSettingsClient serverDevOpsAuditSettings; /** * Gets the ServerDevOpsAuditSettingsClient object to access its operations. - * + * * @return the ServerDevOpsAuditSettingsClient object. */ public ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings() { return this.serverDevOpsAuditSettings; } - /** The ServerDnsAliasesClient object to access its operations. */ + /** + * The ServerDnsAliasesClient object to access its operations. + */ private final ServerDnsAliasesClient serverDnsAliases; /** * Gets the ServerDnsAliasesClient object to access its operations. - * + * * @return the ServerDnsAliasesClient object. */ public ServerDnsAliasesClient getServerDnsAliases() { return this.serverDnsAliases; } - /** The ServerKeysClient object to access its operations. */ + /** + * The ServerKeysClient object to access its operations. + */ private final ServerKeysClient serverKeys; /** * Gets the ServerKeysClient object to access its operations. - * + * * @return the ServerKeysClient object. */ public ServerKeysClient getServerKeys() { return this.serverKeys; } - /** The ServerOperationsClient object to access its operations. */ + /** + * The ServerOperationsClient object to access its operations. + */ private final ServerOperationsClient serverOperations; /** * Gets the ServerOperationsClient object to access its operations. - * + * * @return the ServerOperationsClient object. */ public ServerOperationsClient getServerOperations() { return this.serverOperations; } - /** The ServersClient object to access its operations. */ + /** + * The ServersClient object to access its operations. + */ private final ServersClient servers; /** * Gets the ServersClient object to access its operations. - * + * * @return the ServersClient object. */ public ServersClient getServers() { return this.servers; } - /** The ServerSecurityAlertPoliciesClient object to access its operations. */ + /** + * The ServerSecurityAlertPoliciesClient object to access its operations. + */ private final ServerSecurityAlertPoliciesClient serverSecurityAlertPolicies; /** * Gets the ServerSecurityAlertPoliciesClient object to access its operations. - * + * * @return the ServerSecurityAlertPoliciesClient object. */ public ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies() { return this.serverSecurityAlertPolicies; } - /** The ServerTrustCertificatesClient object to access its operations. */ + /** + * The ServerTrustCertificatesClient object to access its operations. + */ private final ServerTrustCertificatesClient serverTrustCertificates; /** * Gets the ServerTrustCertificatesClient object to access its operations. - * + * * @return the ServerTrustCertificatesClient object. */ public ServerTrustCertificatesClient getServerTrustCertificates() { return this.serverTrustCertificates; } - /** The ServerTrustGroupsClient object to access its operations. */ + /** + * The ServerTrustGroupsClient object to access its operations. + */ private final ServerTrustGroupsClient serverTrustGroups; /** * Gets the ServerTrustGroupsClient object to access its operations. - * + * * @return the ServerTrustGroupsClient object. */ public ServerTrustGroupsClient getServerTrustGroups() { return this.serverTrustGroups; } - /** The ServerUsagesClient object to access its operations. */ + /** + * The ServerUsagesClient object to access its operations. + */ private final ServerUsagesClient serverUsages; /** * Gets the ServerUsagesClient object to access its operations. - * + * * @return the ServerUsagesClient object. */ public ServerUsagesClient getServerUsages() { return this.serverUsages; } - /** The ServerVulnerabilityAssessmentsClient object to access its operations. */ + /** + * The ServerVulnerabilityAssessmentsClient object to access its operations. + */ private final ServerVulnerabilityAssessmentsClient serverVulnerabilityAssessments; /** * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. - * + * * @return the ServerVulnerabilityAssessmentsClient object. */ public ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments() { return this.serverVulnerabilityAssessments; } - /** The SqlAgentsClient object to access its operations. */ + /** + * The SqlAgentsClient object to access its operations. + */ private final SqlAgentsClient sqlAgents; /** * Gets the SqlAgentsClient object to access its operations. - * + * * @return the SqlAgentsClient object. */ public SqlAgentsClient getSqlAgents() { return this.sqlAgents; } - /** The SubscriptionUsagesClient object to access its operations. */ + /** + * The SubscriptionUsagesClient object to access its operations. + */ private final SubscriptionUsagesClient subscriptionUsages; /** * Gets the SubscriptionUsagesClient object to access its operations. - * + * * @return the SubscriptionUsagesClient object. */ public SubscriptionUsagesClient getSubscriptionUsages() { return this.subscriptionUsages; } - /** The SyncAgentsClient object to access its operations. */ + /** + * The SyncAgentsClient object to access its operations. + */ private final SyncAgentsClient syncAgents; /** * Gets the SyncAgentsClient object to access its operations. - * + * * @return the SyncAgentsClient object. */ public SyncAgentsClient getSyncAgents() { return this.syncAgents; } - /** The SyncGroupsClient object to access its operations. */ + /** + * The SyncGroupsClient object to access its operations. + */ private final SyncGroupsClient syncGroups; /** * Gets the SyncGroupsClient object to access its operations. - * + * * @return the SyncGroupsClient object. */ public SyncGroupsClient getSyncGroups() { return this.syncGroups; } - /** The SyncMembersClient object to access its operations. */ + /** + * The SyncMembersClient object to access its operations. + */ private final SyncMembersClient syncMembers; /** * Gets the SyncMembersClient object to access its operations. - * + * * @return the SyncMembersClient object. */ public SyncMembersClient getSyncMembers() { return this.syncMembers; } - /** The TdeCertificatesClient object to access its operations. */ + /** + * The TdeCertificatesClient object to access its operations. + */ private final TdeCertificatesClient tdeCertificates; /** * Gets the TdeCertificatesClient object to access its operations. - * + * * @return the TdeCertificatesClient object. */ public TdeCertificatesClient getTdeCertificates() { return this.tdeCertificates; } - /** The TimeZonesClient object to access its operations. */ + /** + * The TimeZonesClient object to access its operations. + */ private final TimeZonesClient timeZones; /** * Gets the TimeZonesClient object to access its operations. - * + * * @return the TimeZonesClient object. */ public TimeZonesClient getTimeZones() { return this.timeZones; } - /** The TransparentDataEncryptionsClient object to access its operations. */ + /** + * The TransparentDataEncryptionsClient object to access its operations. + */ private final TransparentDataEncryptionsClient transparentDataEncryptions; /** * Gets the TransparentDataEncryptionsClient object to access its operations. - * + * * @return the TransparentDataEncryptionsClient object. */ public TransparentDataEncryptionsClient getTransparentDataEncryptions() { return this.transparentDataEncryptions; } - /** The UsagesClient object to access its operations. */ + /** + * The UsagesClient object to access its operations. + */ private final UsagesClient usages; /** * Gets the UsagesClient object to access its operations. - * + * * @return the UsagesClient object. */ public UsagesClient getUsages() { return this.usages; } - /** The VirtualClustersClient object to access its operations. */ + /** + * The VirtualClustersClient object to access its operations. + */ private final VirtualClustersClient virtualClusters; /** * Gets the VirtualClustersClient object to access its operations. - * + * * @return the VirtualClustersClient object. */ public VirtualClustersClient getVirtualClusters() { return this.virtualClusters; } - /** The VirtualNetworkRulesClient object to access its operations. */ + /** + * The VirtualNetworkRulesClient object to access its operations. + */ private final VirtualNetworkRulesClient virtualNetworkRules; /** * Gets the VirtualNetworkRulesClient object to access its operations. - * + * * @return the VirtualNetworkRulesClient object. */ public VirtualNetworkRulesClient getVirtualNetworkRules() { return this.virtualNetworkRules; } - /** The WorkloadClassifiersClient object to access its operations. */ + /** + * The WorkloadClassifiersClient object to access its operations. + */ private final WorkloadClassifiersClient workloadClassifiers; /** * Gets the WorkloadClassifiersClient object to access its operations. - * + * * @return the WorkloadClassifiersClient object. */ public WorkloadClassifiersClient getWorkloadClassifiers() { return this.workloadClassifiers; } - /** The WorkloadGroupsClient object to access its operations. */ + /** + * The WorkloadGroupsClient object to access its operations. + */ private final WorkloadGroupsClient workloadGroups; /** * Gets the WorkloadGroupsClient object to access its operations. - * + * * @return the WorkloadGroupsClient object. */ public WorkloadGroupsClient getWorkloadGroups() { @@ -1666,7 +1920,7 @@ public WorkloadGroupsClient getWorkloadGroups() { /** * Initializes an instance of SqlManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -1674,13 +1928,8 @@ public WorkloadGroupsClient getWorkloadGroups() { * @param subscriptionId The subscription ID that identifies an Azure subscription. * @param endpoint server parameter. */ - SqlManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + SqlManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; @@ -1705,8 +1954,8 @@ public WorkloadGroupsClient getWorkloadGroups() { this.databaseSecurityAlertPolicies = new DatabaseSecurityAlertPoliciesClientImpl(this); this.databaseTables = new DatabaseTablesClientImpl(this); this.databaseUsages = new DatabaseUsagesClientImpl(this); - this.databaseVulnerabilityAssessmentRuleBaselines = - new DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); + this.databaseVulnerabilityAssessmentRuleBaselines + = new DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); this.databaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsClientImpl(this); this.databaseVulnerabilityAssessmentScans = new DatabaseVulnerabilityAssessmentScansClientImpl(this); this.dataMaskingPolicies = new DataMaskingPoliciesClientImpl(this); @@ -1749,15 +1998,15 @@ public WorkloadGroupsClient getWorkloadGroups() { this.managedDatabaseSecurityAlertPolicies = new ManagedDatabaseSecurityAlertPoliciesClientImpl(this); this.managedDatabaseSecurityEvents = new ManagedDatabaseSecurityEventsClientImpl(this); this.managedDatabaseSensitivityLabels = new ManagedDatabaseSensitivityLabelsClientImpl(this); - this.managedDatabaseRecommendedSensitivityLabels = - new ManagedDatabaseRecommendedSensitivityLabelsClientImpl(this); + this.managedDatabaseRecommendedSensitivityLabels + = new ManagedDatabaseRecommendedSensitivityLabelsClientImpl(this); this.managedDatabaseTables = new ManagedDatabaseTablesClientImpl(this); this.managedDatabaseTransparentDataEncryptions = new ManagedDatabaseTransparentDataEncryptionsClientImpl(this); - this.managedDatabaseVulnerabilityAssessmentRuleBaselines = - new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); + this.managedDatabaseVulnerabilityAssessmentRuleBaselines + = new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); this.managedDatabaseVulnerabilityAssessments = new ManagedDatabaseVulnerabilityAssessmentsClientImpl(this); - this.managedDatabaseVulnerabilityAssessmentScans = - new ManagedDatabaseVulnerabilityAssessmentScansClientImpl(this); + this.managedDatabaseVulnerabilityAssessmentScans + = new ManagedDatabaseVulnerabilityAssessmentScansClientImpl(this); this.managedInstanceAdministrators = new ManagedInstanceAdministratorsClientImpl(this); this.managedInstanceAzureADOnlyAuthentications = new ManagedInstanceAzureADOnlyAuthenticationsClientImpl(this); this.managedInstanceEncryptionProtectors = new ManagedInstanceEncryptionProtectorsClientImpl(this); @@ -1769,8 +2018,8 @@ public WorkloadGroupsClient getWorkloadGroups() { this.managedInstances = new ManagedInstancesClientImpl(this); this.managedInstanceTdeCertificates = new ManagedInstanceTdeCertificatesClientImpl(this); this.managedInstanceVulnerabilityAssessments = new ManagedInstanceVulnerabilityAssessmentsClientImpl(this); - this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies = - new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl(this); + this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies + = new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl(this); this.managedServerDnsAliases = new ManagedServerDnsAliasesClientImpl(this); this.managedServerSecurityAlertPolicies = new ManagedServerSecurityAlertPoliciesClientImpl(this); this.operations = new OperationsClientImpl(this); diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java index dc19a5d32f70c..b25c28e425116 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.SubscriptionUsageListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SubscriptionUsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in SubscriptionUsagesClient. + */ public final class SubscriptionUsagesClientImpl implements SubscriptionUsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SubscriptionUsagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SubscriptionUsagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SubscriptionUsagesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SubscriptionUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(SubscriptionUsagesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -56,146 +62,101 @@ public final class SubscriptionUsagesClientImpl implements SubscriptionUsagesCli @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SubscriptionUsagesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("usageName") String usageName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("usageName") String usageName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 subscription usage metrics in a given location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @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 subscription usage metrics in a given location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Context context) { + private Mono> listByLocationSinglePageAsync(String locationName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -204,13 +165,13 @@ private Mono> listByLocationSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String locationName) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,14 +181,13 @@ public PagedFlux listByLocationAsync(String locationName */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String locationName, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, context), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -241,7 +201,7 @@ public PagedIterable listByLocation(String locationName) /** * Gets all subscription usage metrics in a given location. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,7 +216,7 @@ public PagedIterable listByLocation(String locationName, /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,10 +227,8 @@ public PagedIterable listByLocation(String locationName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String locationName, String usageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -279,30 +237,19 @@ public Mono> getWithResponseAsync(String locati return Mono.error(new IllegalArgumentException("Parameter usageName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - locationName, - usageName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, usageName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @param context The context to associate with this operation. @@ -312,13 +259,11 @@ public Mono> getWithResponseAsync(String locati * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String usageName, Context context) { + private Mono> getWithResponseAsync(String locationName, String usageName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -327,27 +272,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter usageName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - locationName, - usageName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), locationName, usageName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +298,7 @@ public Mono getAsync(String locationName, String usageNa /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @param context The context to associate with this operation. @@ -378,7 +314,7 @@ public Response getWithResponse(String locationName, Str /** * Gets a subscription usage metric. - * + * * @param locationName The name of the region where the resource is located. * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,14 +329,13 @@ public SubscriptionUsageInner get(String locationName, String usageName) { /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of subscription usage metrics in a location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -408,62 +343,42 @@ private Mono> listByLocationNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of subscription usage metrics in a location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java index 1fa9d75821d1f..cbfc05fee9886 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java @@ -42,22 +42,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncAgentsClient. + */ public final class SyncAgentsClientImpl implements SyncAgentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SyncAgentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SyncAgentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SyncAgentsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SyncAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SyncAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -68,127 +74,83 @@ public final class SyncAgentsClientImpl implements SyncAgentsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SyncAgentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents/{syncAgentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents/{syncAgentName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncAgentInner parameters, - @HeaderParam("Accept") String accept, - Context context); + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncAgentInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents/{syncAgentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents/{syncAgentName}/generateKey") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateKey( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> generateKey(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/syncAgents/{syncAgentName}/linkedDatabases") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedDatabases( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listLinkedDatabases(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLinkedDatabasesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -196,13 +158,11 @@ Mono> listLinkedDatabasesNext( * @return a list of sync agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -212,41 +172,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,13 +197,11 @@ private Mono> listByServerSinglePageAsync( * @return a list of sync agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -271,38 +211,23 @@ private Mono> listByServerSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,16 +236,15 @@ private Mono> listByServerSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,16 +254,15 @@ public PagedFlux listByServerAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -353,9 +276,9 @@ public PagedIterable listByServer(String resourceGroupName, Stri /** * Lists sync agents in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -370,9 +293,9 @@ public PagedIterable listByServer(String resourceGroupName, Stri /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -381,13 +304,11 @@ public PagedIterable listByServer(String resourceGroupName, Stri * @return a sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -400,33 +321,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -436,13 +345,11 @@ public Mono> getWithResponseAsync( * @return a sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -455,30 +362,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -494,9 +391,9 @@ public Mono getAsync(String resourceGroupName, String serverName /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -506,16 +403,16 @@ public Mono getAsync(String resourceGroupName, String serverName * @return a sync agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String syncAgentName, + Context context) { return getWithResponseAsync(resourceGroupName, serverName, syncAgentName, context).block(); } /** * Gets a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -530,9 +427,9 @@ public SyncAgentInner get(String resourceGroupName, String serverName, String sy /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -542,13 +439,11 @@ public SyncAgentInner get(String resourceGroupName, String serverName, String sy * @return an Azure SQL Database sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName, SyncAgentInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -561,10 +456,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -573,27 +466,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -604,13 +487,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL Database sync agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -623,10 +504,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -635,24 +514,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -662,25 +532,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, syncAgentName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SyncAgentInner.class, - SyncAgentInner.class, - this.client.getContext()); + public PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, syncAgentName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncAgentInner.class, SyncAgentInner.class, this.client.getContext()); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -691,22 +555,20 @@ public PollerFlux, SyncAgentInner> beginCreateOrUpdat * @return the {@link PollerFlux} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { + private PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, syncAgentName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SyncAgentInner.class, SyncAgentInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, syncAgentName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncAgentInner.class, SyncAgentInner.class, context); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -716,16 +578,16 @@ private PollerFlux, SyncAgentInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters).getSyncPoller(); + public SyncPoller, SyncAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters).getSyncPoller(); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -736,17 +598,17 @@ public SyncPoller, SyncAgentInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncAgentInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters, context) + public SyncPoller, SyncAgentInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters, context) .getSyncPoller(); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -756,18 +618,17 @@ public SyncPoller, SyncAgentInner> beginCreateOrUpdat * @return an Azure SQL Database sync agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -778,18 +639,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL Database sync agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -799,16 +659,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncAgentInner createOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters) { + public SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters).block(); } /** * Creates or updates a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. @@ -819,16 +679,16 @@ public SyncAgentInner createOrUpdate( * @return an Azure SQL Database sync agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncAgentInner createOrUpdate( - String resourceGroupName, String serverName, String syncAgentName, SyncAgentInner parameters, Context context) { + public SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, String syncAgentName, + SyncAgentInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, syncAgentName, parameters, context).block(); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -837,13 +697,11 @@ public SyncAgentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -856,31 +714,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -890,13 +737,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String syncAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -909,28 +754,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -939,20 +775,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String syncAgentName) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String syncAgentName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, syncAgentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -962,21 +796,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String syncAgentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, syncAgentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, syncAgentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -985,16 +818,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String syncAgentName) { - return beginDeleteAsync(resourceGroupName, serverName, syncAgentName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String syncAgentName) { + return this.beginDeleteAsync(resourceGroupName, serverName, syncAgentName).getSyncPoller(); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1004,16 +837,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String syncAgentName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, syncAgentName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String syncAgentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, syncAgentName, context).getSyncPoller(); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1023,16 +856,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String syncAgentName) { - return beginDeleteAsync(resourceGroupName, serverName, syncAgentName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, syncAgentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1043,16 +875,15 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String syncAgentName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, syncAgentName, context) - .last() + return beginDeleteAsync(resourceGroupName, serverName, syncAgentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1066,9 +897,9 @@ public void delete(String resourceGroupName, String serverName, String syncAgent /** * Deletes a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1083,25 +914,23 @@ public void delete(String resourceGroupName, String serverName, String syncAgent /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of an Azure SQL Database sync agent key along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> generateKeyWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName) { + public Mono> generateKeyWithResponseAsync(String resourceGroupName, + String serverName, String syncAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1114,33 +943,21 @@ public Mono> generateKeyWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .generateKey( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.generateKey(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1148,16 +965,14 @@ public Mono> generateKeyWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return properties of an Azure SQL Database sync agent key along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateKeyWithResponseAsync( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + private Mono> generateKeyWithResponseAsync(String resourceGroupName, + String serverName, String syncAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1170,30 +985,20 @@ private Mono> generateKeyWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .generateKey( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.generateKey(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1202,17 +1007,17 @@ private Mono> generateKeyWithResponseAsync * @return properties of an Azure SQL Database sync agent key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono generateKeyAsync( - String resourceGroupName, String serverName, String syncAgentName) { + public Mono generateKeyAsync(String resourceGroupName, String serverName, + String syncAgentName) { return generateKeyWithResponseAsync(resourceGroupName, serverName, syncAgentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1222,16 +1027,16 @@ public Mono generateKeyAsync( * @return properties of an Azure SQL Database sync agent key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateKeyWithResponse( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + public Response generateKeyWithResponse(String resourceGroupName, String serverName, + String syncAgentName, Context context) { return generateKeyWithResponseAsync(resourceGroupName, serverName, syncAgentName, context).block(); } /** * Generates a sync agent key. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1246,25 +1051,23 @@ public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedDatabasesSinglePageAsync( - String resourceGroupName, String serverName, String syncAgentName) { + private Mono> + listLinkedDatabasesSinglePageAsync(String resourceGroupName, String serverName, String syncAgentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1277,59 +1080,39 @@ private Mono> listLinkedDatabasesSin return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listLinkedDatabases( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listLinkedDatabases(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedDatabasesSinglePageAsync( String resourceGroupName, String serverName, String syncAgentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1342,39 +1125,23 @@ private Mono> listLinkedDatabasesSin return Mono.error(new IllegalArgumentException("Parameter syncAgentName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listLinkedDatabases( - this.client.getEndpoint(), - resourceGroupName, - serverName, - syncAgentName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listLinkedDatabases(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1383,18 +1150,17 @@ private Mono> listLinkedDatabasesSin * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listLinkedDatabasesAsync( - String resourceGroupName, String serverName, String syncAgentName) { - return new PagedFlux<>( - () -> listLinkedDatabasesSinglePageAsync(resourceGroupName, serverName, syncAgentName), + public PagedFlux listLinkedDatabasesAsync(String resourceGroupName, String serverName, + String syncAgentName) { + return new PagedFlux<>(() -> listLinkedDatabasesSinglePageAsync(resourceGroupName, serverName, syncAgentName), nextLink -> listLinkedDatabasesNextSinglePageAsync(nextLink)); } /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1404,8 +1170,8 @@ public PagedFlux listLinkedDatabasesAsync( * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLinkedDatabasesAsync( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + private PagedFlux listLinkedDatabasesAsync(String resourceGroupName, + String serverName, String syncAgentName, Context context) { return new PagedFlux<>( () -> listLinkedDatabasesSinglePageAsync(resourceGroupName, serverName, syncAgentName, context), nextLink -> listLinkedDatabasesNextSinglePageAsync(nextLink, context)); @@ -1413,9 +1179,9 @@ private PagedFlux listLinkedDatabasesAsync( /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1424,16 +1190,16 @@ private PagedFlux listLinkedDatabasesAsync( * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedDatabases( - String resourceGroupName, String serverName, String syncAgentName) { + public PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, + String syncAgentName) { return new PagedIterable<>(listLinkedDatabasesAsync(resourceGroupName, serverName, syncAgentName)); } /** * Lists databases linked to a sync agent. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. @@ -1443,16 +1209,15 @@ public PagedIterable listLinkedDatabases( * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedDatabases( - String resourceGroupName, String serverName, String syncAgentName, Context context) { + public PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, + String syncAgentName, Context context) { return new PagedIterable<>(listLinkedDatabasesAsync(resourceGroupName, serverName, syncAgentName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1464,31 +1229,21 @@ private Mono> listByServerNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1501,36 +1256,25 @@ private Mono> listByServerNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedDatabasesNextSinglePageAsync(String nextLink) { @@ -1538,63 +1282,43 @@ private Mono> listLinkedDatabasesNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listLinkedDatabasesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedDatabasesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listLinkedDatabasesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listLinkedDatabasesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listLinkedDatabasesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java index 3bc8b699d8aee..1a068a82c78ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java @@ -47,22 +47,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncGroupsClient. + */ public final class SyncGroupsClientImpl implements SyncGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SyncGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SyncGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SyncGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SyncGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SyncGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -73,334 +79,219 @@ public final class SyncGroupsClientImpl implements SyncGroupsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SyncGroupsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSyncDatabaseIds( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listSyncDatabaseIds(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") - @ExpectedResponses({200}) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncGroupInner parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncGroupInner parameters, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancelSync( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> cancelSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listHubSchemas( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs") - @ExpectedResponses({200}) + Mono> listHubSchemas(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLogs( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @QueryParam("startTime") String startTime, - @QueryParam("endTime") String endTime, - @QueryParam("type") SyncGroupsType type, - @QueryParam("continuationToken") String continuationToken, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema") - @ExpectedResponses({200, 202}) + Mono> listLogs(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, + @QueryParam("type") SyncGroupsType type, @QueryParam("continuationToken") String continuationToken, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshHubSchema( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> refreshHubSchema(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync") - @ExpectedResponses({200}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> triggerSync( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> triggerSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSyncDatabaseIdsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listHubSchemasNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLogsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 collection of sync database ids along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of sync database ids along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSyncDatabaseIds( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listSyncDatabaseIds(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync database ids along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of sync database ids along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsSinglePageAsync( - String locationName, Context context) { + private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSyncDatabaseIds( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listSyncDatabaseIds(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -409,14 +300,13 @@ private Mono> listSyncDatabaseIdsSi */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listSyncDatabaseIdsAsync(String locationName) { - return new PagedFlux<>( - () -> listSyncDatabaseIdsSinglePageAsync(locationName), + return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName), nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink)); } /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -426,14 +316,13 @@ public PagedFlux listSyncDatabaseIdsAsync(String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSyncDatabaseIdsAsync(String locationName, Context context) { - return new PagedFlux<>( - () -> listSyncDatabaseIdsSinglePageAsync(locationName, context), + return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName, context), nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink, context)); } /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -447,7 +336,7 @@ public PagedIterable listSyncDatabaseIds(String l /** * Gets a collection of sync database ids. - * + * * @param locationName The name of the region where the resource is located. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -462,9 +351,9 @@ public PagedIterable listSyncDatabaseIds(String l /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -473,13 +362,11 @@ public PagedIterable listSyncDatabaseIds(String l * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -492,42 +379,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param context The context to associate with this operation. @@ -537,13 +405,11 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,39 +422,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -597,18 +447,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return a list of sync groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param context The context to associate with this operation. @@ -618,8 +467,8 @@ public PagedFlux listByDatabaseAsync( * @return a list of sync groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -627,9 +476,9 @@ private PagedFlux listByDatabaseAsync( /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -638,16 +487,16 @@ private PagedFlux listByDatabaseAsync( * @return a list of sync groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Lists sync groups under a hub database. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param context The context to associate with this operation. @@ -657,16 +506,16 @@ public PagedIterable listByDatabase( * @return a list of sync groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -676,13 +525,11 @@ public PagedIterable listByDatabase( * @return a sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -698,34 +545,21 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -736,13 +570,11 @@ public Mono> getWithResponseAsync( * @return a sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -758,31 +590,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -792,17 +613,17 @@ private Mono> getWithResponseAsync( * @return a sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -813,16 +634,16 @@ public Mono getAsync( * @return a sync group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); } /** * Gets a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -838,9 +659,9 @@ public SyncGroupInner get(String resourceGroupName, String serverName, String da /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -851,17 +672,11 @@ public SyncGroupInner get(String resourceGroupName, String serverName, String da * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -877,10 +692,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -889,28 +702,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -922,18 +724,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -949,10 +744,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -961,25 +754,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -990,29 +773,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SyncGroupInner.class, - SyncGroupInner.class, - this.client.getContext()); + public PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, this.client.getContext()); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1024,28 +797,20 @@ public PollerFlux, SyncGroupInner> beginCreateOrUpdat * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + private PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SyncGroupInner.class, SyncGroupInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, context); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1056,21 +821,17 @@ private PollerFlux, SyncGroupInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) + public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) .getSyncPoller(); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1082,22 +843,18 @@ public SyncPoller, SyncGroupInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) .getSyncPoller(); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1108,22 +865,17 @@ public SyncPoller, SyncGroupInner> beginCreateOrUpdat * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1135,13 +887,8 @@ public Mono createOrUpdateAsync( * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1149,9 +896,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1162,20 +909,16 @@ private Mono createOrUpdateAsync( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { + public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); } /** * Creates or updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1187,22 +930,17 @@ public SyncGroupInner createOrUpdate( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) .block(); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1212,13 +950,11 @@ public SyncGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1234,32 +970,20 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1270,13 +994,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1292,29 +1014,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1324,21 +1036,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1349,21 +1059,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1373,16 +1082,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).getSyncPoller(); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1393,16 +1102,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) + .getSyncPoller(); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1412,18 +1122,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName) - .last() + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1434,18 +1143,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1460,9 +1168,9 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1472,16 +1180,16 @@ public void delete(String resourceGroupName, String serverName, String databaseN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + Context context) { deleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1492,17 +1200,11 @@ public void delete( * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1518,10 +1220,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1530,28 +1230,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1563,18 +1252,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1590,10 +1272,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1602,25 +1282,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1631,29 +1301,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncGroupInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SyncGroupInner.class, - SyncGroupInner.class, - this.client.getContext()); + public PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, this.client.getContext()); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1665,27 +1325,20 @@ public PollerFlux, SyncGroupInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncGroupInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + private PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SyncGroupInner.class, SyncGroupInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, context); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1696,20 +1349,17 @@ private PollerFlux, SyncGroupInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).getSyncPoller(); + public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) + .getSyncPoller(); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1721,22 +1371,17 @@ public SyncPoller, SyncGroupInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) .getSyncPoller(); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1747,22 +1392,17 @@ public SyncPoller, SyncGroupInner> beginUpdate( * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1774,23 +1414,17 @@ public Mono updateAsync( * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1801,20 +1435,16 @@ private Mono updateAsync( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, + public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); } /** * Updates a sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1826,21 +1456,16 @@ public SyncGroupInner update( * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - SyncGroupInner parameters, - Context context) { + public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters, Context context) { return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).block(); } /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1850,13 +1475,11 @@ public SyncGroupInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono> cancelSyncWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1872,32 +1495,20 @@ public Mono> cancelSyncWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .cancelSync( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.cancelSync(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1908,13 +1519,11 @@ public Mono> cancelSyncWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono> cancelSyncWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1930,29 +1539,19 @@ private Mono> cancelSyncWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .cancelSync( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.cancelSync(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1962,17 +1561,17 @@ private Mono> cancelSyncWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelSyncAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono cancelSyncAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { return cancelSyncWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) .flatMap(ignored -> Mono.empty()); } /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -1983,16 +1582,16 @@ public Mono cancelSyncAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelSyncWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public Response cancelSyncWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { return cancelSyncWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); } /** * Cancels a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2007,26 +1606,24 @@ public void cancelSync(String resourceGroupName, String serverName, String datab /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync 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 a collection of hub database schemas along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of hub database schemas along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHubSchemasSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + private Mono> listHubSchemasSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2042,43 +1639,24 @@ private Mono> listHubSchemasSingleP return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listHubSchemas( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listHubSchemas(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2086,17 +1664,15 @@ private Mono> listHubSchemasSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 collection of hub database schemas along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of hub database schemas along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHubSchemasSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono> listHubSchemasSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2112,40 +1688,23 @@ private Mono> listHubSchemasSingleP return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listHubSchemas( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listHubSchemas(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2155,8 +1714,8 @@ private Mono> listHubSchemasSingleP * @return a collection of hub database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listHubSchemasAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public PagedFlux listHubSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { return new PagedFlux<>( () -> listHubSchemasSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName), nextLink -> listHubSchemasNextSinglePageAsync(nextLink)); @@ -2164,9 +1723,9 @@ public PagedFlux listHubSchemasAsync( /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2177,8 +1736,8 @@ public PagedFlux listHubSchemasAsync( * @return a collection of hub database schemas as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listHubSchemasAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private PagedFlux listHubSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { return new PagedFlux<>( () -> listHubSchemasSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, context), nextLink -> listHubSchemasNextSinglePageAsync(nextLink, context)); @@ -2186,9 +1745,9 @@ private PagedFlux listHubSchemasAsync( /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2198,16 +1757,16 @@ private PagedFlux listHubSchemasAsync( * @return a collection of hub database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHubSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public PagedIterable listHubSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { return new PagedIterable<>(listHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName)); } /** * Gets a collection of hub database schemas. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2218,17 +1777,17 @@ public PagedIterable listHubSchemas( * @return a collection of hub database schemas as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHubSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public PagedIterable listHubSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { return new PagedIterable<>( listHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName, context)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2239,24 +1798,16 @@ public PagedIterable listHubSchemas( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 collection of sync group logs along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of sync group logs along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLogsSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, - String continuationToken) { + private Mono> listLogsSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String startTime, String endTime, + SyncGroupsType type, String continuationToken) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2281,47 +1832,24 @@ private Mono> listLogsSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listLogs( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listLogs(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, startTime, endTime, type, continuationToken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2333,25 +1861,16 @@ private Mono> listLogsSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 collection of sync group logs along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a collection of sync group logs along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLogsSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, - String continuationToken, - Context context) { + private Mono> listLogsSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String startTime, String endTime, + SyncGroupsType type, String continuationToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2376,44 +1895,24 @@ private Mono> listLogsSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter type is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listLogs( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .listLogs(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, startTime, + endTime, type, continuationToken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2427,34 +1926,18 @@ private Mono> listLogsSinglePageAsync * @return a collection of sync group logs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listLogsAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, + public PagedFlux listLogsAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type, String continuationToken) { - return new PagedFlux<>( - () -> - listLogsSinglePageAsync( - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken), - nextLink -> listLogsNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listLogsSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, + startTime, endTime, type, continuationToken), nextLink -> listLogsNextSinglePageAsync(nextLink)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2467,34 +1950,18 @@ public PagedFlux listLogsAsync( * @return a collection of sync group logs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listLogsAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type) { + public PagedFlux listLogsAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type) { final String continuationToken = null; - return new PagedFlux<>( - () -> - listLogsSinglePageAsync( - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken), - nextLink -> listLogsNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listLogsSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, + startTime, endTime, type, continuationToken), nextLink -> listLogsNextSinglePageAsync(nextLink)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2509,36 +1976,19 @@ public PagedFlux listLogsAsync( * @return a collection of sync group logs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLogsAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, - String continuationToken, - Context context) { - return new PagedFlux<>( - () -> - listLogsSinglePageAsync( - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken, - context), + private PagedFlux listLogsAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type, + String continuationToken, Context context) { + return new PagedFlux<>(() -> listLogsSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, + startTime, endTime, type, continuationToken, context), nextLink -> listLogsNextSinglePageAsync(nextLink, context)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2551,32 +2001,18 @@ private PagedFlux listLogsAsync( * @return a collection of sync group logs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLogs( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type) { + public PagedIterable listLogs(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type) { final String continuationToken = null; - return new PagedIterable<>( - listLogsAsync( - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken)); + return new PagedIterable<>(listLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, + endTime, type, continuationToken)); } /** * Gets a collection of sync group logs. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2591,34 +2027,18 @@ public PagedIterable listLogs( * @return a collection of sync group logs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLogs( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String startTime, - String endTime, - SyncGroupsType type, - String continuationToken, - Context context) { - return new PagedIterable<>( - listLogsAsync( - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - type, - continuationToken, - context)); + public PagedIterable listLogs(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String startTime, String endTime, SyncGroupsType type, + String continuationToken, Context context) { + return new PagedIterable<>(listLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, + endTime, type, continuationToken, context)); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2628,13 +2048,11 @@ public PagedIterable listLogs( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> refreshHubSchemaWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono>> refreshHubSchemaWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2650,32 +2068,20 @@ public Mono>> refreshHubSchemaWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .refreshHubSchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.refreshHubSchema(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2686,13 +2092,11 @@ public Mono>> refreshHubSchemaWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshHubSchemaWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono>> refreshHubSchemaWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2708,29 +2112,19 @@ private Mono>> refreshHubSchemaWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .refreshHubSchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.refreshHubSchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2740,21 +2134,19 @@ private Mono>> refreshHubSchemaWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRefreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - Mono>> mono = - refreshHubSchemaWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginRefreshHubSchemaAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + Mono>> mono + = refreshHubSchemaWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2765,21 +2157,20 @@ public PollerFlux, Void> beginRefreshHubSchemaAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRefreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private PollerFlux, Void> beginRefreshHubSchemaAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - refreshHubSchemaWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = refreshHubSchemaWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2789,16 +2180,17 @@ private PollerFlux, Void> beginRefreshHubSchemaAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).getSyncPoller(); + public SyncPoller, Void> beginRefreshHubSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + return this.beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName) + .getSyncPoller(); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2809,17 +2201,17 @@ public SyncPoller, Void> beginRefreshHubSchema( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { - return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) + public SyncPoller, Void> beginRefreshHubSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { + return this.beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) .getSyncPoller(); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2829,18 +2221,17 @@ public SyncPoller, Void> beginRefreshHubSchema( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono refreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName) - .last() + public Mono refreshHubSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { + return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2851,18 +2242,17 @@ public Mono refreshHubSchemaAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshHubSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { - return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) - .last() + private Mono refreshHubSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { + return beginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2871,16 +2261,16 @@ private Mono refreshHubSchemaAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public void refreshHubSchema(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { refreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).block(); } /** * Refreshes a hub database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2890,16 +2280,16 @@ public void refreshHubSchema( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshHubSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public void refreshHubSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + Context context) { refreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); } /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2909,13 +2299,11 @@ public void refreshHubSchema( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> triggerSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono> triggerSyncWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2931,32 +2319,20 @@ public Mono> triggerSyncWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .triggerSync( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.triggerSync(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -2967,13 +2343,11 @@ public Mono> triggerSyncWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> triggerSyncWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono> triggerSyncWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2989,29 +2363,19 @@ private Mono> triggerSyncWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .triggerSync( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.triggerSync(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -3021,17 +2385,17 @@ private Mono> triggerSyncWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono triggerSyncAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public Mono triggerSyncAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { return triggerSyncWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) .flatMap(ignored -> Mono.empty()); } /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -3042,17 +2406,17 @@ public Mono triggerSyncAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response triggerSyncWithResponse( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public Response triggerSyncWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { return triggerSyncWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context) .block(); } /** * Triggers a sync group synchronization. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -3067,14 +2431,13 @@ public void triggerSync(String resourceGroupName, String serverName, String data /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSyncDatabaseIdsNextSinglePageAsync(String nextLink) { @@ -3082,71 +2445,50 @@ private Mono> listSyncDatabaseIdsNe return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listSyncDatabaseIdsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listSyncDatabaseIdsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSyncDatabaseIdsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listSyncDatabaseIdsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3158,31 +2500,21 @@ private Mono> listByDatabaseNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -3195,36 +2527,25 @@ private Mono> listByDatabaseNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHubSchemasNextSinglePageAsync(String nextLink) { @@ -3232,75 +2553,54 @@ private Mono> listHubSchemasNextSin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listHubSchemasNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHubSchemasNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listHubSchemasNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listHubSchemasNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listHubSchemasNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLogsNextSinglePageAsync(String nextLink) { @@ -3308,62 +2608,42 @@ private Mono> listLogsNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listLogsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLogsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listLogsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listLogsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listLogsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java index 6aa51e3cf96bd..22991f977b117 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java @@ -42,22 +42,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SyncMembersClient. */ +/** + * An instance of this class provides access to all the operations defined in SyncMembersClient. + */ public final class SyncMembersClientImpl implements SyncMembersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SyncMembersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of SyncMembersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SyncMembersClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(SyncMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SyncMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -68,159 +74,100 @@ public final class SyncMembersClientImpl implements SyncMembersClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientS") public interface SyncMembersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySyncGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({200}) + Mono> listBySyncGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncMemberInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({200, 202, 204}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncMemberInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncMemberInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" - + "/refreshSchema") - @ExpectedResponses({200, 202}) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncMemberInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshMemberSchema( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}" - + "/schemas") - @ExpectedResponses({200}) + Mono>> refreshMemberSchema(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMemberSchemas( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono> listMemberSchemas(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySyncGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listMemberSchemasNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -228,16 +175,14 @@ Mono> listMemberSchemasNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySyncGroupSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -253,43 +198,24 @@ private Mono> listBySyncGroupSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listBySyncGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listBySyncGroup(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -298,16 +224,14 @@ private Mono> listBySyncGroupSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySyncGroupSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -323,40 +247,23 @@ private Mono> listBySyncGroupSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listBySyncGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listBySyncGroup(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -366,8 +273,8 @@ private Mono> listBySyncGroupSinglePageAsync( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySyncGroupAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { return new PagedFlux<>( () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName), nextLink -> listBySyncGroupNextSinglePageAsync(nextLink)); @@ -375,9 +282,9 @@ public PagedFlux listBySyncGroupAsync( /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -388,8 +295,8 @@ public PagedFlux listBySyncGroupAsync( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySyncGroupAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + private PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { return new PagedFlux<>( () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, context), nextLink -> listBySyncGroupNextSinglePageAsync(nextLink, context)); @@ -397,9 +304,9 @@ private PagedFlux listBySyncGroupAsync( /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -409,16 +316,16 @@ private PagedFlux listBySyncGroupAsync( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySyncGroup( - String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { return new PagedIterable<>(listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName)); } /** * Lists sync members in the given sync group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. @@ -429,17 +336,17 @@ public PagedIterable listBySyncGroup( * @return a list of Azure SQL Database sync members as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySyncGroup( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, Context context) { + public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { return new PagedIterable<>( listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName, context)); } /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -450,13 +357,11 @@ public PagedIterable listBySyncGroup( * @return a sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -475,35 +380,22 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -515,18 +407,11 @@ public Mono> getWithResponseAsync( * @return a sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -545,32 +430,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -581,17 +454,17 @@ private Mono> getWithResponseAsync( * @return a sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -603,22 +476,17 @@ public Mono getAsync( * @return a sync member along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) .block(); } /** * Gets a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -629,17 +497,17 @@ public Response getWithResponse( * @return a sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner get( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public SyncMemberInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName) { return getWithResponse(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, Context.NONE) .getValue(); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -651,18 +519,11 @@ public SyncMemberInner get( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -681,10 +542,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -693,29 +552,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -728,19 +575,12 @@ public Mono>> createOrUpdateWithResponseAsync( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -759,10 +599,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -771,26 +609,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -802,31 +630,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + public PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SyncMemberInner.class, - SyncMemberInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, this.client.getContext()); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -839,29 +656,21 @@ public PollerFlux, SyncMemberInner> beginCreateOrUpd * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + private PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SyncMemberInner.class, SyncMemberInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, context); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -873,23 +682,20 @@ private PollerFlux, SyncMemberInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters) .getSyncPoller(); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -902,24 +708,20 @@ public SyncPoller, SyncMemberInner> beginCreateOrUpd * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context) .getSyncPoller(); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -931,24 +733,17 @@ public SyncPoller, SyncMemberInner> beginCreateOrUpd * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -961,25 +756,17 @@ public Mono createOrUpdateAsync( * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -991,23 +778,17 @@ private Mono createOrUpdateAsync( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { - return createOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - .block(); + public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters).block(); } /** * Creates or updates a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1020,24 +801,17 @@ public SyncMemberInner createOrUpdate( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) - .block(); + public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context).block(); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1048,13 +822,11 @@ public SyncMemberInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1073,33 +845,21 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1111,18 +871,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1141,30 +894,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1175,21 +917,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1201,27 +941,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1232,17 +965,17 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) .getSyncPoller(); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1254,22 +987,18 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) .getSyncPoller(); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1280,18 +1009,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - .last() + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1303,13 +1031,8 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context) { return beginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1317,9 +1040,9 @@ private Mono deleteAsync( /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1329,16 +1052,16 @@ private Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName) { deleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).block(); } /** * Deletes a sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1349,21 +1072,16 @@ public void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + public void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, Context context) { deleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context).block(); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1375,18 +1093,11 @@ public void delete( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1405,10 +1116,8 @@ public Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1417,29 +1126,17 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1452,19 +1149,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1483,10 +1172,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -1495,26 +1182,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1526,31 +1202,20 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncMemberInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + public PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SyncMemberInner.class, - SyncMemberInner.class, - this.client.getContext()); + Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, this.client.getContext()); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1563,29 +1228,21 @@ public PollerFlux, SyncMemberInner> beginUpdateAsync * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncMemberInner> beginUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + private PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SyncMemberInner.class, SyncMemberInner.class, context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, context); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1597,22 +1254,19 @@ private PollerFlux, SyncMemberInner> beginUpdateAsyn * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + return this + .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) .getSyncPoller(); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1625,24 +1279,20 @@ public SyncPoller, SyncMemberInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, + public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return beginUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) + return this + .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context) .getSyncPoller(); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1654,13 +1304,8 @@ public SyncPoller, SyncMemberInner> beginUpdate( * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1668,9 +1313,9 @@ public Mono updateAsync( /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1683,25 +1328,17 @@ public Mono updateAsync( * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context) { - return beginUpdateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1713,22 +1350,17 @@ private Mono updateAsync( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters) { + public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) .block(); } /** * Updates an existing sync member. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1741,24 +1373,17 @@ public SyncMemberInner update( * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner update( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - SyncMemberInner parameters, - Context context) { - return updateAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, context) - .block(); + public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context).block(); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1769,13 +1394,11 @@ public SyncMemberInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> refreshMemberSchemaWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public Mono>> refreshMemberSchemaWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1794,33 +1417,21 @@ public Mono>> refreshMemberSchemaWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .refreshMemberSchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.refreshMemberSchema(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1832,18 +1443,11 @@ public Mono>> refreshMemberSchemaWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshMemberSchemaWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private Mono>> refreshMemberSchemaWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1862,30 +1466,19 @@ private Mono>> refreshMemberSchemaWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .refreshMemberSchema( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.refreshMemberSchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1896,22 +1489,19 @@ private Mono>> refreshMemberSchemaWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRefreshMemberSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - Mono>> mono = - refreshMemberSchemaWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginRefreshMemberSchemaAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { + Mono>> mono = refreshMemberSchemaWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1923,27 +1513,20 @@ public PollerFlux, Void> beginRefreshMemberSchemaAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRefreshMemberSchemaAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + private PollerFlux, Void> beginRefreshMemberSchemaAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - refreshMemberSchemaWithResponseAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = refreshMemberSchemaWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1954,17 +1537,18 @@ private PollerFlux, Void> beginRefreshMemberSchemaAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshMemberSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - return beginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + public SyncPoller, Void> beginRefreshMemberSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { + return this + .beginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) .getSyncPoller(); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -1976,23 +1560,19 @@ public SyncPoller, Void> beginRefreshMemberSchema( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRefreshMemberSchema( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { - return beginRefreshMemberSchemaAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) + public SyncPoller, Void> beginRefreshMemberSchema(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { + return this + .beginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + context) .getSyncPoller(); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2003,8 +1583,8 @@ public SyncPoller, Void> beginRefreshMemberSchema( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono refreshMemberSchemaAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public Mono refreshMemberSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName) { return beginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -2012,9 +1592,9 @@ public Mono refreshMemberSchemaAsync( /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2026,24 +1606,17 @@ public Mono refreshMemberSchemaAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshMemberSchemaAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { - return beginRefreshMemberSchemaAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono refreshMemberSchemaAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context) { + return beginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2053,16 +1626,16 @@ private Mono refreshMemberSchemaAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshMemberSchema( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public void refreshMemberSchema(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName) { refreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).block(); } /** * Refreshes a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2073,22 +1646,17 @@ public void refreshMemberSchema( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void refreshMemberSchema( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { + public void refreshMemberSchema(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context) { refreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) .block(); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2102,10 +1670,8 @@ public void refreshMemberSchema( private Mono> listMemberSchemasSinglePageAsync( String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2124,44 +1690,24 @@ private Mono> listMemberSchemasSing return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listMemberSchemas( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listMemberSchemas(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2174,17 +1720,11 @@ private Mono> listMemberSchemasSing */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMemberSchemasSinglePageAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, + String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2203,41 +1743,23 @@ private Mono> listMemberSchemasSing return Mono.error(new IllegalArgumentException("Parameter syncMemberName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listMemberSchemas( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listMemberSchemas(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2248,20 +1770,17 @@ private Mono> listMemberSchemasSing * @return a sync member database schema as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMemberSchemasAsync( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { - return new PagedFlux<>( - () -> - listMemberSchemasSinglePageAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName), - nextLink -> listMemberSchemasNextSinglePageAsync(nextLink)); + public PagedFlux listMemberSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { + return new PagedFlux<>(() -> listMemberSchemasSinglePageAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName), nextLink -> listMemberSchemasNextSinglePageAsync(nextLink)); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2273,25 +1792,18 @@ public PagedFlux listMemberSchemasAsync( * @return a sync member database schema as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMemberSchemasAsync( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { - return new PagedFlux<>( - () -> - listMemberSchemasSinglePageAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context), + private PagedFlux listMemberSchemasAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { + return new PagedFlux<>(() -> listMemberSchemasSinglePageAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, context), nextLink -> listMemberSchemasNextSinglePageAsync(nextLink, context)); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2302,17 +1814,17 @@ private PagedFlux listMemberSchemasAsync( * @return a sync member database schema as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMemberSchemas( - String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName) { + public PagedIterable listMemberSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { return new PagedIterable<>( listMemberSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName)); } /** * Gets a sync member database schema. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group on which the sync member is hosted. @@ -2324,28 +1836,21 @@ public PagedIterable listMemberSchemas( * @return a sync member database schema as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMemberSchemas( - String resourceGroupName, - String serverName, - String databaseName, - String syncGroupName, - String syncMemberName, - Context context) { - return new PagedIterable<>( - listMemberSchemasAsync( - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context)); + public PagedIterable listMemberSchemas(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, Context context) { + return new PagedIterable<>(listMemberSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySyncGroupNextSinglePageAsync(String nextLink) { @@ -2353,37 +1858,27 @@ private Mono> listBySyncGroupNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySyncGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySyncGroupNextSinglePageAsync(String nextLink, Context context) { @@ -2391,36 +1886,25 @@ private Mono> listBySyncGroupNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySyncGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySyncGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMemberSchemasNextSinglePageAsync(String nextLink) { @@ -2428,62 +1912,42 @@ private Mono> listMemberSchemasNext return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listMemberSchemasNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMemberSchemasNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listMemberSchemasNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listMemberSchemasNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listMemberSchemasNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java index e57860414bc51..e9996c573e3d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java @@ -30,22 +30,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TdeCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in TdeCertificatesClient. + */ public final class TdeCertificatesClientImpl implements TdeCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TdeCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of TdeCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TdeCertificatesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(TdeCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(TdeCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,27 +62,21 @@ public final class TdeCertificatesClientImpl implements TdeCertificatesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientT") public interface TdeCertificatesService { - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/tdeCertificates") - @ExpectedResponses({200, 202}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TdeCertificate parameters, - Context context); + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TdeCertificate parameters, Context context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,13 +85,11 @@ Mono>> create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, TdeCertificate parameters) { + public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + TdeCertificate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -101,10 +99,8 @@ public Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -112,25 +108,16 @@ public Mono>> createWithResponseAsync( parameters.validate(); } return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -140,13 +127,11 @@ public Mono>> createWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String serverName, TdeCertificate parameters, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + TdeCertificate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -156,10 +141,8 @@ private Mono>> createWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -167,22 +150,15 @@ private Mono>> createWithResponseAsync( parameters.validate(); } context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -191,20 +167,18 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String serverName, TdeCertificate parameters) { + public PollerFlux, Void> beginCreateAsync(String resourceGroupName, String serverName, + TdeCertificate parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -214,21 +188,20 @@ public PollerFlux, Void> beginCreateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCreateAsync( - String resourceGroupName, String serverName, TdeCertificate parameters, Context context) { + private PollerFlux, Void> beginCreateAsync(String resourceGroupName, String serverName, + TdeCertificate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,16 +210,16 @@ private PollerFlux, Void> beginCreateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreate( - String resourceGroupName, String serverName, TdeCertificate parameters) { - return beginCreateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + public SyncPoller, Void> beginCreate(String resourceGroupName, String serverName, + TdeCertificate parameters) { + return this.beginCreateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -256,16 +229,16 @@ public SyncPoller, Void> beginCreate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCreate( - String resourceGroupName, String serverName, TdeCertificate parameters, Context context) { - return beginCreateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginCreate(String resourceGroupName, String serverName, + TdeCertificate parameters, Context context) { + return this.beginCreateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,16 +248,15 @@ public SyncPoller, Void> beginCreate( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, TdeCertificate parameters) { - return beginCreateAsync(resourceGroupName, serverName, parameters) - .last() + return beginCreateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -294,18 +266,17 @@ public Mono createAsync(String resourceGroupName, String serverName, TdeCe * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String serverName, TdeCertificate parameters, Context context) { - return beginCreateAsync(resourceGroupName, serverName, parameters, context) - .last() + private Mono createAsync(String resourceGroupName, String serverName, TdeCertificate parameters, + Context context) { + return beginCreateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,9 +290,9 @@ public void create(String resourceGroupName, String serverName, TdeCertificate p /** * Creates a TDE certificate for a given server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java index 62903b8ed0021..af1cac97394f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.sql.models.TimeZoneListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TimeZonesClient. */ +/** + * An instance of this class provides access to all the operations defined in TimeZonesClient. + */ public final class TimeZonesClientImpl implements TimeZonesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TimeZonesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of TimeZonesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TimeZonesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(TimeZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(TimeZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,145 +62,100 @@ public final class TimeZonesClientImpl implements TimeZonesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientT") public interface TimeZonesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, - @PathParam("timeZoneId") String timeZoneId, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("timeZoneId") String timeZoneId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String locationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - locationName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -203,13 +164,13 @@ private Mono> listByLocationSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByLocationAsync(String locationName) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,14 +180,13 @@ public PagedFlux listByLocationAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String locationName, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, context), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -240,7 +200,7 @@ public PagedIterable listByLocation(String locationName) { /** * Gets a list of managed instance time zones by location. - * + * * @param locationName The locationName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,7 +215,7 @@ public PagedIterable listByLocation(String locationName, Context /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,10 +226,8 @@ public PagedIterable listByLocation(String locationName, Context @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String locationName, String timeZoneId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -278,30 +236,19 @@ public Mono> getWithResponseAsync(String locationName, S return Mono.error(new IllegalArgumentException("Parameter timeZoneId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - locationName, - timeZoneId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, timeZoneId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @param context The context to associate with this operation. @@ -311,13 +258,11 @@ public Mono> getWithResponseAsync(String locationName, S * @return a managed instance time zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String timeZoneId, Context context) { + private Mono> getWithResponseAsync(String locationName, String timeZoneId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -326,27 +271,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter timeZoneId is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - locationName, - timeZoneId, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), locationName, timeZoneId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,7 +297,7 @@ public Mono getAsync(String locationName, String timeZoneId) { /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @param context The context to associate with this operation. @@ -377,7 +313,7 @@ public Response getWithResponse(String locationName, String timeZ /** * Gets a managed instance time zone. - * + * * @param locationName The locationName parameter. * @param timeZoneId The timeZoneId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -392,9 +328,8 @@ public TimeZoneInner get(String locationName, String timeZoneId) { /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -406,31 +341,21 @@ private Mono> listByLocationNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -443,23 +368,13 @@ private Mono> listByLocationNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java index 7c793650873d0..6d25aabd99a86 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient. */ +/** + * An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient. + */ public final class TransparentDataEncryptionsClientImpl implements TransparentDataEncryptionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TransparentDataEncryptionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of TransparentDataEncryptionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TransparentDataEncryptionsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy - .create( - TransparentDataEncryptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(TransparentDataEncryptionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,89 +70,65 @@ public final class TransparentDataEncryptionsClientImpl implements TransparentDa @Host("{$host}") @ServiceInterface(name = "SqlManagementClientT") public interface TransparentDataEncryptionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/transparentDataEncryption") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") - @ExpectedResponses({200}) + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") - @ExpectedResponses({200, 201, 202}) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogicalDatabaseTransparentDataEncryptionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the logical database's transparent data encryption along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,42 +141,24 @@ private Mono> listB return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param context The context to associate with this operation. @@ -204,16 +166,14 @@ private Mono> listB * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of the logical database's transparent data encryption along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync( String resourceGroupName, String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -226,72 +186,55 @@ private Mono> listB return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedFlux}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedFlux}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -299,48 +242,48 @@ private PagedFlux listByDatabaseA /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedIterable}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets a list of the logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the logical database's transparent data encryption as paginated response with {@link - * PagedIterable}. + * @return a list of the logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -348,16 +291,14 @@ public PagedIterable listByDataba * @throws 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 logical database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -373,34 +314,21 @@ public Mono> getWithResp return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -409,20 +337,14 @@ public Mono> getWithResp * @throws 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 logical database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -438,31 +360,20 @@ private Mono> getWithRes return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -472,17 +383,17 @@ private Mono> getWithRes * @return a logical database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName) { + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -493,20 +404,16 @@ public Mono getAsync( * @return a logical database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - Context context) { + public Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, context).block(); } /** * Gets a logical database's transparent data encryption. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -516,16 +423,16 @@ public Response getWithResponse( * @return a logical database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner get( - String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName) { + public LogicalDatabaseTransparentDataEncryptionInner get(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName) { return getWithResponse(resourceGroupName, serverName, databaseName, tdeName, Context.NONE).getValue(); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -534,20 +441,15 @@ public LogicalDatabaseTransparentDataEncryptionInner 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 logical database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -563,10 +465,8 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -575,28 +475,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -606,21 +495,15 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws 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 logical database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -636,10 +519,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter tdeName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -648,25 +529,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - tdeName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -677,31 +548,23 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux< - PollResult, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, parameters); - return this - .client + public + PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, parameters); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, - this.client.getContext()); + mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, + LogicalDatabaseTransparentDataEncryptionInner.class, this.client.getContext()); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -713,33 +576,25 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, + private + PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context); - return this - .client + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, tdeName, parameters, context); + return this.client .getLroResult( - mono, - this.client.getHttpPipeline(), - LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, - context); + mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, + LogicalDatabaseTransparentDataEncryptionInner.class, context); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -750,23 +605,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters) + public + SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters) .getSyncPoller(); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -778,24 +629,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, + public + SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) .getSyncPoller(); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -806,22 +653,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -833,13 +676,9 @@ public Mono createOrUpdateAsync( * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -847,9 +686,9 @@ private Mono createOrUpdateAsync( /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -860,20 +699,17 @@ private Mono createOrUpdateAsync( * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, + public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).block(); } /** * Updates a logical database's transparent data encryption configuration. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. @@ -885,90 +721,66 @@ public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context) { + public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of transparent data encryptions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of transparent data encryptions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java index 434ccac9ad15e..77dedb62bd665 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java @@ -30,17 +30,23 @@ import com.azure.resourcemanager.sql.models.UsageListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public final class UsagesClientImpl implements UsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final UsagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of UsagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ UsagesClientImpl(SqlManagementClientImpl client) { @@ -55,54 +61,44 @@ public final class UsagesClientImpl implements UsagesClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientU") public interface UsagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools" - + "/{instancePoolName}/usages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePool( - @HostParam("$host") String endpoint, + Mono> listByInstancePool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancePoolName") String instancePoolName, - @QueryParam("expandChildren") Boolean expandChildren, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("expandChildren") Boolean expandChildren, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstancePoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all instance pool usage metrics along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return all instance pool usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync( - String resourceGroupName, String instancePoolName, Boolean expandChildren) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, Boolean expandChildren) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -113,59 +109,39 @@ private Mono> listByInstancePoolSinglePageAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByInstancePool( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - expandChildren, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, + expandChildren, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all instance pool usage metrics along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return all instance pool usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync( - String resourceGroupName, String instancePoolName, Boolean expandChildren, Context context) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, Boolean expandChildren, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -176,39 +152,23 @@ private Mono> listByInstancePoolSinglePageAsync( .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByInstancePool( - this.client.getEndpoint(), - resourceGroupName, - instancePoolName, - expandChildren, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, expandChildren, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,8 +177,8 @@ private Mono> listByInstancePoolSinglePageAsync( * @return all instance pool usage metrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, Boolean expandChildren) { + public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + Boolean expandChildren) { return new PagedFlux<>( () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expandChildren), nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); @@ -226,9 +186,9 @@ public PagedFlux listByInstancePoolAsync( /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -245,9 +205,9 @@ public PagedFlux listByInstancePoolAsync(String resourceGroupName, S /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -257,8 +217,8 @@ public PagedFlux listByInstancePoolAsync(String resourceGroupName, S * @return all instance pool usage metrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstancePoolAsync( - String resourceGroupName, String instancePoolName, Boolean expandChildren, Context context) { + private PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + Boolean expandChildren, Context context) { return new PagedFlux<>( () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expandChildren, context), nextLink -> listByInstancePoolNextSinglePageAsync(nextLink, context)); @@ -266,9 +226,9 @@ private PagedFlux listByInstancePoolAsync( /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,9 +243,9 @@ public PagedIterable listByInstancePool(String resourceGroupName, St /** * Gets all instance pool usage metrics. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -295,17 +255,16 @@ public PagedIterable listByInstancePool(String resourceGroupName, St * @return all instance pool usage metrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool( - String resourceGroupName, String instancePoolName, Boolean expandChildren, Context context) { + public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + Boolean expandChildren, Context context) { return new PagedIterable<>( listByInstancePoolAsync(resourceGroupName, instancePoolName, expandChildren, context)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -317,32 +276,22 @@ private Mono> listByInstancePoolNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -355,23 +304,13 @@ private Mono> listByInstancePoolNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java index e3ca4d73e14e2..52a5a5e451815 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java @@ -44,26 +44,29 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualClustersClient. */ -public final class VirtualClustersClientImpl - implements InnerSupportsGet, - InnerSupportsListing, - InnerSupportsDelete, - VirtualClustersClient { - /** The proxy service used to perform REST calls. */ +/** + * An instance of this class provides access to all the operations defined in VirtualClustersClient. + */ +public final class VirtualClustersClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, VirtualClustersClient { + /** + * The proxy service used to perform REST calls. + */ private final VirtualClustersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of VirtualClustersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ VirtualClustersClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(VirtualClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(VirtualClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -74,204 +77,140 @@ public final class VirtualClustersClientImpl @Host("{$host}") @ServiceInterface(name = "SqlManagementClientV") public interface VirtualClustersService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql" - + "/virtualClusters") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters" - + "/{virtualClusterName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualClusterName") String virtualClusterName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters" - + "/{virtualClusterName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualClusterName") String virtualClusterName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters" - + "/{virtualClusterName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualClusterName") String virtualClusterName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VirtualClusterUpdate parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualClusterUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters" - + "/{virtualClusterName}/updateManagedInstanceDnsServers") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateDnsServers( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualClusterName") String virtualClusterName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all virtualClusters 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 a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of all virtualClusters 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 a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all virtualClusters 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 a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. @@ -283,7 +222,7 @@ public PagedFlux listAsync() { /** * Gets a list of all virtualClusters 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. @@ -292,13 +231,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all virtualClusters 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 a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. @@ -310,7 +249,7 @@ public PagedIterable list() { /** * Gets a list of all virtualClusters 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. @@ -324,114 +263,79 @@ public PagedIterable list(Context context) { /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of virtual clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of virtual clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -439,16 +343,15 @@ private Mono> listByResourceGroupSinglePageAs */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -457,16 +360,15 @@ public PagedFlux listByResourceGroupAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -479,9 +381,9 @@ public PagedIterable listByResourceGroup(String resourceGro /** * Gets a list of virtual clusters in a resource group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @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. @@ -495,9 +397,9 @@ public PagedIterable listByResourceGroup(String resourceGro /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -505,13 +407,11 @@ public PagedIterable listByResourceGroup(String resourceGro * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String virtualClusterName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -522,32 +422,21 @@ public Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + virtualClusterName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -556,13 +445,11 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String virtualClusterName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -573,29 +460,20 @@ private Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -610,9 +488,9 @@ public Mono getByResourceGroupAsync(String resourceGroupNam /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,16 +499,16 @@ public Mono getByResourceGroupAsync(String resourceGroupNam * @return a virtual cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualClusterName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualClusterName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, virtualClusterName, context).block(); } /** * Gets a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -644,9 +522,9 @@ public VirtualClusterInner getByResourceGroup(String resourceGroupName, String v /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -654,13 +532,11 @@ public VirtualClusterInner getByResourceGroup(String resourceGroupName, String v * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualClusterName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualClusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -671,30 +547,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -703,13 +569,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualClusterName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualClusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -720,27 +584,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -750,17 +606,15 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualClusterName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualClusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -769,20 +623,19 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String virtualClusterName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualClusterName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualClusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -791,14 +644,14 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualClusterName) { - return beginDeleteAsync(resourceGroupName, virtualClusterName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, virtualClusterName).getSyncPoller(); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -807,16 +660,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualClusterName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualClusterName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualClusterName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, virtualClusterName, context).getSyncPoller(); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -825,16 +678,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String virtualClusterName) { - return beginDeleteAsync(resourceGroupName, virtualClusterName) - .last() + return beginDeleteAsync(resourceGroupName, virtualClusterName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -844,16 +696,15 @@ public Mono deleteAsync(String resourceGroupName, String virtualClusterNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String virtualClusterName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualClusterName, context) - .last() + return beginDeleteAsync(resourceGroupName, virtualClusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -866,9 +717,9 @@ public void delete(String resourceGroupName, String virtualClusterName) { /** * Deletes a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -882,9 +733,9 @@ public void delete(String resourceGroupName, String virtualClusterName, Context /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -893,13 +744,11 @@ public void delete(String resourceGroupName, String virtualClusterName, Context * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -910,10 +759,8 @@ public Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -922,26 +769,16 @@ public Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -951,13 +788,11 @@ public Mono>> updateWithResponseAsync( * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -968,10 +803,8 @@ private Mono>> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -980,23 +813,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,25 +830,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualClusterInner> beginUpdateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualClusterInner.class, - VirtualClusterInner.class, - this.client.getContext()); + public PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualClusterInner.class, VirtualClusterInner.class, this.client.getContext()); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -1033,22 +852,20 @@ public PollerFlux, VirtualClusterInner> beginUpd * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualClusterInner> beginUpdateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context) { + private PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VirtualClusterInner.class, VirtualClusterInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualClusterInner.class, VirtualClusterInner.class, context); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1057,16 +874,16 @@ private PollerFlux, VirtualClusterInner> beginUp * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> beginUpdate( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).getSyncPoller(); + public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).getSyncPoller(); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -1076,16 +893,16 @@ public SyncPoller, VirtualClusterInner> beginUpd * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> beginUpdate( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).getSyncPoller(); + public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).getSyncPoller(); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1094,18 +911,17 @@ public SyncPoller, VirtualClusterInner> beginUpd * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters) - .last() + public Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters) { + return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -1115,18 +931,17 @@ public Mono updateAsync( * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1135,16 +950,16 @@ private Mono updateAsync( * @return an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner update( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters) { + public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters) { return updateAsync(resourceGroupName, virtualClusterName, parameters).block(); } /** * Updates a virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param parameters The requested virtual cluster resource state. * @param context The context to associate with this operation. @@ -1154,31 +969,29 @@ public VirtualClusterInner update( * @return an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner update( - String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, Context context) { + public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters, Context context) { return updateAsync(resourceGroupName, virtualClusterName, parameters, context).block(); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateDnsServersWithResponseAsync( - String resourceGroupName, String virtualClusterName) { + public Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1189,48 +1002,35 @@ public Mono> updateDnsSe .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateDnsServers( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.updateDnsServers(this.client.getEndpoint(), resourceGroupName, + virtualClusterName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable managed database resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateDnsServersWithResponseAsync( - String resourceGroupName, String virtualClusterName, Context context) { + private Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1241,29 +1041,20 @@ private Mono> updateDnsS .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateDnsServers( - this.client.getEndpoint(), - resourceGroupName, - virtualClusterName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.updateDnsServers(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1271,17 +1062,17 @@ private Mono> updateDnsS * @return a recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateDnsServersAsync( - String resourceGroupName, String virtualClusterName) { + public Mono updateDnsServersAsync(String resourceGroupName, + String virtualClusterName) { return updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1290,16 +1081,16 @@ public Mono updateDnsServersAsync * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateDnsServersWithResponse( - String resourceGroupName, String virtualClusterName, Context context) { + public Response + updateDnsServersWithResponse(String resourceGroupName, String virtualClusterName, Context context) { return updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName, context).block(); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1307,16 +1098,15 @@ public Response updateDnsServersW * @return a recoverable managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateManagedInstanceDnsServersOperationInner updateDnsServers( - String resourceGroupName, String virtualClusterName) { + public UpdateManagedInstanceDnsServersOperationInner updateDnsServers(String resourceGroupName, + String virtualClusterName) { return updateDnsServersWithResponse(resourceGroupName, virtualClusterName, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1328,31 +1118,20 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1365,31 +1144,20 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1401,32 +1169,22 @@ private Mono> listByResourceGroupNextSinglePa return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1434,29 +1192,19 @@ private Mono> listByResourceGroupNextSinglePa * @return a list of virtual clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java index f0af9e421781f..a7de4c9010475 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. + */ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualNetworkRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of VirtualNetworkRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ VirtualNetworkRulesClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(VirtualNetworkRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(VirtualNetworkRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -64,100 +70,73 @@ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesC @Host("{$host}") @ServiceInterface(name = "SqlManagementClientV") public interface VirtualNetworkRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/virtualNetworkRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") - @ExpectedResponses({200}) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VirtualNetworkRuleInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualNetworkRuleInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of virtual network rules in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,57 +146,37 @@ private Mono> listByServerSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of virtual network rules in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync( - String resourceGroupName, String serverName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,38 +186,23 @@ private Mono> listByServerSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByServer( - this.client.getEndpoint(), - resourceGroupName, - serverName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -267,16 +211,15 @@ private Mono> listByServerSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName), + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,18 +228,17 @@ public PagedFlux listByServerAsync(String resourceGroup * @return a list of virtual network rules in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync( - String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -310,9 +252,9 @@ public PagedIterable listByServer(String resourceGroupN /** * Gets a list of virtual network rules in a server. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,16 +263,16 @@ public PagedIterable listByServer(String resourceGroupN * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer( - String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,13 +281,11 @@ public PagedIterable listByServer( * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -355,38 +295,25 @@ public Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -396,13 +323,11 @@ public Mono> getWithResponseAsync( * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -412,35 +337,24 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,17 +363,17 @@ private Mono> getWithResponseAsync( * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName) { + public Mono getAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName) { return getWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -469,16 +383,16 @@ public Mono getAsync( * @return a virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, context).block(); } /** * Gets a virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -493,9 +407,9 @@ public VirtualNetworkRuleInner get(String resourceGroupName, String serverName, /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -505,16 +419,11 @@ public VirtualNetworkRuleInner get(String resourceGroupName, String serverName, * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -524,15 +433,12 @@ public Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -541,27 +447,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -572,17 +468,11 @@ public Mono>> createOrUpdateWithResponseAsync( * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -592,15 +482,12 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -609,24 +496,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -637,27 +515,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, + String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualNetworkRuleInner.class, - VirtualNetworkRuleInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkRuleInner.class, VirtualNetworkRuleInner.class, + this.client.getContext()); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -669,29 +540,20 @@ public PollerFlux, VirtualNetworkRuleInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, + String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualNetworkRuleInner.class, - VirtualNetworkRuleInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + virtualNetworkRuleName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkRuleInner.class, VirtualNetworkRuleInner.class, context); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -702,19 +564,17 @@ private PollerFlux, VirtualNetworkRuleInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, + String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters) .getSyncPoller(); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -726,20 +586,17 @@ public SyncPoller, VirtualNetworkRuleInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, + String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context) .getSyncPoller(); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -749,21 +606,17 @@ public SyncPoller, VirtualNetworkRuleInner> * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters) - .last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -774,12 +627,8 @@ public Mono createOrUpdateAsync( * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -787,9 +636,9 @@ private Mono createOrUpdateAsync( /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -799,19 +648,16 @@ private Mono createOrUpdateAsync( * @return a virtual network rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkRuleInner createOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters) { + public VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters).block(); } /** * Creates or updates an existing virtual network rule. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -822,20 +668,16 @@ public VirtualNetworkRuleInner createOrUpdate( * @return a virtual network rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkRuleInner createOrUpdate( - String resourceGroupName, - String serverName, - String virtualNetworkRuleName, - VirtualNetworkRuleInner parameters, - Context context) { + public VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverName, + String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context).block(); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -844,13 +686,11 @@ public VirtualNetworkRuleInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -860,36 +700,24 @@ public Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -899,13 +727,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -915,33 +741,23 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (virtualNetworkRuleName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualNetworkRuleName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - virtualNetworkRuleName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -950,21 +766,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -974,21 +788,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -997,16 +810,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String virtualNetworkRuleName) { - return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String virtualNetworkRuleName) { + return this.beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName).getSyncPoller(); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -1016,16 +829,16 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String virtualNetworkRuleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName, context).getSyncPoller(); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1035,16 +848,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String virtualNetworkRuleName) { - return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName) - .last() + return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -1054,18 +866,17 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String virtualNetworkRuleName, + Context context) { + return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1079,9 +890,9 @@ public void delete(String resourceGroupName, String serverName, String virtualNe /** * Deletes the virtual network rule with the given name. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -1096,14 +907,13 @@ public void delete(String resourceGroupName, String serverName, String virtualNe /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1111,62 +921,42 @@ private Mono> listByServerNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByServerNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java index 6f3601a75f09a..b27ee617fa0ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkloadClassifiersClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadClassifiersClient. + */ public final class WorkloadClassifiersClientImpl implements WorkloadClassifiersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkloadClassifiersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of WorkloadClassifiersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkloadClassifiersClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(WorkloadClassifiersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(WorkloadClassifiersService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -64,96 +70,64 @@ public final class WorkloadClassifiersClientImpl implements WorkloadClassifiersC @Host("{$host}") @ServiceInterface(name = "SqlManagementClientW") public interface WorkloadClassifiersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByWorkloadGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, @PathParam("workloadClassifierName") String workloadClassifierName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, @PathParam("workloadClassifierName") String workloadClassifierName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkloadClassifierInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkloadClassifierInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, @PathParam("workloadClassifierName") String workloadClassifierName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkloadGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -161,16 +135,14 @@ Mono> listByWorkloadGroupNext( * @throws ManagementException 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 workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkloadGroupSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -187,43 +159,24 @@ private Mono> listByWorkloadGroupSinglePa .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByWorkloadGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByWorkloadGroup(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, workloadGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -232,16 +185,14 @@ private Mono> listByWorkloadGroupSinglePa * @throws ManagementException 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 workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkloadGroupSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -258,40 +209,23 @@ private Mono> listByWorkloadGroupSinglePa .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkloadGroup( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByWorkloadGroup(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -301,8 +235,8 @@ private Mono> listByWorkloadGroupSinglePa * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkloadGroupAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { return new PagedFlux<>( () -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, workloadGroupName), nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink)); @@ -310,9 +244,9 @@ public PagedFlux listByWorkloadGroupAsync( /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -323,20 +257,17 @@ public PagedFlux listByWorkloadGroupAsync( * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkloadGroupAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { - return new PagedFlux<>( - () -> - listByWorkloadGroupSinglePageAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, context), - nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink, context)); + private PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { + return new PagedFlux<>(() -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, + workloadGroupName, context), nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink, context)); } /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -346,17 +277,17 @@ private PagedFlux listByWorkloadGroupAsync( * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkloadGroup( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { return new PagedIterable<>( listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName)); } /** * Gets the list of workload classifiers for a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifiers from. @@ -367,17 +298,17 @@ public PagedIterable listByWorkloadGroup( * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkloadGroup( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { return new PagedIterable<>( listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context)); } /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -388,17 +319,11 @@ public PagedIterable listByWorkloadGroup( * @return a workload classifier along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,40 +340,26 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -460,18 +371,11 @@ public Mono> getWithResponseAsync( * @return a workload classifier along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -488,37 +392,24 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -529,22 +420,17 @@ private Mono> getWithResponseAsync( * @return a workload classifier on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -556,23 +442,17 @@ public Mono getAsync( * @return a workload classifier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { - return getWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, context).block(); } /** * Gets a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -583,22 +463,17 @@ public Response getWithResponse( * @return a workload classifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadClassifierInner get( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { - return getWithResponse( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, Context.NONE) - .getValue(); + public WorkloadClassifierInner get(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName) { + return getWithResponse(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, + Context.NONE).getValue(); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -608,21 +483,15 @@ public WorkloadClassifierInner 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 workload classifier operations for a data warehouse along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -639,15 +508,12 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -656,29 +522,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -689,22 +543,15 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return workload classifier operations for a data warehouse along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, String workloadClassifierName, + WorkloadClassifierInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -721,15 +568,12 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -738,26 +582,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -770,30 +604,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, WorkloadClassifierInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadClassifierInner.class, - WorkloadClassifierInner.class, - this.client.getContext()); + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadClassifierInner.class, WorkloadClassifierInner.class, + this.client.getContext()); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -807,38 +631,20 @@ public PollerFlux, WorkloadClassifierInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadClassifierInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context) { + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - parameters, - context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadClassifierInner.class, - WorkloadClassifierInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadClassifierInner.class, WorkloadClassifierInner.class, context); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -851,22 +657,19 @@ private PollerFlux, WorkloadClassifierInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadClassifierInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters) + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters) .getSyncPoller(); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -880,29 +683,19 @@ public SyncPoller, WorkloadClassifierInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadClassifierInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - parameters, - context) + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, WorkloadClassifierInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters, context) .getSyncPoller(); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -914,24 +707,18 @@ public SyncPoller, WorkloadClassifierInner> * @return workload classifier operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -944,31 +731,18 @@ public Mono createOrUpdateAsync( * @return workload classifier operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - parameters, - context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, + WorkloadClassifierInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -980,23 +754,17 @@ private Mono createOrUpdateAsync( * @return workload classifier operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadClassifierInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters) { - return createOrUpdateAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters) - .block(); + public WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters).block(); } /** * Creates or updates a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1009,30 +777,17 @@ public WorkloadClassifierInner createOrUpdate( * @return workload classifier operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadClassifierInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - WorkloadClassifierInner parameters, - Context context) { - return createOrUpdateAsync( - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - parameters, - context) - .block(); + public WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, WorkloadClassifierInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, parameters, context).block(); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1043,17 +798,11 @@ public WorkloadClassifierInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1070,38 +819,25 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1113,18 +849,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1141,35 +870,23 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (workloadClassifierName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter workloadClassifierName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - workloadClassifierName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1180,26 +897,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { - Mono>> mono = - deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1211,27 +921,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1242,21 +945,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName) { + return this + .beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) .getSyncPoller(); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1268,23 +968,19 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { - return beginDeleteAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, String workloadClassifierName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, + context) .getSyncPoller(); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1295,12 +991,8 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName) { + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName) { return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1308,9 +1000,9 @@ public Mono deleteAsync( /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1322,24 +1014,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { - return beginDeleteAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, String workloadClassifierName, Context context) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1349,20 +1034,16 @@ private Mono deleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, + public void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, String workloadClassifierName) { deleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName).block(); } /** * Deletes a workload classifier. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group from which to receive the classifier from. @@ -1373,27 +1054,21 @@ public void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - String workloadClassifierName, - Context context) { + public void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + String workloadClassifierName, Context context) { deleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context) .block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByWorkloadGroupNextSinglePageAsync(String nextLink) { @@ -1401,63 +1076,43 @@ private Mono> listByWorkloadGroupNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByWorkloadGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkloadGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByWorkloadGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByWorkloadGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByWorkloadGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java index f29fa100de430..c3fea2af32126 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkloadGroupsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadGroupsClient. + */ public final class WorkloadGroupsClientImpl implements WorkloadGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkloadGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final SqlManagementClientImpl client; /** * Initializes an instance of WorkloadGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkloadGroupsClientImpl(SqlManagementClientImpl client) { - this.service = - RestProxy.create(WorkloadGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkloadGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,89 +70,60 @@ public final class WorkloadGroupsClientImpl implements WorkloadGroupsClient { @Host("{$host}") @ServiceInterface(name = "SqlManagementClientW") public interface WorkloadGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkloadGroupInner parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkloadGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers" - + "/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,13 +132,11 @@ Mono> listByDatabaseNext( * @return the list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,42 +149,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -219,13 +175,11 @@ private Mono> listByDatabaseSinglePageAsync( * @return the list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -238,39 +192,23 @@ private Mono> listByDatabaseSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,18 +217,17 @@ private Mono> listByDatabaseSinglePageAsync( * @return the list of workload groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -300,8 +237,8 @@ public PagedFlux listByDatabaseAsync( * @return the list of workload groups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedFlux<>( () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); @@ -309,9 +246,9 @@ private PagedFlux listByDatabaseAsync( /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,16 +257,16 @@ private PagedFlux listByDatabaseAsync( * @return the list of workload groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * Gets the list of workload groups. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -339,16 +276,16 @@ public PagedIterable listByDatabase( * @return the list of workload groups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase( - String resourceGroupName, String serverName, String databaseName, Context context) { + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -358,13 +295,11 @@ public PagedIterable listByDatabase( * @return a workload group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -381,34 +316,21 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -419,13 +341,11 @@ public Mono> getWithResponseAsync( * @return a workload group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -442,31 +362,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -476,17 +385,17 @@ private Mono> getWithResponseAsync( * @return a workload group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -497,16 +406,16 @@ public Mono getAsync( * @return a workload group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context).block(); } /** * Gets a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -516,16 +425,16 @@ public Response getWithResponse( * @return a workload group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadGroupInner get( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public WorkloadGroupInner get(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName) { return getWithResponse(resourceGroupName, serverName, databaseName, workloadGroupName, Context.NONE).getValue(); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -534,20 +443,14 @@ public WorkloadGroupInner 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 workload group operations for a data warehouse along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, WorkloadGroupInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -564,10 +467,8 @@ public Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -576,28 +477,17 @@ public Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -607,21 +497,15 @@ public Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return workload group operations for a data warehouse along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,10 +522,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -650,25 +532,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -680,28 +553,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, WorkloadGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadGroupInner.class, - WorkloadGroupInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, workloadGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkloadGroupInner.class, WorkloadGroupInner.class, this.client.getContext()); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -714,27 +578,20 @@ public PollerFlux, WorkloadGroupInner> beginCreat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, - Context context) { + String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + WorkloadGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WorkloadGroupInner.class, WorkloadGroupInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, workloadGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkloadGroupInner.class, WorkloadGroupInner.class, context); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -745,21 +602,17 @@ private PollerFlux, WorkloadGroupInner> beginCrea * @return the {@link SyncPoller} for polling of workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters) + public SyncPoller, WorkloadGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters) .getSyncPoller(); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -771,23 +624,20 @@ public SyncPoller, WorkloadGroupInner> beginCreat * @return the {@link SyncPoller} for polling of workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadGroupInner> beginCreateOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, + public SyncPoller, WorkloadGroupInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, WorkloadGroupInner parameters, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters, + context) .getSyncPoller(); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -798,12 +648,8 @@ public SyncPoller, WorkloadGroupInner> beginCreat * @return workload group operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters) { + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, WorkloadGroupInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -811,9 +657,9 @@ public Mono createOrUpdateAsync( /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -825,24 +671,17 @@ public Mono createOrUpdateAsync( * @return workload group operations for a data warehouse on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, serverName, databaseName, workloadGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, WorkloadGroupInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -853,20 +692,16 @@ private Mono createOrUpdateAsync( * @return workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters) { + public WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, WorkloadGroupInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters).block(); } /** * Creates or updates a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -878,22 +713,17 @@ public WorkloadGroupInner createOrUpdate( * @return workload group operations for a data warehouse. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadGroupInner createOrUpdate( - String resourceGroupName, - String serverName, - String databaseName, - String workloadGroupName, - WorkloadGroupInner parameters, - Context context) { + public WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, WorkloadGroupInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, databaseName, workloadGroupName, parameters, context) .block(); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -903,13 +733,11 @@ public WorkloadGroupInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -926,32 +754,20 @@ public Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -962,13 +778,11 @@ public Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -985,29 +799,19 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1017,21 +821,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1042,21 +844,20 @@ public PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1066,16 +867,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName).getSyncPoller(); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1086,17 +887,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context) .getSyncPoller(); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1106,18 +907,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName) - .last() + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1128,18 +928,17 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String workloadGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1154,9 +953,9 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a workload group. - * + * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value - * from the Azure Resource Manager API or the portal. + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group to delete. @@ -1166,16 +965,15 @@ public void delete(String resourceGroupName, String serverName, String databaseN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context) { + public void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, + Context context) { deleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1187,31 +985,21 @@ private Mono> listByDatabaseNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @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. @@ -1219,29 +1007,19 @@ private Mono> listByDatabaseNextSinglePageAsyn * @return a list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java index 413d3e8313388..3ecc336c8492a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADAdministratorInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of active directory administrators. */ +/** + * A list of active directory administrators. + */ @Immutable -public final class AdministratorListResult { +public final class AdministratorListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AdministratorListResult class. */ + /** + * Creates an instance of AdministratorListResult class. + */ public AdministratorListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdministratorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdministratorListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorListResult. + */ + public static AdministratorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdministratorListResult deserializedAdministratorListResult = new AdministratorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerAzureADAdministratorInner.fromJson(reader1)); + deserializedAdministratorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAdministratorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdministratorListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorName.java index 4c8a3bbcf41c6..397aaf632131f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AdministratorName. */ +/** + * Defines values for AdministratorName. + */ public final class AdministratorName extends ExpandableStringEnum { - /** Static value ActiveDirectory for AdministratorName. */ + /** + * Static value ActiveDirectory for AdministratorName. + */ public static final AdministratorName ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + /** + * Creates a new instance of AdministratorName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdministratorName() { + } + /** * Creates or finds a AdministratorName from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdministratorName. */ - @JsonCreator public static AdministratorName fromString(String name) { return fromString(name, AdministratorName.class); } /** * Gets known AdministratorName values. - * + * * @return known AdministratorName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java index a801319812b7b..6dfdbe7410df1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of the sever administrator. */ +/** + * Type of the sever administrator. + */ public final class AdministratorType extends ExpandableStringEnum { - /** Static value ActiveDirectory for AdministratorType. */ + /** + * Static value ActiveDirectory for AdministratorType. + */ public static final AdministratorType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + /** + * Creates a new instance of AdministratorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdministratorType() { + } + /** * Creates or finds a AdministratorType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdministratorType. */ - @JsonCreator public static AdministratorType fromString(String name) { return fromString(name, AdministratorType.class); } /** * Gets known AdministratorType values. - * + * * @return known AdministratorType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java index ff36d26a0536a..6c86c13514d90 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AdvancedThreatProtectionName. */ +/** + * Defines values for AdvancedThreatProtectionName. + */ public final class AdvancedThreatProtectionName extends ExpandableStringEnum { - /** Static value Default for AdvancedThreatProtectionName. */ + /** + * Static value Default for AdvancedThreatProtectionName. + */ public static final AdvancedThreatProtectionName DEFAULT = fromString("Default"); + /** + * Creates a new instance of AdvancedThreatProtectionName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdvancedThreatProtectionName() { + } + /** * Creates or finds a AdvancedThreatProtectionName from its string representation. - * + * * @param name a name to look for. * @return the corresponding AdvancedThreatProtectionName. */ - @JsonCreator public static AdvancedThreatProtectionName fromString(String name) { return fromString(name, AdvancedThreatProtectionName.class); } /** * Gets known AdvancedThreatProtectionName values. - * + * * @return known AdvancedThreatProtectionName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java index dce110b4c1467..d8d6ef0060a01 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java @@ -4,24 +4,29 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been * applied yet on the specific database or server. */ public enum AdvancedThreatProtectionState { - /** Enum value New. */ + /** + * Enum value New. + */ NEW("New"), - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a AdvancedThreatProtectionState instance. */ + /** + * The actual serialized value for a AdvancedThreatProtectionState instance. + */ private final String value; AdvancedThreatProtectionState(String value) { @@ -30,11 +35,10 @@ public enum AdvancedThreatProtectionState { /** * Parses a serialized value to a AdvancedThreatProtectionState instance. - * + * * @param value the serialized value to parse. * @return the parsed AdvancedThreatProtectionState object, or null if unable to parse. */ - @JsonCreator public static AdvancedThreatProtectionState fromString(String value) { if (value == null) { return null; @@ -48,8 +52,9 @@ public static AdvancedThreatProtectionState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java index 3337bc2f725f6..96fe784c3e645 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java @@ -4,27 +4,34 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', * 'LimitedPublicPreview' and 'PrivatePreview'. */ public enum AdvisorStatus { - /** Enum value GA. */ + /** + * Enum value GA. + */ GA("GA"), - /** Enum value PublicPreview. */ + /** + * Enum value PublicPreview. + */ PUBLIC_PREVIEW("PublicPreview"), - /** Enum value LimitedPublicPreview. */ + /** + * Enum value LimitedPublicPreview. + */ LIMITED_PUBLIC_PREVIEW("LimitedPublicPreview"), - /** Enum value PrivatePreview. */ + /** + * Enum value PrivatePreview. + */ PRIVATE_PREVIEW("PrivatePreview"); - /** The actual serialized value for a AdvisorStatus instance. */ + /** + * The actual serialized value for a AdvisorStatus instance. + */ private final String value; AdvisorStatus(String value) { @@ -33,11 +40,10 @@ public enum AdvisorStatus { /** * Parses a serialized value to a AdvisorStatus instance. - * + * * @param value the serialized value to parse. * @return the parsed AdvisorStatus object, or null if unable to parse. */ - @JsonCreator public static AdvisorStatus fromString(String value) { if (value == null) { return null; @@ -51,8 +57,9 @@ public static AdvisorStatus fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java index 45d83e0d65728..4a6a3244bbce0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AggregationFunctionType. */ +/** + * Defines values for AggregationFunctionType. + */ public final class AggregationFunctionType extends ExpandableStringEnum { - /** Static value avg for AggregationFunctionType. */ + /** + * Static value avg for AggregationFunctionType. + */ public static final AggregationFunctionType AVG = fromString("avg"); - /** Static value min for AggregationFunctionType. */ + /** + * Static value min for AggregationFunctionType. + */ public static final AggregationFunctionType MIN = fromString("min"); - /** Static value max for AggregationFunctionType. */ + /** + * Static value max for AggregationFunctionType. + */ public static final AggregationFunctionType MAX = fromString("max"); - /** Static value stdev for AggregationFunctionType. */ + /** + * Static value stdev for AggregationFunctionType. + */ public static final AggregationFunctionType STDEV = fromString("stdev"); - /** Static value sum for AggregationFunctionType. */ + /** + * Static value sum for AggregationFunctionType. + */ public static final AggregationFunctionType SUM = fromString("sum"); + /** + * Creates a new instance of AggregationFunctionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AggregationFunctionType() { + } + /** * Creates or finds a AggregationFunctionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AggregationFunctionType. */ - @JsonCreator public static AggregationFunctionType fromString(String name) { return fromString(name, AggregationFunctionType.class); } /** * Gets known AggregationFunctionType values. - * + * * @return known AggregationFunctionType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java index 46934df80748f..603a419cff708 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AuthenticationName. */ +/** + * Defines values for AuthenticationName. + */ public final class AuthenticationName extends ExpandableStringEnum { - /** Static value Default for AuthenticationName. */ + /** + * Static value Default for AuthenticationName. + */ public static final AuthenticationName DEFAULT = fromString("Default"); + /** + * Creates a new instance of AuthenticationName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthenticationName() { + } + /** * Creates or finds a AuthenticationName from its string representation. - * + * * @param name a name to look for. * @return the corresponding AuthenticationName. */ - @JsonCreator public static AuthenticationName fromString(String name) { return fromString(name, AuthenticationName.class); } /** * Gets known AuthenticationName values. - * + * * @return known AuthenticationName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationType.java index 59b04dfed694b..0b84687a616f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationType.java @@ -3,8 +3,6 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; /** Defines values for AuthenticationType. */ public enum AuthenticationType { @@ -27,7 +25,6 @@ public enum AuthenticationType { * @param value the serialized value to parse. * @return the parsed AuthenticationType object, or null if unable to parse. */ - @JsonCreator public static AuthenticationType fromString(String value) { AuthenticationType[] items = AuthenticationType.values(); for (AuthenticationType item : items) { @@ -38,7 +35,6 @@ public static AuthenticationType fromString(String value) { return null; } - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java index 406bbff4a8d20..74b9a59dccd93 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java @@ -4,24 +4,29 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values * are 'Enabled' and 'Disabled'. */ public enum AutoExecuteStatus { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"), - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"); - /** The actual serialized value for a AutoExecuteStatus instance. */ + /** + * The actual serialized value for a AutoExecuteStatus instance. + */ private final String value; AutoExecuteStatus(String value) { @@ -30,11 +35,10 @@ public enum AutoExecuteStatus { /** * Parses a serialized value to a AutoExecuteStatus instance. - * + * * @param value the serialized value to parse. * @return the parsed AutoExecuteStatus object, or null if unable to parse. */ - @JsonCreator public static AutoExecuteStatus fromString(String value) { if (value == null) { return null; @@ -48,8 +52,9 @@ public static AutoExecuteStatus fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java index c41236f248da0..174253daf07e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java @@ -4,31 +4,40 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on * (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', * 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). */ public enum AutoExecuteStatusInheritedFrom { - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"), - /** Enum value Subscription. */ + /** + * Enum value Subscription. + */ SUBSCRIPTION("Subscription"), - /** Enum value Server. */ + /** + * Enum value Server. + */ SERVER("Server"), - /** Enum value ElasticPool. */ + /** + * Enum value ElasticPool. + */ ELASTIC_POOL("ElasticPool"), - /** Enum value Database. */ + /** + * Enum value Database. + */ DATABASE("Database"); - /** The actual serialized value for a AutoExecuteStatusInheritedFrom instance. */ + /** + * The actual serialized value for a AutoExecuteStatusInheritedFrom instance. + */ private final String value; AutoExecuteStatusInheritedFrom(String value) { @@ -37,11 +46,10 @@ public enum AutoExecuteStatusInheritedFrom { /** * Parses a serialized value to a AutoExecuteStatusInheritedFrom instance. - * + * * @param value the serialized value to parse. * @return the parsed AutoExecuteStatusInheritedFrom object, or null if unable to parse. */ - @JsonCreator public static AutoExecuteStatusInheritedFrom fromString(String value) { if (value == null) { return null; @@ -55,8 +63,9 @@ public static AutoExecuteStatusInheritedFrom fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java index 1768bc68b4ab9..b3c661e7d2ad6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java @@ -5,54 +5,56 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Supported auto pause delay time range. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Supported auto pause delay time range. + */ @Immutable -public final class AutoPauseDelayTimeRange { +public final class AutoPauseDelayTimeRange implements JsonSerializable { /* * Minimum value */ - @JsonProperty(value = "minValue", access = JsonProperty.Access.WRITE_ONLY) private Integer minValue; /* * Maximum value */ - @JsonProperty(value = "maxValue", access = JsonProperty.Access.WRITE_ONLY) private Integer maxValue; /* * Step value for discrete values between the minimum value and the maximum value. */ - @JsonProperty(value = "stepSize", access = JsonProperty.Access.WRITE_ONLY) private Integer stepSize; /* * Default value is no value is provided */ - @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) private Integer defaultProperty; /* * Unit of time that delay is expressed in */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private PauseDelayTimeUnit unit; /* * Value that is used to not pause (infinite delay before pause) */ - @JsonProperty(value = "doNotPauseValue", access = JsonProperty.Access.WRITE_ONLY) private Integer doNotPauseValue; - /** Creates an instance of AutoPauseDelayTimeRange class. */ + /** + * Creates an instance of AutoPauseDelayTimeRange class. + */ public AutoPauseDelayTimeRange() { } /** * Get the minValue property: Minimum value. - * + * * @return the minValue value. */ public Integer minValue() { @@ -61,7 +63,7 @@ public Integer minValue() { /** * Get the maxValue property: Maximum value. - * + * * @return the maxValue value. */ public Integer maxValue() { @@ -70,7 +72,7 @@ public Integer maxValue() { /** * Get the stepSize property: Step value for discrete values between the minimum value and the maximum value. - * + * * @return the stepSize value. */ public Integer stepSize() { @@ -79,7 +81,7 @@ public Integer stepSize() { /** * Get the defaultProperty property: Default value is no value is provided. - * + * * @return the defaultProperty value. */ public Integer defaultProperty() { @@ -88,7 +90,7 @@ public Integer defaultProperty() { /** * Get the unit property: Unit of time that delay is expressed in. - * + * * @return the unit value. */ public PauseDelayTimeUnit unit() { @@ -97,7 +99,7 @@ public PauseDelayTimeUnit unit() { /** * Get the doNotPauseValue property: Value that is used to not pause (infinite delay before pause). - * + * * @return the doNotPauseValue value. */ public Integer doNotPauseValue() { @@ -106,9 +108,54 @@ public Integer doNotPauseValue() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutoPauseDelayTimeRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutoPauseDelayTimeRange if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AutoPauseDelayTimeRange. + */ + public static AutoPauseDelayTimeRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutoPauseDelayTimeRange deserializedAutoPauseDelayTimeRange = new AutoPauseDelayTimeRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minValue".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.minValue = reader.getNullable(JsonReader::getInt); + } else if ("maxValue".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.maxValue = reader.getNullable(JsonReader::getInt); + } else if ("stepSize".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.stepSize = reader.getNullable(JsonReader::getInt); + } else if ("default".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.defaultProperty = reader.getNullable(JsonReader::getInt); + } else if ("unit".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.unit = PauseDelayTimeUnit.fromString(reader.getString()); + } else if ("doNotPauseValue".equals(fieldName)) { + deserializedAutoPauseDelayTimeRange.doNotPauseValue = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAutoPauseDelayTimeRange; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningDisabledReason.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningDisabledReason.java index a53888a64082f..291c4d0fb9f74 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningDisabledReason.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningDisabledReason.java @@ -4,33 +4,48 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Reason description if desired and actual state are different. */ +/** + * Reason description if desired and actual state are different. + */ public enum AutomaticTuningDisabledReason { - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"), - /** Enum value AutoConfigured. */ + /** + * Enum value AutoConfigured. + */ AUTO_CONFIGURED("AutoConfigured"), - /** Enum value InheritedFromServer. */ + /** + * Enum value InheritedFromServer. + */ INHERITED_FROM_SERVER("InheritedFromServer"), - /** Enum value QueryStoreOff. */ + /** + * Enum value QueryStoreOff. + */ QUERY_STORE_OFF("QueryStoreOff"), - /** Enum value QueryStoreReadOnly. */ + /** + * Enum value QueryStoreReadOnly. + */ QUERY_STORE_READ_ONLY("QueryStoreReadOnly"), - /** Enum value NotSupported. */ + /** + * Enum value NotSupported. + */ NOT_SUPPORTED("NotSupported"); - /** The actual serialized value for a AutomaticTuningDisabledReason instance. */ + /** + * The actual serialized value for a AutomaticTuningDisabledReason instance. + */ private final String value; AutomaticTuningDisabledReason(String value) { @@ -39,11 +54,10 @@ public enum AutomaticTuningDisabledReason { /** * Parses a serialized value to a AutomaticTuningDisabledReason instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningDisabledReason object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningDisabledReason fromString(String value) { if (value == null) { return null; @@ -57,8 +71,9 @@ public static AutomaticTuningDisabledReason fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningMode.java index c6cf16fcac63a..21a6e2ad453e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningMode.java @@ -4,24 +4,33 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Automatic tuning desired state. */ +/** + * Automatic tuning desired state. + */ public enum AutomaticTuningMode { - /** Enum value Inherit. */ + /** + * Enum value Inherit. + */ INHERIT("Inherit"), - /** Enum value Custom. */ + /** + * Enum value Custom. + */ CUSTOM("Custom"), - /** Enum value Auto. */ + /** + * Enum value Auto. + */ AUTO("Auto"), - /** Enum value Unspecified. */ + /** + * Enum value Unspecified. + */ UNSPECIFIED("Unspecified"); - /** The actual serialized value for a AutomaticTuningMode instance. */ + /** + * The actual serialized value for a AutomaticTuningMode instance. + */ private final String value; AutomaticTuningMode(String value) { @@ -30,11 +39,10 @@ public enum AutomaticTuningMode { /** * Parses a serialized value to a AutomaticTuningMode instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningMode object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningMode fromString(String value) { if (value == null) { return null; @@ -48,8 +56,9 @@ public static AutomaticTuningMode fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeActual.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeActual.java index cdb2765206880..1433fad73025b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeActual.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeActual.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Automatic tuning option actual state. */ +/** + * Automatic tuning option actual state. + */ public enum AutomaticTuningOptionModeActual { - /** Enum value Off. */ + /** + * Enum value Off. + */ OFF("Off"), - /** Enum value On. */ + /** + * Enum value On. + */ ON("On"); - /** The actual serialized value for a AutomaticTuningOptionModeActual instance. */ + /** + * The actual serialized value for a AutomaticTuningOptionModeActual instance. + */ private final String value; AutomaticTuningOptionModeActual(String value) { @@ -24,11 +29,10 @@ public enum AutomaticTuningOptionModeActual { /** * Parses a serialized value to a AutomaticTuningOptionModeActual instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningOptionModeActual object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningOptionModeActual fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static AutomaticTuningOptionModeActual fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeDesired.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeDesired.java index 6b46541ee6015..2cdc8aedd3e87 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeDesired.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeDesired.java @@ -4,21 +4,28 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Automatic tuning option desired state. */ +/** + * Automatic tuning option desired state. + */ public enum AutomaticTuningOptionModeDesired { - /** Enum value Off. */ + /** + * Enum value Off. + */ OFF("Off"), - /** Enum value On. */ + /** + * Enum value On. + */ ON("On"), - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"); - /** The actual serialized value for a AutomaticTuningOptionModeDesired instance. */ + /** + * The actual serialized value for a AutomaticTuningOptionModeDesired instance. + */ private final String value; AutomaticTuningOptionModeDesired(String value) { @@ -27,11 +34,10 @@ public enum AutomaticTuningOptionModeDesired { /** * Parses a serialized value to a AutomaticTuningOptionModeDesired instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningOptionModeDesired object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningOptionModeDesired fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static AutomaticTuningOptionModeDesired fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptions.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptions.java index 48bfe39c2ca47..ddf31fbd343b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptions.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptions.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Automatic tuning properties for individual advisors. */ +/** + * Automatic tuning properties for individual advisors. + */ @Fluent -public final class AutomaticTuningOptions { +public final class AutomaticTuningOptions implements JsonSerializable { /* * Automatic tuning option desired state. */ - @JsonProperty(value = "desiredState") private AutomaticTuningOptionModeDesired desiredState; /* * Automatic tuning option actual state. */ - @JsonProperty(value = "actualState", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningOptionModeActual actualState; /* * Reason code if desired and actual state are different. */ - @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) private Integer reasonCode; /* * Reason description if desired and actual state are different. */ - @JsonProperty(value = "reasonDesc", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningDisabledReason reasonDesc; - /** Creates an instance of AutomaticTuningOptions class. */ + /** + * Creates an instance of AutomaticTuningOptions class. + */ public AutomaticTuningOptions() { } /** * Get the desiredState property: Automatic tuning option desired state. - * + * * @return the desiredState value. */ public AutomaticTuningOptionModeDesired desiredState() { @@ -49,7 +53,7 @@ public AutomaticTuningOptionModeDesired desiredState() { /** * Set the desiredState property: Automatic tuning option desired state. - * + * * @param desiredState the desiredState value to set. * @return the AutomaticTuningOptions object itself. */ @@ -60,7 +64,7 @@ public AutomaticTuningOptions withDesiredState(AutomaticTuningOptionModeDesired /** * Get the actualState property: Automatic tuning option actual state. - * + * * @return the actualState value. */ public AutomaticTuningOptionModeActual actualState() { @@ -69,7 +73,7 @@ public AutomaticTuningOptionModeActual actualState() { /** * Get the reasonCode property: Reason code if desired and actual state are different. - * + * * @return the reasonCode value. */ public Integer reasonCode() { @@ -78,7 +82,7 @@ public Integer reasonCode() { /** * Get the reasonDesc property: Reason description if desired and actual state are different. - * + * * @return the reasonDesc value. */ public AutomaticTuningDisabledReason reasonDesc() { @@ -87,9 +91,54 @@ public AutomaticTuningDisabledReason reasonDesc() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutomaticTuningOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutomaticTuningOptions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AutomaticTuningOptions. + */ + public static AutomaticTuningOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutomaticTuningOptions deserializedAutomaticTuningOptions = new AutomaticTuningOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedAutomaticTuningOptions.desiredState + = AutomaticTuningOptionModeDesired.fromString(reader.getString()); + } else if ("actualState".equals(fieldName)) { + deserializedAutomaticTuningOptions.actualState + = AutomaticTuningOptionModeActual.fromString(reader.getString()); + } else if ("reasonCode".equals(fieldName)) { + deserializedAutomaticTuningOptions.reasonCode = reader.getNullable(JsonReader::getInt); + } else if ("reasonDesc".equals(fieldName)) { + deserializedAutomaticTuningOptions.reasonDesc + = AutomaticTuningDisabledReason.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAutomaticTuningOptions; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerMode.java index f21e873c6d65b..a431265ac643a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerMode.java @@ -4,21 +4,28 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Automatic tuning desired state. */ +/** + * Automatic tuning desired state. + */ public enum AutomaticTuningServerMode { - /** Enum value Custom. */ + /** + * Enum value Custom. + */ CUSTOM("Custom"), - /** Enum value Auto. */ + /** + * Enum value Auto. + */ AUTO("Auto"), - /** Enum value Unspecified. */ + /** + * Enum value Unspecified. + */ UNSPECIFIED("Unspecified"); - /** The actual serialized value for a AutomaticTuningServerMode instance. */ + /** + * The actual serialized value for a AutomaticTuningServerMode instance. + */ private final String value; AutomaticTuningServerMode(String value) { @@ -27,11 +34,10 @@ public enum AutomaticTuningServerMode { /** * Parses a serialized value to a AutomaticTuningServerMode instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningServerMode object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningServerMode fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static AutomaticTuningServerMode fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerOptions.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerOptions.java index 6c82f77daaa0c..da5bb40ade63d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerOptions.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerOptions.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Automatic tuning properties for individual advisors. */ +/** + * Automatic tuning properties for individual advisors. + */ @Fluent -public final class AutomaticTuningServerOptions { +public final class AutomaticTuningServerOptions implements JsonSerializable { /* * Automatic tuning option desired state. */ - @JsonProperty(value = "desiredState") private AutomaticTuningOptionModeDesired desiredState; /* * Automatic tuning option actual state. */ - @JsonProperty(value = "actualState", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningOptionModeActual actualState; /* * Reason code if desired and actual state are different. */ - @JsonProperty(value = "reasonCode", access = JsonProperty.Access.WRITE_ONLY) private Integer reasonCode; /* * Reason description if desired and actual state are different. */ - @JsonProperty(value = "reasonDesc", access = JsonProperty.Access.WRITE_ONLY) private AutomaticTuningServerReason reasonDesc; - /** Creates an instance of AutomaticTuningServerOptions class. */ + /** + * Creates an instance of AutomaticTuningServerOptions class. + */ public AutomaticTuningServerOptions() { } /** * Get the desiredState property: Automatic tuning option desired state. - * + * * @return the desiredState value. */ public AutomaticTuningOptionModeDesired desiredState() { @@ -49,7 +53,7 @@ public AutomaticTuningOptionModeDesired desiredState() { /** * Set the desiredState property: Automatic tuning option desired state. - * + * * @param desiredState the desiredState value to set. * @return the AutomaticTuningServerOptions object itself. */ @@ -60,7 +64,7 @@ public AutomaticTuningServerOptions withDesiredState(AutomaticTuningOptionModeDe /** * Get the actualState property: Automatic tuning option actual state. - * + * * @return the actualState value. */ public AutomaticTuningOptionModeActual actualState() { @@ -69,7 +73,7 @@ public AutomaticTuningOptionModeActual actualState() { /** * Get the reasonCode property: Reason code if desired and actual state are different. - * + * * @return the reasonCode value. */ public Integer reasonCode() { @@ -78,7 +82,7 @@ public Integer reasonCode() { /** * Get the reasonDesc property: Reason description if desired and actual state are different. - * + * * @return the reasonDesc value. */ public AutomaticTuningServerReason reasonDesc() { @@ -87,9 +91,54 @@ public AutomaticTuningServerReason reasonDesc() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutomaticTuningServerOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutomaticTuningServerOptions if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AutomaticTuningServerOptions. + */ + public static AutomaticTuningServerOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutomaticTuningServerOptions deserializedAutomaticTuningServerOptions = new AutomaticTuningServerOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedAutomaticTuningServerOptions.desiredState + = AutomaticTuningOptionModeDesired.fromString(reader.getString()); + } else if ("actualState".equals(fieldName)) { + deserializedAutomaticTuningServerOptions.actualState + = AutomaticTuningOptionModeActual.fromString(reader.getString()); + } else if ("reasonCode".equals(fieldName)) { + deserializedAutomaticTuningServerOptions.reasonCode = reader.getNullable(JsonReader::getInt); + } else if ("reasonDesc".equals(fieldName)) { + deserializedAutomaticTuningServerOptions.reasonDesc + = AutomaticTuningServerReason.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAutomaticTuningServerOptions; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerReason.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerReason.java index 9cd569c5f4573..1de752cbc7617 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerReason.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerReason.java @@ -4,21 +4,28 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Reason description if desired and actual state are different. */ +/** + * Reason description if desired and actual state are different. + */ public enum AutomaticTuningServerReason { - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"), - /** Enum value AutoConfigured. */ + /** + * Enum value AutoConfigured. + */ AUTO_CONFIGURED("AutoConfigured"); - /** The actual serialized value for a AutomaticTuningServerReason instance. */ + /** + * The actual serialized value for a AutomaticTuningServerReason instance. + */ private final String value; AutomaticTuningServerReason(String value) { @@ -27,11 +34,10 @@ public enum AutomaticTuningServerReason { /** * Parses a serialized value to a AutomaticTuningServerReason instance. - * + * * @param value the serialized value to parse. * @return the parsed AutomaticTuningServerReason object, or null if unable to parse. */ - @JsonCreator public static AutomaticTuningServerReason fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static AutomaticTuningServerReason fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java index 73bc8645df35b..28e7983162a41 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADOnlyAuthenticationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of active directory only authentications. */ +/** + * A list of active directory only authentications. + */ @Immutable -public final class AzureADOnlyAuthListResult { +public final class AzureADOnlyAuthListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AzureADOnlyAuthListResult class. */ + /** + * Creates an instance of AzureADOnlyAuthListResult class. + */ public AzureADOnlyAuthListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureADOnlyAuthListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureADOnlyAuthListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AzureADOnlyAuthListResult. + */ + public static AzureADOnlyAuthListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureADOnlyAuthListResult deserializedAzureADOnlyAuthListResult = new AzureADOnlyAuthListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerAzureADOnlyAuthenticationInner.fromJson(reader1)); + deserializedAzureADOnlyAuthListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAzureADOnlyAuthListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureADOnlyAuthListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupShortTermRetentionPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupShortTermRetentionPolicyListResult.java index a75d01bd95071..95af81fcec2f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupShortTermRetentionPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupShortTermRetentionPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of short term retention policies. */ +/** + * A list of short term retention policies. + */ @Immutable -public final class BackupShortTermRetentionPolicyListResult { +public final class BackupShortTermRetentionPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of BackupShortTermRetentionPolicyListResult class. */ + /** + * Creates an instance of BackupShortTermRetentionPolicyListResult class. + */ public BackupShortTermRetentionPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupShortTermRetentionPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupShortTermRetentionPolicyListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupShortTermRetentionPolicyListResult. + */ + public static BackupShortTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupShortTermRetentionPolicyListResult deserializedBackupShortTermRetentionPolicyListResult + = new BackupShortTermRetentionPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> BackupShortTermRetentionPolicyInner.fromJson(reader1)); + deserializedBackupShortTermRetentionPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBackupShortTermRetentionPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupShortTermRetentionPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java index 82b55613caedc..404141e560f88 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The storage account type used to store backups for this database. */ +/** + * The storage account type used to store backups for this database. + */ public final class BackupStorageRedundancy extends ExpandableStringEnum { - /** Static value Geo for BackupStorageRedundancy. */ + /** + * Static value Geo for BackupStorageRedundancy. + */ public static final BackupStorageRedundancy GEO = fromString("Geo"); - /** Static value Local for BackupStorageRedundancy. */ + /** + * Static value Local for BackupStorageRedundancy. + */ public static final BackupStorageRedundancy LOCAL = fromString("Local"); - /** Static value Zone for BackupStorageRedundancy. */ + /** + * Static value Zone for BackupStorageRedundancy. + */ public static final BackupStorageRedundancy ZONE = fromString("Zone"); - /** Static value GeoZone for BackupStorageRedundancy. */ + /** + * Static value GeoZone for BackupStorageRedundancy. + */ public static final BackupStorageRedundancy GEO_ZONE = fromString("GeoZone"); + /** + * Creates a new instance of BackupStorageRedundancy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BackupStorageRedundancy() { + } + /** * Creates or finds a BackupStorageRedundancy from its string representation. - * + * * @param name a name to look for. * @return the corresponding BackupStorageRedundancy. */ - @JsonCreator public static BackupStorageRedundancy fromString(String name) { return fromString(name, BackupStorageRedundancy.class); } /** * Gets known BackupStorageRedundancy values. - * + * * @return known BackupStorageRedundancy values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java index 9cf33bf801752..6a4e67cbc5bbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ public enum BlobAuditingPolicyState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a BlobAuditingPolicyState instance. */ + /** + * The actual serialized value for a BlobAuditingPolicyState instance. + */ private final String value; BlobAuditingPolicyState(String value) { @@ -26,11 +29,10 @@ public enum BlobAuditingPolicyState { /** * Parses a serialized value to a BlobAuditingPolicyState instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobAuditingPolicyState object, or null if unable to parse. */ - @JsonCreator public static BlobAuditingPolicyState fromString(String value) { if (value == null) { return null; @@ -44,8 +46,9 @@ public static BlobAuditingPolicyState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java index 532c5baf70f7c..a6c3327a337c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java @@ -5,42 +5,61 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CapabilityGroup. */ +/** + * Defines values for CapabilityGroup. + */ public final class CapabilityGroup extends ExpandableStringEnum { - /** Static value supportedEditions for CapabilityGroup. */ + /** + * Static value supportedEditions for CapabilityGroup. + */ public static final CapabilityGroup SUPPORTED_EDITIONS = fromString("supportedEditions"); - /** Static value supportedElasticPoolEditions for CapabilityGroup. */ + /** + * Static value supportedElasticPoolEditions for CapabilityGroup. + */ public static final CapabilityGroup SUPPORTED_ELASTIC_POOL_EDITIONS = fromString("supportedElasticPoolEditions"); - /** Static value supportedManagedInstanceVersions for CapabilityGroup. */ - public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_VERSIONS = - fromString("supportedManagedInstanceVersions"); + /** + * Static value supportedManagedInstanceVersions for CapabilityGroup. + */ + public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_VERSIONS + = fromString("supportedManagedInstanceVersions"); - /** Static value supportedInstancePoolEditions for CapabilityGroup. */ + /** + * Static value supportedInstancePoolEditions for CapabilityGroup. + */ public static final CapabilityGroup SUPPORTED_INSTANCE_POOL_EDITIONS = fromString("supportedInstancePoolEditions"); - /** Static value supportedManagedInstanceEditions for CapabilityGroup. */ - public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_EDITIONS = - fromString("supportedManagedInstanceEditions"); + /** + * Static value supportedManagedInstanceEditions for CapabilityGroup. + */ + public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_EDITIONS + = fromString("supportedManagedInstanceEditions"); + + /** + * Creates a new instance of CapabilityGroup value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapabilityGroup() { + } /** * Creates or finds a CapabilityGroup from its string representation. - * + * * @param name a name to look for. * @return the corresponding CapabilityGroup. */ - @JsonCreator public static CapabilityGroup fromString(String name) { return fromString(name, CapabilityGroup.class); } /** * Gets known CapabilityGroup values. - * + * * @return known CapabilityGroup values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java index c9e686aaf264c..9ffd6537ff186 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java @@ -4,24 +4,33 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The status of the capability. */ +/** + * The status of the capability. + */ public enum CapabilityStatus { - /** Enum value Visible. */ + /** + * Enum value Visible. + */ VISIBLE("Visible"), - /** Enum value Available. */ + /** + * Enum value Available. + */ AVAILABLE("Available"), - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a CapabilityStatus instance. */ + /** + * The actual serialized value for a CapabilityStatus instance. + */ private final String value; CapabilityStatus(String value) { @@ -30,11 +39,10 @@ public enum CapabilityStatus { /** * Parses a serialized value to a CapabilityStatus instance. - * + * * @param value the serialized value to parse. * @return the parsed CapabilityStatus object, or null if unable to parse. */ - @JsonCreator public static CapabilityStatus fromString(String value) { if (value == null) { return null; @@ -48,8 +56,9 @@ public static CapabilityStatus fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java index 717ff16438487..a7dfdd5ccf06f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Collation of the metadata catalog. */ +/** + * Collation of the metadata catalog. + */ public final class CatalogCollationType extends ExpandableStringEnum { - /** Static value DATABASE_DEFAULT for CatalogCollationType. */ + /** + * Static value DATABASE_DEFAULT for CatalogCollationType. + */ public static final CatalogCollationType DATABASE_DEFAULT = fromString("DATABASE_DEFAULT"); - /** Static value SQL_Latin1_General_CP1_CI_AS for CatalogCollationType. */ + /** + * Static value SQL_Latin1_General_CP1_CI_AS for CatalogCollationType. + */ public static final CatalogCollationType SQL_LATIN1_GENERAL_CP1_CI_AS = fromString("SQL_Latin1_General_CP1_CI_AS"); + /** + * Creates a new instance of CatalogCollationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CatalogCollationType() { + } + /** * Creates or finds a CatalogCollationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CatalogCollationType. */ - @JsonCreator public static CatalogCollationType fromString(String name) { return fromString(name, CatalogCollationType.class); } /** * Gets known CatalogCollationType values. - * + * * @return known CatalogCollationType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java index 0461742020592..f9614a68cb77c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The reason code explaining why the name is unavailable. Will be undefined if the name is available. */ +/** + * The reason code explaining why the name is unavailable. Will be undefined if the name is available. + */ public enum CheckNameAvailabilityReason { - /** Enum value Invalid. */ + /** + * Enum value Invalid. + */ INVALID("Invalid"), - /** Enum value AlreadyExists. */ + /** + * Enum value AlreadyExists. + */ ALREADY_EXISTS("AlreadyExists"); - /** The actual serialized value for a CheckNameAvailabilityReason instance. */ + /** + * The actual serialized value for a CheckNameAvailabilityReason instance. + */ private final String value; CheckNameAvailabilityReason(String value) { @@ -24,11 +29,10 @@ public enum CheckNameAvailabilityReason { /** * Parses a serialized value to a CheckNameAvailabilityReason instance. - * + * * @param value the serialized value to parse. * @return the parsed CheckNameAvailabilityReason object, or null if unable to parse. */ - @JsonCreator public static CheckNameAvailabilityReason fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static CheckNameAvailabilityReason fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java index 0234e439e071b..b0c2c116db6e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java @@ -6,31 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A request to check whether the specified name for a resource is available. */ +/** + * A request to check whether the specified name for a resource is available. + */ @Fluent -public final class CheckNameAvailabilityRequest { +public final class CheckNameAvailabilityRequest implements JsonSerializable { /* * The name property. */ - @JsonProperty(value = "name", required = true) private String name; /* * The type property. */ - @JsonProperty(value = "type", required = true) private String type = "Microsoft.Sql/servers"; - /** Creates an instance of CheckNameAvailabilityRequest class. */ + /** + * Creates an instance of CheckNameAvailabilityRequest class. + */ public CheckNameAvailabilityRequest() { - type = "Microsoft.Sql/servers"; } /** * Get the name property: The name property. - * + * * @return the name value. */ public String name() { @@ -39,7 +44,7 @@ public String name() { /** * Set the name property: The name property. - * + * * @param name the name value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -50,7 +55,7 @@ public CheckNameAvailabilityRequest withName(String name) { /** * Get the type property: The type property. - * + * * @return the type value. */ public String type() { @@ -59,7 +64,7 @@ public String type() { /** * Set the type property: The type property. - * + * * @param type the type value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -70,17 +75,54 @@ public CheckNameAvailabilityRequest withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model CheckNameAvailabilityRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model CheckNameAvailabilityRequest")); } } private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckNameAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckNameAvailabilityRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CheckNameAvailabilityRequest. + */ + public static CheckNameAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckNameAvailabilityRequest deserializedCheckNameAvailabilityRequest = new CheckNameAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedCheckNameAvailabilityRequest.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckNameAvailabilityRequest; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java index 04d9907f502ff..7c62a2d9c3e40 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java @@ -5,127 +5,204 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The column data type. */ +/** + * The column data type. + */ public final class ColumnDataType extends ExpandableStringEnum { - /** Static value image for ColumnDataType. */ + /** + * Static value image for ColumnDataType. + */ public static final ColumnDataType IMAGE = fromString("image"); - /** Static value text for ColumnDataType. */ + /** + * Static value text for ColumnDataType. + */ public static final ColumnDataType TEXT = fromString("text"); - /** Static value uniqueidentifier for ColumnDataType. */ + /** + * Static value uniqueidentifier for ColumnDataType. + */ public static final ColumnDataType UNIQUEIDENTIFIER = fromString("uniqueidentifier"); - /** Static value date for ColumnDataType. */ + /** + * Static value date for ColumnDataType. + */ public static final ColumnDataType DATE = fromString("date"); - /** Static value time for ColumnDataType. */ + /** + * Static value time for ColumnDataType. + */ public static final ColumnDataType TIME = fromString("time"); - /** Static value datetime2 for ColumnDataType. */ + /** + * Static value datetime2 for ColumnDataType. + */ public static final ColumnDataType DATETIME2 = fromString("datetime2"); - /** Static value datetimeoffset for ColumnDataType. */ + /** + * Static value datetimeoffset for ColumnDataType. + */ public static final ColumnDataType DATETIMEOFFSET = fromString("datetimeoffset"); - /** Static value tinyint for ColumnDataType. */ + /** + * Static value tinyint for ColumnDataType. + */ public static final ColumnDataType TINYINT = fromString("tinyint"); - /** Static value smallint for ColumnDataType. */ + /** + * Static value smallint for ColumnDataType. + */ public static final ColumnDataType SMALLINT = fromString("smallint"); - /** Static value int for ColumnDataType. */ + /** + * Static value int for ColumnDataType. + */ public static final ColumnDataType INT = fromString("int"); - /** Static value smalldatetime for ColumnDataType. */ + /** + * Static value smalldatetime for ColumnDataType. + */ public static final ColumnDataType SMALLDATETIME = fromString("smalldatetime"); - /** Static value real for ColumnDataType. */ + /** + * Static value real for ColumnDataType. + */ public static final ColumnDataType REAL = fromString("real"); - /** Static value money for ColumnDataType. */ + /** + * Static value money for ColumnDataType. + */ public static final ColumnDataType MONEY = fromString("money"); - /** Static value datetime for ColumnDataType. */ + /** + * Static value datetime for ColumnDataType. + */ public static final ColumnDataType DATETIME = fromString("datetime"); - /** Static value float for ColumnDataType. */ + /** + * Static value float for ColumnDataType. + */ public static final ColumnDataType FLOAT = fromString("float"); - /** Static value sql_variant for ColumnDataType. */ + /** + * Static value sql_variant for ColumnDataType. + */ public static final ColumnDataType SQL_VARIANT = fromString("sql_variant"); - /** Static value ntext for ColumnDataType. */ + /** + * Static value ntext for ColumnDataType. + */ public static final ColumnDataType NTEXT = fromString("ntext"); - /** Static value bit for ColumnDataType. */ + /** + * Static value bit for ColumnDataType. + */ public static final ColumnDataType BIT = fromString("bit"); - /** Static value decimal for ColumnDataType. */ + /** + * Static value decimal for ColumnDataType. + */ public static final ColumnDataType DECIMAL = fromString("decimal"); - /** Static value numeric for ColumnDataType. */ + /** + * Static value numeric for ColumnDataType. + */ public static final ColumnDataType NUMERIC = fromString("numeric"); - /** Static value smallmoney for ColumnDataType. */ + /** + * Static value smallmoney for ColumnDataType. + */ public static final ColumnDataType SMALLMONEY = fromString("smallmoney"); - /** Static value bigint for ColumnDataType. */ + /** + * Static value bigint for ColumnDataType. + */ public static final ColumnDataType BIGINT = fromString("bigint"); - /** Static value hierarchyid for ColumnDataType. */ + /** + * Static value hierarchyid for ColumnDataType. + */ public static final ColumnDataType HIERARCHYID = fromString("hierarchyid"); - /** Static value geometry for ColumnDataType. */ + /** + * Static value geometry for ColumnDataType. + */ public static final ColumnDataType GEOMETRY = fromString("geometry"); - /** Static value geography for ColumnDataType. */ + /** + * Static value geography for ColumnDataType. + */ public static final ColumnDataType GEOGRAPHY = fromString("geography"); - /** Static value varbinary for ColumnDataType. */ + /** + * Static value varbinary for ColumnDataType. + */ public static final ColumnDataType VARBINARY = fromString("varbinary"); - /** Static value varchar for ColumnDataType. */ + /** + * Static value varchar for ColumnDataType. + */ public static final ColumnDataType VARCHAR = fromString("varchar"); - /** Static value binary for ColumnDataType. */ + /** + * Static value binary for ColumnDataType. + */ public static final ColumnDataType BINARY = fromString("binary"); - /** Static value char for ColumnDataType. */ + /** + * Static value char for ColumnDataType. + */ public static final ColumnDataType CHAR = fromString("char"); - /** Static value timestamp for ColumnDataType. */ + /** + * Static value timestamp for ColumnDataType. + */ public static final ColumnDataType TIMESTAMP = fromString("timestamp"); - /** Static value nvarchar for ColumnDataType. */ + /** + * Static value nvarchar for ColumnDataType. + */ public static final ColumnDataType NVARCHAR = fromString("nvarchar"); - /** Static value nchar for ColumnDataType. */ + /** + * Static value nchar for ColumnDataType. + */ public static final ColumnDataType NCHAR = fromString("nchar"); - /** Static value xml for ColumnDataType. */ + /** + * Static value xml for ColumnDataType. + */ public static final ColumnDataType XML = fromString("xml"); - /** Static value sysname for ColumnDataType. */ + /** + * Static value sysname for ColumnDataType. + */ public static final ColumnDataType SYSNAME = fromString("sysname"); + /** + * Creates a new instance of ColumnDataType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ColumnDataType() { + } + /** * Creates or finds a ColumnDataType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ColumnDataType. */ - @JsonCreator public static ColumnDataType fromString(String name) { return fromString(name, ColumnDataType.class); } /** * Gets known ColumnDataType values. - * + * * @return known ColumnDataType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java index 1cbec80921963..a38c5fb0e558f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java @@ -6,24 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform a complete database restore operation. */ +/** + * Contains the information necessary to perform a complete database restore operation. + */ @Fluent -public final class CompleteDatabaseRestoreDefinition { +public final class CompleteDatabaseRestoreDefinition implements JsonSerializable { /* * The last backup name to apply */ - @JsonProperty(value = "lastBackupName", required = true) private String lastBackupName; - /** Creates an instance of CompleteDatabaseRestoreDefinition class. */ + /** + * Creates an instance of CompleteDatabaseRestoreDefinition class. + */ public CompleteDatabaseRestoreDefinition() { } /** * Get the lastBackupName property: The last backup name to apply. - * + * * @return the lastBackupName value. */ public String lastBackupName() { @@ -32,7 +39,7 @@ public String lastBackupName() { /** * Set the lastBackupName property: The last backup name to apply. - * + * * @param lastBackupName the lastBackupName value to set. * @return the CompleteDatabaseRestoreDefinition object itself. */ @@ -43,17 +50,54 @@ public CompleteDatabaseRestoreDefinition withLastBackupName(String lastBackupNam /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (lastBackupName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lastBackupName in model CompleteDatabaseRestoreDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property lastBackupName in model CompleteDatabaseRestoreDefinition")); } } private static final ClientLogger LOGGER = new ClientLogger(CompleteDatabaseRestoreDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("lastBackupName", this.lastBackupName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CompleteDatabaseRestoreDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CompleteDatabaseRestoreDefinition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CompleteDatabaseRestoreDefinition. + */ + public static CompleteDatabaseRestoreDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CompleteDatabaseRestoreDefinition deserializedCompleteDatabaseRestoreDefinition + = new CompleteDatabaseRestoreDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastBackupName".equals(fieldName)) { + deserializedCompleteDatabaseRestoreDefinition.lastBackupName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCompleteDatabaseRestoreDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java index cc79ede290066..a9cf697e5c74f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ConnectionPolicyName. */ +/** + * Defines values for ConnectionPolicyName. + */ public final class ConnectionPolicyName extends ExpandableStringEnum { - /** Static value default for ConnectionPolicyName. */ + /** + * Static value default for ConnectionPolicyName. + */ public static final ConnectionPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of ConnectionPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionPolicyName() { + } + /** * Creates or finds a ConnectionPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConnectionPolicyName. */ - @JsonCreator public static ConnectionPolicyName fromString(String name) { return fromString(name, ConnectionPolicyName.class); } /** * Gets known ConnectionPolicyName values. - * + * * @return known ConnectionPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java index 7d945bd4bbfda..f581dc1fc3455 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java @@ -5,25 +5,33 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.CopyLongTermRetentionBackupParametersProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Contains the information necessary to perform long term retention backup copy operation. */ +/** + * Contains the information necessary to perform long term retention backup copy operation. + */ @Fluent -public final class CopyLongTermRetentionBackupParameters { +public final class CopyLongTermRetentionBackupParameters + implements JsonSerializable { /* * Resource properties. */ - @JsonProperty(value = "properties") private CopyLongTermRetentionBackupParametersProperties innerProperties; - /** Creates an instance of CopyLongTermRetentionBackupParameters class. */ + /** + * Creates an instance of CopyLongTermRetentionBackupParameters class. + */ public CopyLongTermRetentionBackupParameters() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private CopyLongTermRetentionBackupParametersProperties innerProperties() { @@ -32,7 +40,7 @@ private CopyLongTermRetentionBackupParametersProperties innerProperties() { /** * Get the targetSubscriptionId property: The subscription that owns the target server. - * + * * @return the targetSubscriptionId value. */ public String targetSubscriptionId() { @@ -41,7 +49,7 @@ public String targetSubscriptionId() { /** * Set the targetSubscriptionId property: The subscription that owns the target server. - * + * * @param targetSubscriptionId the targetSubscriptionId value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ @@ -55,7 +63,7 @@ public CopyLongTermRetentionBackupParameters withTargetSubscriptionId(String tar /** * Get the targetResourceGroup property: The resource group that owns the target server. - * + * * @return the targetResourceGroup value. */ public String targetResourceGroup() { @@ -64,7 +72,7 @@ public String targetResourceGroup() { /** * Set the targetResourceGroup property: The resource group that owns the target server. - * + * * @param targetResourceGroup the targetResourceGroup value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ @@ -78,7 +86,7 @@ public CopyLongTermRetentionBackupParameters withTargetResourceGroup(String targ /** * Get the targetServerResourceId property: The resource Id of the target server that owns the database. - * + * * @return the targetServerResourceId value. */ public String targetServerResourceId() { @@ -87,7 +95,7 @@ public String targetServerResourceId() { /** * Set the targetServerResourceId property: The resource Id of the target server that owns the database. - * + * * @param targetServerResourceId the targetServerResourceId value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ @@ -101,7 +109,7 @@ public CopyLongTermRetentionBackupParameters withTargetServerResourceId(String t /** * Get the targetServerFullyQualifiedDomainName property: The fully qualified domain name of the target server. - * + * * @return the targetServerFullyQualifiedDomainName value. */ public String targetServerFullyQualifiedDomainName() { @@ -110,12 +118,12 @@ public String targetServerFullyQualifiedDomainName() { /** * Set the targetServerFullyQualifiedDomainName property: The fully qualified domain name of the target server. - * + * * @param targetServerFullyQualifiedDomainName the targetServerFullyQualifiedDomainName value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ - public CopyLongTermRetentionBackupParameters withTargetServerFullyQualifiedDomainName( - String targetServerFullyQualifiedDomainName) { + public CopyLongTermRetentionBackupParameters + withTargetServerFullyQualifiedDomainName(String targetServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { this.innerProperties = new CopyLongTermRetentionBackupParametersProperties(); } @@ -125,7 +133,7 @@ public CopyLongTermRetentionBackupParameters withTargetServerFullyQualifiedDomai /** * Get the targetDatabaseName property: The name of the database owns the copied backup. - * + * * @return the targetDatabaseName value. */ public String targetDatabaseName() { @@ -134,7 +142,7 @@ public String targetDatabaseName() { /** * Set the targetDatabaseName property: The name of the database owns the copied backup. - * + * * @param targetDatabaseName the targetDatabaseName value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ @@ -148,7 +156,7 @@ public CopyLongTermRetentionBackupParameters withTargetDatabaseName(String targe /** * Get the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the targetBackupStorageRedundancy value. */ public BackupStorageRedundancy targetBackupStorageRedundancy() { @@ -157,12 +165,12 @@ public BackupStorageRedundancy targetBackupStorageRedundancy() { /** * Set the targetBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @param targetBackupStorageRedundancy the targetBackupStorageRedundancy value to set. * @return the CopyLongTermRetentionBackupParameters object itself. */ - public CopyLongTermRetentionBackupParameters withTargetBackupStorageRedundancy( - BackupStorageRedundancy targetBackupStorageRedundancy) { + public CopyLongTermRetentionBackupParameters + withTargetBackupStorageRedundancy(BackupStorageRedundancy targetBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new CopyLongTermRetentionBackupParametersProperties(); } @@ -172,7 +180,7 @@ public CopyLongTermRetentionBackupParameters withTargetBackupStorageRedundancy( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -180,4 +188,42 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CopyLongTermRetentionBackupParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CopyLongTermRetentionBackupParameters if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CopyLongTermRetentionBackupParameters. + */ + public static CopyLongTermRetentionBackupParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CopyLongTermRetentionBackupParameters deserializedCopyLongTermRetentionBackupParameters + = new CopyLongTermRetentionBackupParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedCopyLongTermRetentionBackupParameters.innerProperties + = CopyLongTermRetentionBackupParametersProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCopyLongTermRetentionBackupParameters; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java index 2a6ab46bff6d5..4cb9486c1b5e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java @@ -6,24 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform a create database restore point operation. */ +/** + * Contains the information necessary to perform a create database restore point operation. + */ @Fluent -public final class CreateDatabaseRestorePointDefinition { +public final class CreateDatabaseRestorePointDefinition + implements JsonSerializable { /* * The restore point label to apply */ - @JsonProperty(value = "restorePointLabel", required = true) private String restorePointLabel; - /** Creates an instance of CreateDatabaseRestorePointDefinition class. */ + /** + * Creates an instance of CreateDatabaseRestorePointDefinition class. + */ public CreateDatabaseRestorePointDefinition() { } /** * Get the restorePointLabel property: The restore point label to apply. - * + * * @return the restorePointLabel value. */ public String restorePointLabel() { @@ -32,7 +40,7 @@ public String restorePointLabel() { /** * Set the restorePointLabel property: The restore point label to apply. - * + * * @param restorePointLabel the restorePointLabel value to set. * @return the CreateDatabaseRestorePointDefinition object itself. */ @@ -43,17 +51,54 @@ public CreateDatabaseRestorePointDefinition withRestorePointLabel(String restore /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (restorePointLabel() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restorePointLabel in model CreateDatabaseRestorePointDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property restorePointLabel in model CreateDatabaseRestorePointDefinition")); } } private static final ClientLogger LOGGER = new ClientLogger(CreateDatabaseRestorePointDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("restorePointLabel", this.restorePointLabel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreateDatabaseRestorePointDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreateDatabaseRestorePointDefinition if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CreateDatabaseRestorePointDefinition. + */ + public static CreateDatabaseRestorePointDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreateDatabaseRestorePointDefinition deserializedCreateDatabaseRestorePointDefinition + = new CreateDatabaseRestorePointDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("restorePointLabel".equals(fieldName)) { + deserializedCreateDatabaseRestorePointDefinition.restorePointLabel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCreateDatabaseRestorePointDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java index 756359e4b8cf0..2d53be8c1fe1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java @@ -5,82 +5,108 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** * Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID - * of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified - * as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. - * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be - * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of + * the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as + * the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId + * must be specified as the resource ID of the existing database, and restorePointInTime must be specified. + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise * sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. * restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. */ public final class CreateMode extends ExpandableStringEnum { - /** Static value Default for CreateMode. */ + /** + * Static value Default for CreateMode. + */ public static final CreateMode DEFAULT = fromString("Default"); - /** Static value Copy for CreateMode. */ + /** + * Static value Copy for CreateMode. + */ public static final CreateMode COPY = fromString("Copy"); - /** Static value Secondary for CreateMode. */ + /** + * Static value Secondary for CreateMode. + */ public static final CreateMode SECONDARY = fromString("Secondary"); - /** Static value PointInTimeRestore for CreateMode. */ + /** + * Static value PointInTimeRestore for CreateMode. + */ public static final CreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); - /** Static value Restore for CreateMode. */ + /** + * Static value Restore for CreateMode. + */ public static final CreateMode RESTORE = fromString("Restore"); - /** Static value Recovery for CreateMode. */ + /** + * Static value Recovery for CreateMode. + */ public static final CreateMode RECOVERY = fromString("Recovery"); - /** Static value RestoreExternalBackup for CreateMode. */ + /** + * Static value RestoreExternalBackup for CreateMode. + */ public static final CreateMode RESTORE_EXTERNAL_BACKUP = fromString("RestoreExternalBackup"); - /** Static value RestoreExternalBackupSecondary for CreateMode. */ + /** + * Static value RestoreExternalBackupSecondary for CreateMode. + */ public static final CreateMode RESTORE_EXTERNAL_BACKUP_SECONDARY = fromString("RestoreExternalBackupSecondary"); - /** Static value RestoreLongTermRetentionBackup for CreateMode. */ + /** + * Static value RestoreLongTermRetentionBackup for CreateMode. + */ public static final CreateMode RESTORE_LONG_TERM_RETENTION_BACKUP = fromString("RestoreLongTermRetentionBackup"); - /** Static value OnlineSecondary for CreateMode. */ + /** + * Static value OnlineSecondary for CreateMode. + */ public static final CreateMode ONLINE_SECONDARY = fromString("OnlineSecondary"); + /** + * Creates a new instance of CreateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CreateMode() { + } + /** * Creates or finds a CreateMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding CreateMode. */ - @JsonCreator public static CreateMode fromString(String name) { return fromString(name, CreateMode.class); } /** * Gets known CreateMode values. - * + * * @return known CreateMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java index f1cbc95ece158..3ee00bd9f221a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java @@ -4,30 +4,43 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The masking function that is used for the data masking rule. */ +/** + * The masking function that is used for the data masking rule. + */ public enum DataMaskingFunction { - /** Enum value Default. */ + /** + * Enum value Default. + */ DEFAULT("Default"), - /** Enum value CCN. */ + /** + * Enum value CCN. + */ CCN("CCN"), - /** Enum value Email. */ + /** + * Enum value Email. + */ EMAIL("Email"), - /** Enum value Number. */ + /** + * Enum value Number. + */ NUMBER("Number"), - /** Enum value SSN. */ + /** + * Enum value SSN. + */ SSN("SSN"), - /** Enum value Text. */ + /** + * Enum value Text. + */ TEXT("Text"); - /** The actual serialized value for a DataMaskingFunction instance. */ + /** + * The actual serialized value for a DataMaskingFunction instance. + */ private final String value; DataMaskingFunction(String value) { @@ -36,11 +49,10 @@ public enum DataMaskingFunction { /** * Parses a serialized value to a DataMaskingFunction instance. - * + * * @param value the serialized value to parse. * @return the parsed DataMaskingFunction object, or null if unable to parse. */ - @JsonCreator public static DataMaskingFunction fromString(String value) { if (value == null) { return null; @@ -54,8 +66,9 @@ public static DataMaskingFunction fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java index f8e0bcbc8aca7..e39c034b16a4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataMaskingPolicyName. */ +/** + * Defines values for DataMaskingPolicyName. + */ public final class DataMaskingPolicyName extends ExpandableStringEnum { - /** Static value Default for DataMaskingPolicyName. */ + /** + * Static value Default for DataMaskingPolicyName. + */ public static final DataMaskingPolicyName DEFAULT = fromString("Default"); + /** + * Creates a new instance of DataMaskingPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataMaskingPolicyName() { + } + /** * Creates or finds a DataMaskingPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataMaskingPolicyName. */ - @JsonCreator public static DataMaskingPolicyName fromString(String name) { return fromString(name, DataMaskingPolicyName.class); } /** * Gets known DataMaskingPolicyName values. - * + * * @return known DataMaskingPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java index 439517c1a2b47..629ab3e9765d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The list of database data masking rules. */ +/** + * The list of database data masking rules. + */ @Immutable -public final class DataMaskingRuleListResult { +public final class DataMaskingRuleListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DataMaskingRuleListResult class. */ + /** + * Creates an instance of DataMaskingRuleListResult class. + */ public DataMaskingRuleListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataMaskingRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataMaskingRuleListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataMaskingRuleListResult. + */ + public static DataMaskingRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataMaskingRuleListResult deserializedDataMaskingRuleListResult = new DataMaskingRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DataMaskingRuleInner.fromJson(reader1)); + deserializedDataMaskingRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDataMaskingRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataMaskingRuleListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java index 81db376e83e37..23bad1d5a652d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java @@ -4,22 +4,25 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, * maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be * created with ruleState set to enabled, regardless of the provided value of ruleState. */ public enum DataMaskingRuleState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a DataMaskingRuleState instance. */ + /** + * The actual serialized value for a DataMaskingRuleState instance. + */ private final String value; DataMaskingRuleState(String value) { @@ -28,11 +31,10 @@ public enum DataMaskingRuleState { /** * Parses a serialized value to a DataMaskingRuleState instance. - * + * * @param value the serialized value to parse. * @return the parsed DataMaskingRuleState object, or null if unable to parse. */ - @JsonCreator public static DataMaskingRuleState fromString(String value) { if (value == null) { return null; @@ -46,8 +48,9 @@ public static DataMaskingRuleState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java index 0e4963a070591..4aec362be5c18 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The state of the data masking policy. */ +/** + * The state of the data masking policy. + */ public enum DataMaskingState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a DataMaskingState instance. */ + /** + * The actual serialized value for a DataMaskingState instance. + */ private final String value; DataMaskingState(String value) { @@ -24,11 +29,10 @@ public enum DataMaskingState { /** * Parses a serialized value to a DataMaskingState instance. - * + * * @param value the serialized value to parse. * @return the parsed DataMaskingState object, or null if unable to parse. */ - @JsonCreator public static DataMaskingState fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static DataMaskingState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java index 0a0d608ad9309..08afa42f6a592 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DataWarehouseUserActivitiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** User activities of a data warehouse. */ +/** + * User activities of a data warehouse. + */ @Immutable -public final class DataWarehouseUserActivitiesListResult { +public final class DataWarehouseUserActivitiesListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DataWarehouseUserActivitiesListResult class. */ + /** + * Creates an instance of DataWarehouseUserActivitiesListResult class. + */ public DataWarehouseUserActivitiesListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataWarehouseUserActivitiesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataWarehouseUserActivitiesListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DataWarehouseUserActivitiesListResult. + */ + public static DataWarehouseUserActivitiesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataWarehouseUserActivitiesListResult deserializedDataWarehouseUserActivitiesListResult + = new DataWarehouseUserActivitiesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DataWarehouseUserActivitiesInner.fromJson(reader1)); + deserializedDataWarehouseUserActivitiesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDataWarehouseUserActivitiesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDataWarehouseUserActivitiesListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java index b61fbfc7e7f63..88bc62a9b617d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataWarehouseUserActivityName. */ +/** + * Defines values for DataWarehouseUserActivityName. + */ public final class DataWarehouseUserActivityName extends ExpandableStringEnum { - /** Static value current for DataWarehouseUserActivityName. */ + /** + * Static value current for DataWarehouseUserActivityName. + */ public static final DataWarehouseUserActivityName CURRENT = fromString("current"); + /** + * Creates a new instance of DataWarehouseUserActivityName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataWarehouseUserActivityName() { + } + /** * Creates or finds a DataWarehouseUserActivityName from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataWarehouseUserActivityName. */ - @JsonCreator public static DataWarehouseUserActivityName fromString(String name) { return fromString(name, DataWarehouseUserActivityName.class); } /** * Gets known DataWarehouseUserActivityName values. - * + * * @return known DataWarehouseUserActivityName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java index 0f310e99f9bc4..1b9d2b3d2ce80 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseAdvancedThreatProtectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the database's Advanced Threat Protection configurations. */ +/** + * A list of the database's Advanced Threat Protection configurations. + */ @Immutable -public final class DatabaseAdvancedThreatProtectionListResult { +public final class DatabaseAdvancedThreatProtectionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseAdvancedThreatProtectionListResult class. */ + /** + * Creates an instance of DatabaseAdvancedThreatProtectionListResult class. + */ public DatabaseAdvancedThreatProtectionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseAdvancedThreatProtectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseAdvancedThreatProtectionListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseAdvancedThreatProtectionListResult. + */ + public static DatabaseAdvancedThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseAdvancedThreatProtectionListResult deserializedDatabaseAdvancedThreatProtectionListResult + = new DatabaseAdvancedThreatProtectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseAdvancedThreatProtectionInner.fromJson(reader1)); + deserializedDatabaseAdvancedThreatProtectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseAdvancedThreatProtectionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java index af0f9bb70e720..f564cce5b6f3d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database auditing settings. */ +/** + * A list of database auditing settings. + */ @Immutable -public final class DatabaseBlobAuditingPolicyListResult { +public final class DatabaseBlobAuditingPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseBlobAuditingPolicyListResult class. */ + /** + * Creates an instance of DatabaseBlobAuditingPolicyListResult class. + */ public DatabaseBlobAuditingPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseBlobAuditingPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseBlobAuditingPolicyListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseBlobAuditingPolicyListResult. + */ + public static DatabaseBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseBlobAuditingPolicyListResult deserializedDatabaseBlobAuditingPolicyListResult + = new DatabaseBlobAuditingPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseBlobAuditingPolicyInner.fromJson(reader1)); + deserializedDatabaseBlobAuditingPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseBlobAuditingPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java index 587a16e9e34fe..db9059b0ac2ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseColumnInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database columns. */ +/** + * A list of database columns. + */ @Immutable -public final class DatabaseColumnListResult { +public final class DatabaseColumnListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseColumnListResult class. */ + /** + * Creates an instance of DatabaseColumnListResult class. + */ public DatabaseColumnListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseColumnListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseColumnListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseColumnListResult. + */ + public static DatabaseColumnListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseColumnListResult deserializedDatabaseColumnListResult = new DatabaseColumnListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseColumnInner.fromJson(reader1)); + deserializedDatabaseColumnListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseColumnListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseColumnListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseEdition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseEdition.java index 26ee6b016fc9d..346a9ed0d3f36 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseEdition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseEdition.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** Defines values for DatabaseEdition. */ @@ -57,7 +56,6 @@ public final class DatabaseEdition extends ExpandableStringEnum * @param name a name to look for. * @return the corresponding DatabaseEdition. */ - @JsonCreator public static DatabaseEdition fromString(String name) { return fromString(name, DatabaseEdition.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java index b89cd197dea0c..f881b5cd9a6c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseExtensionsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** An Import, Export, or PolybaseImport resource. */ +/** + * An Import, Export, or PolybaseImport resource. + */ @Fluent public final class DatabaseExtensions extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseExtensionsProperties innerProperties; - /** Creates an instance of DatabaseExtensions class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DatabaseExtensions class. + */ public DatabaseExtensions() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseExtensionsProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the operationMode property: Operation mode of the operation: Import, Export, or PolybaseImport. - * + * * @return the operationMode value. */ public OperationMode operationMode() { @@ -42,7 +93,7 @@ public OperationMode operationMode() { /** * Set the operationMode property: Operation mode of the operation: Import, Export, or PolybaseImport. - * + * * @param operationMode the operationMode value to set. * @return the DatabaseExtensions object itself. */ @@ -56,7 +107,7 @@ public DatabaseExtensions withOperationMode(OperationMode operationMode) { /** * Get the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. - * + * * @return the storageKeyType value. */ public StorageKeyType storageKeyType() { @@ -65,7 +116,7 @@ public StorageKeyType storageKeyType() { /** * Set the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. - * + * * @param storageKeyType the storageKeyType value to set. * @return the DatabaseExtensions object itself. */ @@ -79,7 +130,7 @@ public DatabaseExtensions withStorageKeyType(StorageKeyType storageKeyType) { /** * Get the storageKey property: Storage key for the storage account. - * + * * @return the storageKey value. */ public String storageKey() { @@ -88,7 +139,7 @@ public String storageKey() { /** * Set the storageKey property: Storage key for the storage account. - * + * * @param storageKey the storageKey value to set. * @return the DatabaseExtensions object itself. */ @@ -102,7 +153,7 @@ public DatabaseExtensions withStorageKey(String storageKey) { /** * Get the storageUri property: Storage Uri for the storage account. - * + * * @return the storageUri value. */ public String storageUri() { @@ -111,7 +162,7 @@ public String storageUri() { /** * Set the storageUri property: Storage Uri for the storage account. - * + * * @param storageUri the storageUri value to set. * @return the DatabaseExtensions object itself. */ @@ -125,7 +176,7 @@ public DatabaseExtensions withStorageUri(String storageUri) { /** * Get the administratorLogin property: Administrator login name. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -134,7 +185,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator login name. - * + * * @param administratorLogin the administratorLogin value to set. * @return the DatabaseExtensions object itself. */ @@ -148,7 +199,7 @@ public DatabaseExtensions withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: Administrator login password. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -157,7 +208,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: Administrator login password. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the DatabaseExtensions object itself. */ @@ -171,7 +222,7 @@ public DatabaseExtensions withAdministratorLoginPassword(String administratorLog /** * Get the authenticationType property: Authentication type: SQL authentication or AD password. - * + * * @return the authenticationType value. */ public String authenticationType() { @@ -180,7 +231,7 @@ public String authenticationType() { /** * Set the authenticationType property: Authentication type: SQL authentication or AD password. - * + * * @param authenticationType the authenticationType value to set. * @return the DatabaseExtensions object itself. */ @@ -195,7 +246,7 @@ public DatabaseExtensions withAuthenticationType(String authenticationType) { /** * Get the databaseEdition property: Database edition for the newly created database in the case of an import * operation. - * + * * @return the databaseEdition value. */ public String databaseEdition() { @@ -205,7 +256,7 @@ public String databaseEdition() { /** * Set the databaseEdition property: Database edition for the newly created database in the case of an import * operation. - * + * * @param databaseEdition the databaseEdition value to set. * @return the DatabaseExtensions object itself. */ @@ -220,7 +271,7 @@ public DatabaseExtensions withDatabaseEdition(String databaseEdition) { /** * Get the serviceObjectiveName property: Database service level objective for the newly created database in the * case of an import operation. - * + * * @return the serviceObjectiveName value. */ public String serviceObjectiveName() { @@ -230,7 +281,7 @@ public String serviceObjectiveName() { /** * Set the serviceObjectiveName property: Database service level objective for the newly created database in the * case of an import operation. - * + * * @param serviceObjectiveName the serviceObjectiveName value to set. * @return the DatabaseExtensions object itself. */ @@ -245,7 +296,7 @@ public DatabaseExtensions withServiceObjectiveName(String serviceObjectiveName) /** * Get the maxSizeBytes property: Database max size in bytes for the newly created database in the case of an import * operation. - * + * * @return the maxSizeBytes value. */ public String maxSizeBytes() { @@ -255,7 +306,7 @@ public String maxSizeBytes() { /** * Set the maxSizeBytes property: Database max size in bytes for the newly created database in the case of an import * operation. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseExtensions object itself. */ @@ -269,7 +320,7 @@ public DatabaseExtensions withMaxSizeBytes(String maxSizeBytes) { /** * Get the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @return the networkIsolation value. */ public NetworkIsolationSettings networkIsolation() { @@ -278,7 +329,7 @@ public NetworkIsolationSettings networkIsolation() { /** * Set the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @param networkIsolation the networkIsolation value to set. * @return the DatabaseExtensions object itself. */ @@ -292,7 +343,7 @@ public DatabaseExtensions withNetworkIsolation(NetworkIsolationSettings networkI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -300,4 +351,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseExtensions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseExtensions if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseExtensions. + */ + public static DatabaseExtensions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseExtensions deserializedDatabaseExtensions = new DatabaseExtensions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseExtensions.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseExtensions.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseExtensions.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseExtensions.innerProperties = DatabaseExtensionsProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseExtensions; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java index d21bc165af064..c6747aff8d9fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java @@ -5,40 +5,43 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; import java.util.UUID; -/** Azure Active Directory identity configuration for a resource. */ +/** + * Azure Active Directory identity configuration for a resource. + */ @Fluent -public class DatabaseIdentity { +public final class DatabaseIdentity implements JsonSerializable { /* * The identity type */ - @JsonProperty(value = "type") private DatabaseIdentityType type; /* * The Azure Active Directory tenant id. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* * The resource ids of the user assigned identities to use */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of DatabaseIdentity class. */ + /** + * Creates an instance of DatabaseIdentity class. + */ public DatabaseIdentity() { } /** * Get the type property: The identity type. - * + * * @return the type value. */ public DatabaseIdentityType type() { @@ -47,7 +50,7 @@ public DatabaseIdentityType type() { /** * Set the type property: The identity type. - * + * * @param type the type value to set. * @return the DatabaseIdentity object itself. */ @@ -58,7 +61,7 @@ public DatabaseIdentity withType(DatabaseIdentityType type) { /** * Get the tenantId property: The Azure Active Directory tenant id. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -67,7 +70,7 @@ public UUID tenantId() { /** * Get the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -76,7 +79,7 @@ public Map userAssignedIdentities() { /** * Set the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the DatabaseIdentity object itself. */ @@ -87,19 +90,61 @@ public DatabaseIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseIdentity. + */ + public static DatabaseIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseIdentity deserializedDatabaseIdentity = new DatabaseIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedDatabaseIdentity.type = DatabaseIdentityType.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedDatabaseIdentity.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> DatabaseUserIdentity.fromJson(reader1)); + deserializedDatabaseIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseIdentity; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java index 9e00f8eca8afb..90e5695869469 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The identity type. */ +/** + * The identity type. + */ public final class DatabaseIdentityType extends ExpandableStringEnum { - /** Static value None for DatabaseIdentityType. */ + /** + * Static value None for DatabaseIdentityType. + */ public static final DatabaseIdentityType NONE = fromString("None"); - /** Static value UserAssigned for DatabaseIdentityType. */ + /** + * Static value UserAssigned for DatabaseIdentityType. + */ public static final DatabaseIdentityType USER_ASSIGNED = fromString("UserAssigned"); + /** + * Creates a new instance of DatabaseIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseIdentityType() { + } + /** * Creates or finds a DatabaseIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatabaseIdentityType. */ - @JsonCreator public static DatabaseIdentityType fromString(String name) { return fromString(name, DatabaseIdentityType.class); } /** * Gets known DatabaseIdentityType values. - * + * * @return known DatabaseIdentityType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java index 45d5961140179..418835fcc84c8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * license and are eligible for the Azure Hybrid Benefit. */ public final class DatabaseLicenseType extends ExpandableStringEnum { - /** Static value LicenseIncluded for DatabaseLicenseType. */ + /** + * Static value LicenseIncluded for DatabaseLicenseType. + */ public static final DatabaseLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); - /** Static value BasePrice for DatabaseLicenseType. */ + /** + * Static value BasePrice for DatabaseLicenseType. + */ public static final DatabaseLicenseType BASE_PRICE = fromString("BasePrice"); + /** + * Creates a new instance of DatabaseLicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseLicenseType() { + } + /** * Creates or finds a DatabaseLicenseType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatabaseLicenseType. */ - @JsonCreator public static DatabaseLicenseType fromString(String name) { return fromString(name, DatabaseLicenseType.class); } /** * Gets known DatabaseLicenseType values. - * + * * @return known DatabaseLicenseType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java index ee26fa515cfba..310de55d20ab4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of databases. */ +/** + * A list of databases. + */ @Immutable -public final class DatabaseListResult { +public final class DatabaseListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseListResult class. */ + /** + * Creates an instance of DatabaseListResult class. + */ public DatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseListResult. + */ + public static DatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseListResult deserializedDatabaseListResult = new DatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DatabaseInner.fromJson(reader1)); + deserializedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java index 305b8e1772a4d..cafd64fd9c934 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list database operations request. */ +/** + * The response to a list database operations request. + */ @Immutable -public final class DatabaseOperationListResult { +public final class DatabaseOperationListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseOperationListResult class. */ + /** + * Creates an instance of DatabaseOperationListResult class. + */ public DatabaseOperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseOperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseOperationListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseOperationListResult. + */ + public static DatabaseOperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseOperationListResult deserializedDatabaseOperationListResult = new DatabaseOperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseOperationInner.fromJson(reader1)); + deserializedDatabaseOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java index 46e89c9f78cba..47a992d44b116 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -14,26 +13,38 @@ * database within an elastic pool. */ public final class DatabaseReadScale extends ExpandableStringEnum { - /** Static value Enabled for DatabaseReadScale. */ + /** + * Static value Enabled for DatabaseReadScale. + */ public static final DatabaseReadScale ENABLED = fromString("Enabled"); - /** Static value Disabled for DatabaseReadScale. */ + /** + * Static value Disabled for DatabaseReadScale. + */ public static final DatabaseReadScale DISABLED = fromString("Disabled"); + /** + * Creates a new instance of DatabaseReadScale value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseReadScale() { + } + /** * Creates or finds a DatabaseReadScale from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatabaseReadScale. */ - @JsonCreator public static DatabaseReadScale fromString(String name) { return fromString(name, DatabaseReadScale.class); } /** * Gets known DatabaseReadScale values. - * + * * @return known DatabaseReadScale values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java index dead4e2efc8a3..22d3fc1300715 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database schemas. */ +/** + * A list of database schemas. + */ @Immutable -public final class DatabaseSchemaListResult { +public final class DatabaseSchemaListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseSchemaListResult class. */ + /** + * Creates an instance of DatabaseSchemaListResult class. + */ public DatabaseSchemaListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseSchemaListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseSchemaListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseSchemaListResult. + */ + public static DatabaseSchemaListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseSchemaListResult deserializedDatabaseSchemaListResult = new DatabaseSchemaListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseSchemaInner.fromJson(reader1)); + deserializedDatabaseSchemaListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseSchemaListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseSchemaListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java index b575aa3e3488f..b71cd2238da59 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the database's security alert policies. */ +/** + * A list of the database's security alert policies. + */ @Immutable -public final class DatabaseSecurityAlertListResult { +public final class DatabaseSecurityAlertListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseSecurityAlertListResult class. */ + /** + * Creates an instance of DatabaseSecurityAlertListResult class. + */ public DatabaseSecurityAlertListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseSecurityAlertListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseSecurityAlertListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseSecurityAlertListResult. + */ + public static DatabaseSecurityAlertListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseSecurityAlertListResult deserializedDatabaseSecurityAlertListResult + = new DatabaseSecurityAlertListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseSecurityAlertPolicyInner.fromJson(reader1)); + deserializedDatabaseSecurityAlertListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseSecurityAlertListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseSecurityAlertListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java index 08e9e7efa1966..ea9cefdfdc568 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DatabaseState. */ +/** + * Defines values for DatabaseState. + */ public final class DatabaseState extends ExpandableStringEnum { - /** Static value All for DatabaseState. */ + /** + * Static value All for DatabaseState. + */ public static final DatabaseState ALL = fromString("All"); - /** Static value Live for DatabaseState. */ + /** + * Static value Live for DatabaseState. + */ public static final DatabaseState LIVE = fromString("Live"); - /** Static value Deleted for DatabaseState. */ + /** + * Static value Deleted for DatabaseState. + */ public static final DatabaseState DELETED = fromString("Deleted"); + /** + * Creates a new instance of DatabaseState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseState() { + } + /** * Creates or finds a DatabaseState from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatabaseState. */ - @JsonCreator public static DatabaseState fromString(String name) { return fromString(name, DatabaseState.class); } /** * Gets known DatabaseState values. - * + * * @return known DatabaseState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java index 6c71cad8dc368..3551210b218cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java @@ -5,99 +5,156 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the database. */ +/** + * The status of the database. + */ public final class DatabaseStatus extends ExpandableStringEnum { - /** Static value Online for DatabaseStatus. */ + /** + * Static value Online for DatabaseStatus. + */ public static final DatabaseStatus ONLINE = fromString("Online"); - /** Static value Restoring for DatabaseStatus. */ + /** + * Static value Restoring for DatabaseStatus. + */ public static final DatabaseStatus RESTORING = fromString("Restoring"); - /** Static value RecoveryPending for DatabaseStatus. */ + /** + * Static value RecoveryPending for DatabaseStatus. + */ public static final DatabaseStatus RECOVERY_PENDING = fromString("RecoveryPending"); - /** Static value Recovering for DatabaseStatus. */ + /** + * Static value Recovering for DatabaseStatus. + */ public static final DatabaseStatus RECOVERING = fromString("Recovering"); - /** Static value Suspect for DatabaseStatus. */ + /** + * Static value Suspect for DatabaseStatus. + */ public static final DatabaseStatus SUSPECT = fromString("Suspect"); - /** Static value Offline for DatabaseStatus. */ + /** + * Static value Offline for DatabaseStatus. + */ public static final DatabaseStatus OFFLINE = fromString("Offline"); - /** Static value Standby for DatabaseStatus. */ + /** + * Static value Standby for DatabaseStatus. + */ public static final DatabaseStatus STANDBY = fromString("Standby"); - /** Static value Shutdown for DatabaseStatus. */ + /** + * Static value Shutdown for DatabaseStatus. + */ public static final DatabaseStatus SHUTDOWN = fromString("Shutdown"); - /** Static value EmergencyMode for DatabaseStatus. */ + /** + * Static value EmergencyMode for DatabaseStatus. + */ public static final DatabaseStatus EMERGENCY_MODE = fromString("EmergencyMode"); - /** Static value AutoClosed for DatabaseStatus. */ + /** + * Static value AutoClosed for DatabaseStatus. + */ public static final DatabaseStatus AUTO_CLOSED = fromString("AutoClosed"); - /** Static value Copying for DatabaseStatus. */ + /** + * Static value Copying for DatabaseStatus. + */ public static final DatabaseStatus COPYING = fromString("Copying"); - /** Static value Creating for DatabaseStatus. */ + /** + * Static value Creating for DatabaseStatus. + */ public static final DatabaseStatus CREATING = fromString("Creating"); - /** Static value Inaccessible for DatabaseStatus. */ + /** + * Static value Inaccessible for DatabaseStatus. + */ public static final DatabaseStatus INACCESSIBLE = fromString("Inaccessible"); - /** Static value OfflineSecondary for DatabaseStatus. */ + /** + * Static value OfflineSecondary for DatabaseStatus. + */ public static final DatabaseStatus OFFLINE_SECONDARY = fromString("OfflineSecondary"); - /** Static value Pausing for DatabaseStatus. */ + /** + * Static value Pausing for DatabaseStatus. + */ public static final DatabaseStatus PAUSING = fromString("Pausing"); - /** Static value Paused for DatabaseStatus. */ + /** + * Static value Paused for DatabaseStatus. + */ public static final DatabaseStatus PAUSED = fromString("Paused"); - /** Static value Resuming for DatabaseStatus. */ + /** + * Static value Resuming for DatabaseStatus. + */ public static final DatabaseStatus RESUMING = fromString("Resuming"); - /** Static value Scaling for DatabaseStatus. */ + /** + * Static value Scaling for DatabaseStatus. + */ public static final DatabaseStatus SCALING = fromString("Scaling"); - /** Static value OfflineChangingDwPerformanceTiers for DatabaseStatus. */ - public static final DatabaseStatus OFFLINE_CHANGING_DW_PERFORMANCE_TIERS = - fromString("OfflineChangingDwPerformanceTiers"); + /** + * Static value OfflineChangingDwPerformanceTiers for DatabaseStatus. + */ + public static final DatabaseStatus OFFLINE_CHANGING_DW_PERFORMANCE_TIERS + = fromString("OfflineChangingDwPerformanceTiers"); - /** Static value OnlineChangingDwPerformanceTiers for DatabaseStatus. */ - public static final DatabaseStatus ONLINE_CHANGING_DW_PERFORMANCE_TIERS = - fromString("OnlineChangingDwPerformanceTiers"); + /** + * Static value OnlineChangingDwPerformanceTiers for DatabaseStatus. + */ + public static final DatabaseStatus ONLINE_CHANGING_DW_PERFORMANCE_TIERS + = fromString("OnlineChangingDwPerformanceTiers"); - /** Static value Disabled for DatabaseStatus. */ + /** + * Static value Disabled for DatabaseStatus. + */ public static final DatabaseStatus DISABLED = fromString("Disabled"); - /** Static value Stopping for DatabaseStatus. */ + /** + * Static value Stopping for DatabaseStatus. + */ public static final DatabaseStatus STOPPING = fromString("Stopping"); - /** Static value Stopped for DatabaseStatus. */ + /** + * Static value Stopped for DatabaseStatus. + */ public static final DatabaseStatus STOPPED = fromString("Stopped"); - /** Static value Starting for DatabaseStatus. */ + /** + * Static value Starting for DatabaseStatus. + */ public static final DatabaseStatus STARTING = fromString("Starting"); + /** + * Creates a new instance of DatabaseStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseStatus() { + } + /** * Creates or finds a DatabaseStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatabaseStatus. */ - @JsonCreator public static DatabaseStatus fromString(String name) { return fromString(name, DatabaseStatus.class); } /** * Gets known DatabaseStatus values. - * + * * @return known DatabaseStatus values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java index f381f052068c4..5feac018ab93a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database tables. */ +/** + * A list of database tables. + */ @Immutable -public final class DatabaseTableListResult { +public final class DatabaseTableListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseTableListResult class. */ + /** + * Creates an instance of DatabaseTableListResult class. + */ public DatabaseTableListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseTableListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseTableListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseTableListResult. + */ + public static DatabaseTableListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseTableListResult deserializedDatabaseTableListResult = new DatabaseTableListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DatabaseTableInner.fromJson(reader1)); + deserializedDatabaseTableListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseTableListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseTableListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java index 7d6749afe1880..5b5a7c0d17a3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java @@ -5,48 +5,50 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseUpdateProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; import java.util.UUID; -/** A database update resource. */ +/** + * A database update resource. + */ @Fluent -public final class DatabaseUpdate { +public final class DatabaseUpdate implements JsonSerializable { /* * The name and tier of the SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Database identity */ - @JsonProperty(value = "identity") private DatabaseIdentity identity; /* * Resource properties. */ - @JsonProperty(value = "properties") private DatabaseUpdateProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of DatabaseUpdate class. */ + /** + * Creates an instance of DatabaseUpdate class. + */ public DatabaseUpdate() { } /** * Get the sku property: The name and tier of the SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -55,7 +57,7 @@ public Sku sku() { /** * Set the sku property: The name and tier of the SKU. - * + * * @param sku the sku value to set. * @return the DatabaseUpdate object itself. */ @@ -66,7 +68,7 @@ public DatabaseUpdate withSku(Sku sku) { /** * Get the identity property: Database identity. - * + * * @return the identity value. */ public DatabaseIdentity identity() { @@ -75,7 +77,7 @@ public DatabaseIdentity identity() { /** * Set the identity property: Database identity. - * + * * @param identity the identity value to set. * @return the DatabaseUpdate object itself. */ @@ -86,7 +88,7 @@ public DatabaseUpdate withIdentity(DatabaseIdentity identity) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private DatabaseUpdateProperties innerProperties() { @@ -95,7 +97,7 @@ private DatabaseUpdateProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -104,7 +106,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the DatabaseUpdate object itself. */ @@ -115,32 +117,32 @@ public DatabaseUpdate withTags(Map tags) { /** * Get the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @return the createMode value. */ public CreateMode createMode() { @@ -149,32 +151,32 @@ public CreateMode createMode() { /** * Set the createMode property: Specifies the mode of database creation. - * - *

Default: regular database creation. - * - *

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource - * ID of the source database. - * - *

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be - * specified as the resource ID of the existing primary database. - * - *

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID + * of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified + * as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. * sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be * specified. - * - *

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the * recoverable database resource ID to restore. - * - *

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. - * If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If + * sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. * Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is * ignored. restorePointInTime may also be specified to restore from an earlier point in time. - * - *

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. * recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. - * - *

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. - * + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. + * * @param createMode the createMode value to set. * @return the DatabaseUpdate object itself. */ @@ -188,7 +190,7 @@ public DatabaseUpdate withCreateMode(CreateMode createMode) { /** * Get the collation property: The collation of the database. - * + * * @return the collation value. */ public String collation() { @@ -197,7 +199,7 @@ public String collation() { /** * Set the collation property: The collation of the database. - * + * * @param collation the collation value to set. * @return the DatabaseUpdate object itself. */ @@ -211,7 +213,7 @@ public DatabaseUpdate withCollation(String collation) { /** * Get the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -220,7 +222,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The max size of the database expressed in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the DatabaseUpdate object itself. */ @@ -234,7 +236,7 @@ public DatabaseUpdate withMaxSizeBytes(Long maxSizeBytes) { /** * Get the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @return the sampleName value. */ public SampleName sampleName() { @@ -243,7 +245,7 @@ public SampleName sampleName() { /** * Set the sampleName property: The name of the sample schema to apply when creating this database. - * + * * @param sampleName the sampleName value to set. * @return the DatabaseUpdate object itself. */ @@ -257,7 +259,7 @@ public DatabaseUpdate withSampleName(SampleName sampleName) { /** * Get the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @return the elasticPoolId value. */ public String elasticPoolId() { @@ -266,7 +268,7 @@ public String elasticPoolId() { /** * Set the elasticPoolId property: The resource identifier of the elastic pool containing this database. - * + * * @param elasticPoolId the elasticPoolId value to set. * @return the DatabaseUpdate object itself. */ @@ -281,7 +283,7 @@ public DatabaseUpdate withElasticPoolId(String elasticPoolId) { /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -291,7 +293,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the DatabaseUpdate object itself. */ @@ -305,7 +307,7 @@ public DatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) { /** * Get the status property: The status of the database. - * + * * @return the status value. */ public DatabaseStatus status() { @@ -314,7 +316,7 @@ public DatabaseStatus status() { /** * Get the databaseId property: The ID of the database. - * + * * @return the databaseId value. */ public UUID databaseId() { @@ -323,7 +325,7 @@ public UUID databaseId() { /** * Get the creationDate property: The creation date of the database (ISO8601 format). - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -332,7 +334,7 @@ public OffsetDateTime creationDate() { /** * Get the currentServiceObjectiveName property: The current service level objective name of the database. - * + * * @return the currentServiceObjectiveName value. */ public String currentServiceObjectiveName() { @@ -341,7 +343,7 @@ public String currentServiceObjectiveName() { /** * Get the requestedServiceObjectiveName property: The requested service level objective name of the database. - * + * * @return the requestedServiceObjectiveName value. */ public String requestedServiceObjectiveName() { @@ -350,7 +352,7 @@ public String requestedServiceObjectiveName() { /** * Get the defaultSecondaryLocation property: The default secondary region for this database. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -359,7 +361,7 @@ public String defaultSecondaryLocation() { /** * Get the failoverGroupId property: Failover Group resource identifier that this database belongs to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -369,7 +371,7 @@ public String failoverGroupId() { /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -379,7 +381,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the DatabaseUpdate object itself. */ @@ -393,7 +395,7 @@ public DatabaseUpdate withRestorePointInTime(OffsetDateTime restorePointInTime) /** * Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { @@ -402,7 +404,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { /** * Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted. - * + * * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. * @return the DatabaseUpdate object itself. */ @@ -417,7 +419,7 @@ public DatabaseUpdate withSourceDatabaseDeletionDate(OffsetDateTime sourceDataba /** * Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @return the recoveryServicesRecoveryPointId value. */ public String recoveryServicesRecoveryPointId() { @@ -427,7 +429,7 @@ public String recoveryServicesRecoveryPointId() { /** * Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with * create operation of this database. - * + * * @param recoveryServicesRecoveryPointId the recoveryServicesRecoveryPointId value to set. * @return the DatabaseUpdate object itself. */ @@ -442,7 +444,7 @@ public DatabaseUpdate withRecoveryServicesRecoveryPointId(String recoveryService /** * Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -452,7 +454,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup * associated with create operation of this database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the DatabaseUpdate object itself. */ @@ -467,7 +469,7 @@ public DatabaseUpdate withLongTermRetentionBackupResourceId(String longTermReten /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -477,7 +479,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the DatabaseUpdate object itself. */ @@ -492,7 +494,7 @@ public DatabaseUpdate withRecoverableDatabaseId(String recoverableDatabaseId) { /** * Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -502,7 +504,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database * associated with create operation of this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the DatabaseUpdate object itself. */ @@ -516,7 +518,7 @@ public DatabaseUpdate withRestorableDroppedDatabaseId(String restorableDroppedDa /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -525,7 +527,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the DatabaseUpdate object itself. */ @@ -540,7 +542,7 @@ public DatabaseUpdate withCatalogCollation(CatalogCollationType catalogCollation /** * Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -550,7 +552,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this * database will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the DatabaseUpdate object itself. */ @@ -565,7 +567,7 @@ public DatabaseUpdate withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @return the licenseType value. */ public DatabaseLicenseType licenseType() { @@ -575,7 +577,7 @@ public DatabaseLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a * license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. - * + * * @param licenseType the licenseType value to set. * @return the DatabaseUpdate object itself. */ @@ -589,7 +591,7 @@ public DatabaseUpdate withLicenseType(DatabaseLicenseType licenseType) { /** * Get the maxLogSizeBytes property: The max log size for this database. - * + * * @return the maxLogSizeBytes value. */ public Long maxLogSizeBytes() { @@ -599,7 +601,7 @@ public Long maxLogSizeBytes() { /** * Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for * this database (ISO8601 format). - * + * * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { @@ -610,7 +612,7 @@ public OffsetDateTime earliestRestoreDate() { * Get the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @return the readScale value. */ public DatabaseReadScale readScale() { @@ -621,7 +623,7 @@ public DatabaseReadScale readScale() { * Set the readScale property: The state of read-only routing. If enabled, connections that have application intent * set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not * applicable to a Hyperscale database within an elastic pool. - * + * * @param readScale the readScale value to set. * @return the DatabaseUpdate object itself. */ @@ -636,7 +638,7 @@ public DatabaseUpdate withReadScale(DatabaseReadScale readScale) { /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -646,7 +648,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseUpdate object itself. */ @@ -661,7 +663,7 @@ public DatabaseUpdate withHighAvailabilityReplicaCount(Integer highAvailabilityR /** * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @return the secondaryType value. */ public SecondaryType secondaryType() { @@ -671,7 +673,7 @@ public SecondaryType secondaryType() { /** * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and * Named. - * + * * @param secondaryType the secondaryType value to set. * @return the DatabaseUpdate object itself. */ @@ -685,7 +687,7 @@ public DatabaseUpdate withSecondaryType(SecondaryType secondaryType) { /** * Get the currentSku property: The name and tier of the SKU. - * + * * @return the currentSku value. */ public Sku currentSku() { @@ -695,7 +697,7 @@ public Sku currentSku() { /** * Get the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @return the autoPauseDelay value. */ public Integer autoPauseDelay() { @@ -705,7 +707,7 @@ public Integer autoPauseDelay() { /** * Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 * means that automatic pause is disabled. - * + * * @param autoPauseDelay the autoPauseDelay value to set. * @return the DatabaseUpdate object itself. */ @@ -720,7 +722,7 @@ public DatabaseUpdate withAutoPauseDelay(Integer autoPauseDelay) { /** * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * database. - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -730,7 +732,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { /** * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -740,12 +742,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * database. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the DatabaseUpdate object itself. */ - public DatabaseUpdate withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public DatabaseUpdate + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new DatabaseUpdateProperties(); } @@ -755,7 +757,7 @@ public DatabaseUpdate withRequestedBackupStorageRedundancy( /** * Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -764,7 +766,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the DatabaseUpdate object itself. */ @@ -779,7 +781,7 @@ public DatabaseUpdate withMinCapacity(Double minCapacity) { /** * Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format). * Null if the database is ready. - * + * * @return the pausedDate value. */ public OffsetDateTime pausedDate() { @@ -789,7 +791,7 @@ public OffsetDateTime pausedDate() { /** * Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 * format). Null if the database is paused. - * + * * @return the resumedDate value. */ public OffsetDateTime resumedDate() { @@ -799,7 +801,7 @@ public OffsetDateTime resumedDate() { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -809,7 +811,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This * configuration defines the period when the maintenance updates will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the DatabaseUpdate object itself. */ @@ -825,7 +827,7 @@ public DatabaseUpdate withMaintenanceConfigurationId(String maintenanceConfigura * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @return the isLedgerOn value. */ public Boolean isLedgerOn() { @@ -836,7 +838,7 @@ public Boolean isLedgerOn() { * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the * database are ledger tables. Note: the value of this property cannot be changed after the database has been * created. - * + * * @param isLedgerOn the isLedgerOn value to set. * @return the DatabaseUpdate object itself. */ @@ -850,7 +852,7 @@ public DatabaseUpdate withIsLedgerOn(Boolean isLedgerOn) { /** * Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database. - * + * * @return the isInfraEncryptionEnabled value. */ public Boolean isInfraEncryptionEnabled() { @@ -859,7 +861,7 @@ public Boolean isInfraEncryptionEnabled() { /** * Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -868,7 +870,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the DatabaseUpdate object itself. */ @@ -882,7 +884,7 @@ public DatabaseUpdate withFederatedClientId(UUID federatedClientId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -896,4 +898,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseUpdate. + */ + public static DatabaseUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUpdate deserializedDatabaseUpdate = new DatabaseUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sku".equals(fieldName)) { + deserializedDatabaseUpdate.sku = Sku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedDatabaseUpdate.identity = DatabaseIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseUpdate.innerProperties = DatabaseUpdateProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDatabaseUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java index e28f81ea3ac89..6177b7e89738b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseUsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database usage metrics. */ +/** + * A list of database usage metrics. + */ @Immutable -public final class DatabaseUsageListResult { +public final class DatabaseUsageListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseUsageListResult class. */ + /** + * Creates an instance of DatabaseUsageListResult class. + */ public DatabaseUsageListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUsageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUsageListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseUsageListResult. + */ + public static DatabaseUsageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUsageListResult deserializedDatabaseUsageListResult = new DatabaseUsageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DatabaseUsageInner.fromJson(reader1)); + deserializedDatabaseUsageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseUsageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUsageListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java index 0deec2e991194..0cc4ad56a30cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.UUID; -/** Azure Active Directory identity configuration for a resource. */ +/** + * Azure Active Directory identity configuration for a resource. + */ @Immutable -public class DatabaseUserIdentity { +public final class DatabaseUserIdentity implements JsonSerializable { /* * The Azure Active Directory principal id. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* * The Azure Active Directory client id. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of DatabaseUserIdentity class. */ + /** + * Creates an instance of DatabaseUserIdentity class. + */ public DatabaseUserIdentity() { } /** * Get the principalId property: The Azure Active Directory principal id. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +44,7 @@ public UUID principalId() { /** * Get the clientId property: The Azure Active Directory client id. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,9 +53,48 @@ public UUID clientId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseUserIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseUserIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseUserIdentity. + */ + public static DatabaseUserIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseUserIdentity deserializedDatabaseUserIdentity = new DatabaseUserIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedDatabaseUserIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("clientId".equals(fieldName)) { + deserializedDatabaseUserIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseUserIdentity; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java index 1c1ed48466e4a..333123029c151 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the database's vulnerability assessments. */ +/** + * A list of the database's vulnerability assessments. + */ @Immutable -public final class DatabaseVulnerabilityAssessmentListResult { +public final class DatabaseVulnerabilityAssessmentListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DatabaseVulnerabilityAssessmentListResult class. */ + /** + * Creates an instance of DatabaseVulnerabilityAssessmentListResult class. + */ public DatabaseVulnerabilityAssessmentListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentListResult. + */ + public static DatabaseVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentListResult deserializedDatabaseVulnerabilityAssessmentListResult + = new DatabaseVulnerabilityAssessmentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DatabaseVulnerabilityAssessmentInner.fromJson(reader1)); + deserializedDatabaseVulnerabilityAssessmentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java new file mode 100644 index 0000000000000..1fbcf22b3824a --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of the database's vulnerability assessments. + */ +@Immutable +public final class DatabaseVulnerabilityAssessmentListResultAutoGenerated + implements JsonSerializable { + /* + * Array of results. + */ + private List value; + + /* + * Link to retrieve next page of results. + */ + private String nextLink; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentListResultAutoGenerated class. + */ + public DatabaseVulnerabilityAssessmentListResultAutoGenerated() { + } + + /** + * Get the value property: Array of results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to retrieve next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentListResultAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentListResultAutoGenerated if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentListResultAutoGenerated. + */ + public static DatabaseVulnerabilityAssessmentListResultAutoGenerated fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentListResultAutoGenerated deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated + = new DatabaseVulnerabilityAssessmentListResultAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader + .readArray(reader1 -> DatabaseVulnerabilityAssessmentAutoGeneratedInner.fromJson(reader1)); + deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated; + }); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java index c1646a61ef182..8aee647505903 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java @@ -6,25 +6,33 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. */ +/** + * Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. + */ @Fluent -public final class DatabaseVulnerabilityAssessmentRuleBaselineItem { +public final class DatabaseVulnerabilityAssessmentRuleBaselineItem + implements JsonSerializable { /* * The rule baseline result */ - @JsonProperty(value = "result", required = true) private List result; - /** Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineItem class. */ + /** + * Creates an instance of DatabaseVulnerabilityAssessmentRuleBaselineItem class. + */ public DatabaseVulnerabilityAssessmentRuleBaselineItem() { } /** * Get the result property: The rule baseline result. - * + * * @return the result value. */ public List result() { @@ -33,7 +41,7 @@ public List result() { /** * Set the result property: The rule baseline result. - * + * * @param result the result value to set. * @return the DatabaseVulnerabilityAssessmentRuleBaselineItem object itself. */ @@ -44,17 +52,55 @@ public DatabaseVulnerabilityAssessmentRuleBaselineItem withResult(List r /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (result() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property result in model DatabaseVulnerabilityAssessmentRuleBaselineItem")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property result in model DatabaseVulnerabilityAssessmentRuleBaselineItem")); } } private static final ClientLogger LOGGER = new ClientLogger(DatabaseVulnerabilityAssessmentRuleBaselineItem.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("result", this.result, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentRuleBaselineItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentRuleBaselineItem if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DatabaseVulnerabilityAssessmentRuleBaselineItem. + */ + public static DatabaseVulnerabilityAssessmentRuleBaselineItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentRuleBaselineItem deserializedDatabaseVulnerabilityAssessmentRuleBaselineItem + = new DatabaseVulnerabilityAssessmentRuleBaselineItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("result".equals(fieldName)) { + List result = reader.readArray(reader1 -> reader1.getString()); + deserializedDatabaseVulnerabilityAssessmentRuleBaselineItem.result = result; + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentRuleBaselineItem; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java index 525673dd96f9d..f6a90e6757d0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java @@ -5,46 +5,69 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Day of maintenance window. */ +/** + * Day of maintenance window. + */ public final class DayOfWeek extends ExpandableStringEnum { - /** Static value Sunday for DayOfWeek. */ + /** + * Static value Sunday for DayOfWeek. + */ public static final DayOfWeek SUNDAY = fromString("Sunday"); - /** Static value Monday for DayOfWeek. */ + /** + * Static value Monday for DayOfWeek. + */ public static final DayOfWeek MONDAY = fromString("Monday"); - /** Static value Tuesday for DayOfWeek. */ + /** + * Static value Tuesday for DayOfWeek. + */ public static final DayOfWeek TUESDAY = fromString("Tuesday"); - /** Static value Wednesday for DayOfWeek. */ + /** + * Static value Wednesday for DayOfWeek. + */ public static final DayOfWeek WEDNESDAY = fromString("Wednesday"); - /** Static value Thursday for DayOfWeek. */ + /** + * Static value Thursday for DayOfWeek. + */ public static final DayOfWeek THURSDAY = fromString("Thursday"); - /** Static value Friday for DayOfWeek. */ + /** + * Static value Friday for DayOfWeek. + */ public static final DayOfWeek FRIDAY = fromString("Friday"); - /** Static value Saturday for DayOfWeek. */ + /** + * Static value Saturday for DayOfWeek. + */ public static final DayOfWeek SATURDAY = fromString("Saturday"); + /** + * Creates a new instance of DayOfWeek value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DayOfWeek() { + } + /** * Creates or finds a DayOfWeek from its string representation. - * + * * @param name a name to look for. * @return the corresponding DayOfWeek. */ - @JsonCreator public static DayOfWeek fromString(String name) { return fromString(name, DayOfWeek.class); } /** * Gets known DayOfWeek values. - * + * * @return known DayOfWeek values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java index 18f1b6c106dd7..9c9d8365871d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DeletedServerInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of deleted servers. */ +/** + * A list of deleted servers. + */ @Immutable -public final class DeletedServerListResult { +public final class DeletedServerListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DeletedServerListResult class. */ + /** + * Creates an instance of DeletedServerListResult class. + */ public DeletedServerListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeletedServerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeletedServerListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeletedServerListResult. + */ + public static DeletedServerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeletedServerListResult deserializedDeletedServerListResult = new DeletedServerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DeletedServerInner.fromJson(reader1)); + deserializedDeletedServerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDeletedServerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeletedServerListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java index 3335b9c4978b8..9a2e54f5b824e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * supported. This is only applicable to live databases but not dropped databases. */ public final class DiffBackupIntervalInHours extends ExpandableStringEnum { - /** Static value 12 for DiffBackupIntervalInHours. */ + /** + * Static value 12 for DiffBackupIntervalInHours. + */ public static final DiffBackupIntervalInHours ONE_TWO = fromInt(12); - /** Static value 24 for DiffBackupIntervalInHours. */ + /** + * Static value 24 for DiffBackupIntervalInHours. + */ public static final DiffBackupIntervalInHours TWO_FOUR = fromInt(24); + /** + * Creates a new instance of DiffBackupIntervalInHours value. + * + * @deprecated Use the {@link #fromInt(int)} factory method. + */ + @Deprecated + public DiffBackupIntervalInHours() { + } + /** * Creates or finds a DiffBackupIntervalInHours from its string representation. - * + * * @param name a name to look for. * @return the corresponding DiffBackupIntervalInHours. */ - @JsonCreator public static DiffBackupIntervalInHours fromInt(int name) { return fromString(String.valueOf(name), DiffBackupIntervalInHours.class); } /** * Gets known DiffBackupIntervalInHours values. - * + * * @return known DiffBackupIntervalInHours values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java index 414e1ace29ab9..80201576ad9fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of distributed availability groups in instance. */ +/** + * A list of distributed availability groups in instance. + */ @Immutable -public final class DistributedAvailabilityGroupsListResult { +public final class DistributedAvailabilityGroupsListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DistributedAvailabilityGroupsListResult class. */ + /** + * Creates an instance of DistributedAvailabilityGroupsListResult class. + */ public DistributedAvailabilityGroupsListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DistributedAvailabilityGroupsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DistributedAvailabilityGroupsListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DistributedAvailabilityGroupsListResult. + */ + public static DistributedAvailabilityGroupsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DistributedAvailabilityGroupsListResult deserializedDistributedAvailabilityGroupsListResult + = new DistributedAvailabilityGroupsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DistributedAvailabilityGroupInner.fromJson(reader1)); + deserializedDistributedAvailabilityGroupsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDistributedAvailabilityGroupsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDistributedAvailabilityGroupsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java index 28c471af62880..60c750d6c9905 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java @@ -5,32 +5,45 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the DNS refresh operation. */ +/** + * The status of the DNS refresh operation. + */ public final class DnsRefreshConfigurationPropertiesStatus extends ExpandableStringEnum { - /** Static value Succeeded for DnsRefreshConfigurationPropertiesStatus. */ + /** + * Static value Succeeded for DnsRefreshConfigurationPropertiesStatus. + */ public static final DnsRefreshConfigurationPropertiesStatus SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for DnsRefreshConfigurationPropertiesStatus. */ + /** + * Static value Failed for DnsRefreshConfigurationPropertiesStatus. + */ public static final DnsRefreshConfigurationPropertiesStatus FAILED = fromString("Failed"); + /** + * Creates a new instance of DnsRefreshConfigurationPropertiesStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsRefreshConfigurationPropertiesStatus() { + } + /** * Creates or finds a DnsRefreshConfigurationPropertiesStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding DnsRefreshConfigurationPropertiesStatus. */ - @JsonCreator public static DnsRefreshConfigurationPropertiesStatus fromString(String name) { return fromString(name, DnsRefreshConfigurationPropertiesStatus.class); } /** * Gets known DnsRefreshConfigurationPropertiesStatus values. - * + * * @return known DnsRefreshConfigurationPropertiesStatus values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java index c0b2760c8f3fe..b8a19ac3a1f12 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java @@ -5,61 +5,62 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The edition capability. */ +/** + * The edition capability. + */ @Fluent -public final class EditionCapability { +public final class EditionCapability implements JsonSerializable { /* * The database edition name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported service objectives for the edition. */ - @JsonProperty(value = "supportedServiceLevelObjectives", access = JsonProperty.Access.WRITE_ONLY) private List supportedServiceLevelObjectives; /* * Whether or not zone redundancy is supported for the edition. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * The read scale capability for the edition. */ - @JsonProperty(value = "readScale", access = JsonProperty.Access.WRITE_ONLY) private ReadScaleCapability readScale; /* * The list of supported storage capabilities for this edition */ - @JsonProperty(value = "supportedStorageCapabilities", access = JsonProperty.Access.WRITE_ONLY) private List supportedStorageCapabilities; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of EditionCapability class. */ + /** + * Creates an instance of EditionCapability class. + */ public EditionCapability() { } /** * Get the name property: The database edition name. - * + * * @return the name value. */ public String name() { @@ -68,7 +69,7 @@ public String name() { /** * Get the supportedServiceLevelObjectives property: The list of supported service objectives for the edition. - * + * * @return the supportedServiceLevelObjectives value. */ public List supportedServiceLevelObjectives() { @@ -77,7 +78,7 @@ public List supportedServiceLevelObjectives() { /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the edition. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -86,7 +87,7 @@ public Boolean zoneRedundant() { /** * Get the readScale property: The read scale capability for the edition. - * + * * @return the readScale value. */ public ReadScaleCapability readScale() { @@ -95,7 +96,7 @@ public ReadScaleCapability readScale() { /** * Get the supportedStorageCapabilities property: The list of supported storage capabilities for this edition. - * + * * @return the supportedStorageCapabilities value. */ public List supportedStorageCapabilities() { @@ -104,7 +105,7 @@ public List supportedStorageCapabilities() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -113,7 +114,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -122,7 +123,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the EditionCapability object itself. */ @@ -133,7 +134,7 @@ public EditionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -147,4 +148,56 @@ public void validate() { supportedStorageCapabilities().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EditionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EditionCapability if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EditionCapability. + */ + public static EditionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EditionCapability deserializedEditionCapability = new EditionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedEditionCapability.name = reader.getString(); + } else if ("supportedServiceLevelObjectives".equals(fieldName)) { + List supportedServiceLevelObjectives + = reader.readArray(reader1 -> ServiceObjectiveCapability.fromJson(reader1)); + deserializedEditionCapability.supportedServiceLevelObjectives = supportedServiceLevelObjectives; + } else if ("zoneRedundant".equals(fieldName)) { + deserializedEditionCapability.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("readScale".equals(fieldName)) { + deserializedEditionCapability.readScale = ReadScaleCapability.fromJson(reader); + } else if ("supportedStorageCapabilities".equals(fieldName)) { + List supportedStorageCapabilities + = reader.readArray(reader1 -> StorageCapability.fromJson(reader1)); + deserializedEditionCapability.supportedStorageCapabilities = supportedStorageCapabilities; + } else if ("status".equals(fieldName)) { + deserializedEditionCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedEditionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEditionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEdition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEdition.java index 1b372e9a8c2b6..f86f991b886da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEdition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEdition.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** Defines values for ElasticPoolEdition. */ @@ -30,7 +29,6 @@ public final class ElasticPoolEdition extends ExpandableStringEnum { /* * The elastic pool edition name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported elastic pool DTU levels for the edition. */ - @JsonProperty(value = "supportedElasticPoolPerformanceLevels", access = JsonProperty.Access.WRITE_ONLY) private List supportedElasticPoolPerformanceLevels; /* * Whether or not zone redundancy is supported for the edition. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ElasticPoolEditionCapability class. */ + /** + * Creates an instance of ElasticPoolEditionCapability class. + */ public ElasticPoolEditionCapability() { } /** * Get the name property: The elastic pool edition name. - * + * * @return the name value. */ public String name() { @@ -57,7 +60,7 @@ public String name() { /** * Get the supportedElasticPoolPerformanceLevels property: The list of supported elastic pool DTU levels for the * edition. - * + * * @return the supportedElasticPoolPerformanceLevels value. */ public List supportedElasticPoolPerformanceLevels() { @@ -66,7 +69,7 @@ public List supportedElasticPoolPerforman /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the edition. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -75,7 +78,7 @@ public Boolean zoneRedundant() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -84,7 +87,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -93,7 +96,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ElasticPoolEditionCapability object itself. */ @@ -104,7 +107,7 @@ public ElasticPoolEditionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -112,4 +115,51 @@ public void validate() { supportedElasticPoolPerformanceLevels().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolEditionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolEditionCapability if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolEditionCapability. + */ + public static ElasticPoolEditionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolEditionCapability deserializedElasticPoolEditionCapability = new ElasticPoolEditionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedElasticPoolEditionCapability.name = reader.getString(); + } else if ("supportedElasticPoolPerformanceLevels".equals(fieldName)) { + List supportedElasticPoolPerformanceLevels + = reader.readArray(reader1 -> ElasticPoolPerformanceLevelCapability.fromJson(reader1)); + deserializedElasticPoolEditionCapability.supportedElasticPoolPerformanceLevels + = supportedElasticPoolPerformanceLevels; + } else if ("zoneRedundant".equals(fieldName)) { + deserializedElasticPoolEditionCapability.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("status".equals(fieldName)) { + deserializedElasticPoolEditionCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedElasticPoolEditionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolEditionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolLicenseType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolLicenseType.java index 59ac9ae8b281f..20a24f7cf9061 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolLicenseType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolLicenseType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The license type to apply for this elastic pool. */ +/** + * The license type to apply for this elastic pool. + */ public final class ElasticPoolLicenseType extends ExpandableStringEnum { - /** Static value LicenseIncluded for ElasticPoolLicenseType. */ + /** + * Static value LicenseIncluded for ElasticPoolLicenseType. + */ public static final ElasticPoolLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); - /** Static value BasePrice for ElasticPoolLicenseType. */ + /** + * Static value BasePrice for ElasticPoolLicenseType. + */ public static final ElasticPoolLicenseType BASE_PRICE = fromString("BasePrice"); + /** + * Creates a new instance of ElasticPoolLicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticPoolLicenseType() { + } + /** * Creates or finds a ElasticPoolLicenseType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ElasticPoolLicenseType. */ - @JsonCreator public static ElasticPoolLicenseType fromString(String name) { return fromString(name, ElasticPoolLicenseType.class); } /** * Gets known ElasticPoolLicenseType values. - * + * * @return known ElasticPoolLicenseType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java index ebe8d6ffdff96..08d4667753df8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The result of an elastic pool list request. */ +/** + * The result of an elastic pool list request. + */ @Immutable -public final class ElasticPoolListResult { +public final class ElasticPoolListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ElasticPoolListResult class. */ + /** + * Creates an instance of ElasticPoolListResult class. + */ public ElasticPoolListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolListResult. + */ + public static ElasticPoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolListResult deserializedElasticPoolListResult = new ElasticPoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticPoolInner.fromJson(reader1)); + deserializedElasticPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java index fd67c576b837f..cc6686df1d643 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list elastic pool operations request. */ +/** + * The response to a list elastic pool operations request. + */ @Immutable -public final class ElasticPoolOperationListResult { +public final class ElasticPoolOperationListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ElasticPoolOperationListResult class. */ + /** + * Creates an instance of ElasticPoolOperationListResult class. + */ public ElasticPoolOperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolOperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolOperationListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolOperationListResult. + */ + public static ElasticPoolOperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolOperationListResult deserializedElasticPoolOperationListResult + = new ElasticPoolOperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticPoolOperationInner.fromJson(reader1)); + deserializedElasticPoolOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticPoolOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java index ccdf520a89fef..5836448b92ed0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java @@ -5,49 +5,53 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The max per-database performance level capability. */ +/** + * The max per-database performance level capability. + */ @Fluent -public final class ElasticPoolPerDatabaseMaxPerformanceLevelCapability { +public final class ElasticPoolPerDatabaseMaxPerformanceLevelCapability + implements JsonSerializable { /* * The maximum performance level per database. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Double limit; /* * Unit type used to measure performance level. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private PerformanceLevelUnit unit; /* * The list of supported min database performance levels. */ - @JsonProperty(value = "supportedPerDatabaseMinPerformanceLevels", access = JsonProperty.Access.WRITE_ONLY) private List supportedPerDatabaseMinPerformanceLevels; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ElasticPoolPerDatabaseMaxPerformanceLevelCapability class. */ + /** + * Creates an instance of ElasticPoolPerDatabaseMaxPerformanceLevelCapability class. + */ public ElasticPoolPerDatabaseMaxPerformanceLevelCapability() { } /** * Get the limit property: The maximum performance level per database. - * + * * @return the limit value. */ public Double limit() { @@ -56,7 +60,7 @@ public Double limit() { /** * Get the unit property: Unit type used to measure performance level. - * + * * @return the unit value. */ public PerformanceLevelUnit unit() { @@ -65,7 +69,7 @@ public PerformanceLevelUnit unit() { /** * Get the supportedPerDatabaseMinPerformanceLevels property: The list of supported min database performance levels. - * + * * @return the supportedPerDatabaseMinPerformanceLevels value. */ public List supportedPerDatabaseMinPerformanceLevels() { @@ -74,7 +78,7 @@ public List supportedPerDat /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -83,7 +87,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -92,7 +96,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ElasticPoolPerDatabaseMaxPerformanceLevelCapability object itself. */ @@ -103,7 +107,7 @@ public ElasticPoolPerDatabaseMaxPerformanceLevelCapability withReason(String rea /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -111,4 +115,57 @@ public void validate() { supportedPerDatabaseMinPerformanceLevels().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolPerDatabaseMaxPerformanceLevelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolPerDatabaseMaxPerformanceLevelCapability if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolPerDatabaseMaxPerformanceLevelCapability. + */ + public static ElasticPoolPerDatabaseMaxPerformanceLevelCapability fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolPerDatabaseMaxPerformanceLevelCapability deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability + = new ElasticPoolPerDatabaseMaxPerformanceLevelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("limit".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability.limit + = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability.unit + = PerformanceLevelUnit.fromString(reader.getString()); + } else if ("supportedPerDatabaseMinPerformanceLevels".equals(fieldName)) { + List supportedPerDatabaseMinPerformanceLevels + = reader.readArray( + reader1 -> ElasticPoolPerDatabaseMinPerformanceLevelCapability.fromJson(reader1)); + deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability.supportedPerDatabaseMinPerformanceLevels + = supportedPerDatabaseMinPerformanceLevels; + } else if ("status".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolPerDatabaseMaxPerformanceLevelCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java index 3020308fb8a96..48f47bb09aa91 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java @@ -5,42 +5,47 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The minimum per-database performance level capability. */ +/** + * The minimum per-database performance level capability. + */ @Fluent -public final class ElasticPoolPerDatabaseMinPerformanceLevelCapability { +public final class ElasticPoolPerDatabaseMinPerformanceLevelCapability + implements JsonSerializable { /* * The minimum performance level per database. */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Double limit; /* * Unit type used to measure performance level. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private PerformanceLevelUnit unit; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ElasticPoolPerDatabaseMinPerformanceLevelCapability class. */ + /** + * Creates an instance of ElasticPoolPerDatabaseMinPerformanceLevelCapability class. + */ public ElasticPoolPerDatabaseMinPerformanceLevelCapability() { } /** * Get the limit property: The minimum performance level per database. - * + * * @return the limit value. */ public Double limit() { @@ -49,7 +54,7 @@ public Double limit() { /** * Get the unit property: Unit type used to measure performance level. - * + * * @return the unit value. */ public PerformanceLevelUnit unit() { @@ -58,7 +63,7 @@ public PerformanceLevelUnit unit() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -67,7 +72,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -76,7 +81,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ElasticPoolPerDatabaseMinPerformanceLevelCapability object itself. */ @@ -87,9 +92,56 @@ public ElasticPoolPerDatabaseMinPerformanceLevelCapability withReason(String rea /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolPerDatabaseMinPerformanceLevelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolPerDatabaseMinPerformanceLevelCapability if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolPerDatabaseMinPerformanceLevelCapability. + */ + public static ElasticPoolPerDatabaseMinPerformanceLevelCapability fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolPerDatabaseMinPerformanceLevelCapability deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability + = new ElasticPoolPerDatabaseMinPerformanceLevelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("limit".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability.limit + = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability.unit + = PerformanceLevelUnit.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolPerDatabaseMinPerformanceLevelCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java index a2425b9e1d00f..56913fb07cfb3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Per database settings of an elastic pool. */ +/** + * Per database settings of an elastic pool. + */ @Fluent -public final class ElasticPoolPerDatabaseSettings { +public final class ElasticPoolPerDatabaseSettings implements JsonSerializable { /* * The minimum capacity all databases are guaranteed. */ - @JsonProperty(value = "minCapacity") private Double minCapacity; /* * The maximum capacity any one database can consume. */ - @JsonProperty(value = "maxCapacity") private Double maxCapacity; - /** Creates an instance of ElasticPoolPerDatabaseSettings class. */ + /** + * Creates an instance of ElasticPoolPerDatabaseSettings class. + */ public ElasticPoolPerDatabaseSettings() { } /** * Get the minCapacity property: The minimum capacity all databases are guaranteed. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -37,7 +43,7 @@ public Double minCapacity() { /** * Set the minCapacity property: The minimum capacity all databases are guaranteed. - * + * * @param minCapacity the minCapacity value to set. * @return the ElasticPoolPerDatabaseSettings object itself. */ @@ -48,7 +54,7 @@ public ElasticPoolPerDatabaseSettings withMinCapacity(Double minCapacity) { /** * Get the maxCapacity property: The maximum capacity any one database can consume. - * + * * @return the maxCapacity value. */ public Double maxCapacity() { @@ -57,7 +63,7 @@ public Double maxCapacity() { /** * Set the maxCapacity property: The maximum capacity any one database can consume. - * + * * @param maxCapacity the maxCapacity value to set. * @return the ElasticPoolPerDatabaseSettings object itself. */ @@ -68,9 +74,49 @@ public ElasticPoolPerDatabaseSettings withMaxCapacity(Double maxCapacity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("minCapacity", this.minCapacity); + jsonWriter.writeNumberField("maxCapacity", this.maxCapacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolPerDatabaseSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolPerDatabaseSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolPerDatabaseSettings. + */ + public static ElasticPoolPerDatabaseSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolPerDatabaseSettings deserializedElasticPoolPerDatabaseSettings + = new ElasticPoolPerDatabaseSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minCapacity".equals(fieldName)) { + deserializedElasticPoolPerDatabaseSettings.minCapacity = reader.getNullable(JsonReader::getDouble); + } else if ("maxCapacity".equals(fieldName)) { + deserializedElasticPoolPerDatabaseSettings.maxCapacity = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolPerDatabaseSettings; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerformanceLevelCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerformanceLevelCapability.java index 37644a7033d69..4d4c19c8cd471 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerformanceLevelCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerformanceLevelCapability.java @@ -5,91 +5,88 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The Elastic Pool performance level capability. */ +/** + * The Elastic Pool performance level capability. + */ @Fluent -public final class ElasticPoolPerformanceLevelCapability { +public final class ElasticPoolPerformanceLevelCapability + implements JsonSerializable { /* * The performance level for the pool. */ - @JsonProperty(value = "performanceLevel", access = JsonProperty.Access.WRITE_ONLY) private PerformanceLevelCapability performanceLevel; /* * The sku. */ - @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) private Sku sku; /* * List of supported license types. */ - @JsonProperty(value = "supportedLicenseTypes", access = JsonProperty.Access.WRITE_ONLY) private List supportedLicenseTypes; /* * The maximum number of databases supported. */ - @JsonProperty(value = "maxDatabaseCount", access = JsonProperty.Access.WRITE_ONLY) private Integer maxDatabaseCount; /* * The included (free) max size for this performance level. */ - @JsonProperty(value = "includedMaxSize", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability includedMaxSize; /* * The list of supported max sizes. */ - @JsonProperty(value = "supportedMaxSizes", access = JsonProperty.Access.WRITE_ONLY) private List supportedMaxSizes; /* * The list of supported per database max sizes. */ - @JsonProperty(value = "supportedPerDatabaseMaxSizes", access = JsonProperty.Access.WRITE_ONLY) private List supportedPerDatabaseMaxSizes; /* * The list of supported per database max performance levels. */ - @JsonProperty(value = "supportedPerDatabaseMaxPerformanceLevels", access = JsonProperty.Access.WRITE_ONLY) private List supportedPerDatabaseMaxPerformanceLevels; /* * Whether or not zone redundancy is supported for the performance level. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * List of supported maintenance configurations */ - @JsonProperty(value = "supportedMaintenanceConfigurations", access = JsonProperty.Access.WRITE_ONLY) private List supportedMaintenanceConfigurations; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ElasticPoolPerformanceLevelCapability class. */ + /** + * Creates an instance of ElasticPoolPerformanceLevelCapability class. + */ public ElasticPoolPerformanceLevelCapability() { } /** * Get the performanceLevel property: The performance level for the pool. - * + * * @return the performanceLevel value. */ public PerformanceLevelCapability performanceLevel() { @@ -98,7 +95,7 @@ public PerformanceLevelCapability performanceLevel() { /** * Get the sku property: The sku. - * + * * @return the sku value. */ public Sku sku() { @@ -107,7 +104,7 @@ public Sku sku() { /** * Get the supportedLicenseTypes property: List of supported license types. - * + * * @return the supportedLicenseTypes value. */ public List supportedLicenseTypes() { @@ -116,7 +113,7 @@ public List supportedLicenseTypes() { /** * Get the maxDatabaseCount property: The maximum number of databases supported. - * + * * @return the maxDatabaseCount value. */ public Integer maxDatabaseCount() { @@ -125,7 +122,7 @@ public Integer maxDatabaseCount() { /** * Get the includedMaxSize property: The included (free) max size for this performance level. - * + * * @return the includedMaxSize value. */ public MaxSizeCapability includedMaxSize() { @@ -134,7 +131,7 @@ public MaxSizeCapability includedMaxSize() { /** * Get the supportedMaxSizes property: The list of supported max sizes. - * + * * @return the supportedMaxSizes value. */ public List supportedMaxSizes() { @@ -143,7 +140,7 @@ public List supportedMaxSizes() { /** * Get the supportedPerDatabaseMaxSizes property: The list of supported per database max sizes. - * + * * @return the supportedPerDatabaseMaxSizes value. */ public List supportedPerDatabaseMaxSizes() { @@ -153,7 +150,7 @@ public List supportedPerDatabaseMaxSizes() { /** * Get the supportedPerDatabaseMaxPerformanceLevels property: The list of supported per database max performance * levels. - * + * * @return the supportedPerDatabaseMaxPerformanceLevels value. */ public List supportedPerDatabaseMaxPerformanceLevels() { @@ -162,7 +159,7 @@ public List supportedPerDat /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the performance level. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -171,7 +168,7 @@ public Boolean zoneRedundant() { /** * Get the supportedMaintenanceConfigurations property: List of supported maintenance configurations. - * + * * @return the supportedMaintenanceConfigurations value. */ public List supportedMaintenanceConfigurations() { @@ -180,7 +177,7 @@ public List supportedMaintenanceConfiguratio /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -189,7 +186,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -198,7 +195,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ElasticPoolPerformanceLevelCapability object itself. */ @@ -209,7 +206,7 @@ public ElasticPoolPerformanceLevelCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -238,4 +235,82 @@ public void validate() { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolPerformanceLevelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolPerformanceLevelCapability if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolPerformanceLevelCapability. + */ + public static ElasticPoolPerformanceLevelCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolPerformanceLevelCapability deserializedElasticPoolPerformanceLevelCapability + = new ElasticPoolPerformanceLevelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("performanceLevel".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.performanceLevel + = PerformanceLevelCapability.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.sku = Sku.fromJson(reader); + } else if ("supportedLicenseTypes".equals(fieldName)) { + List supportedLicenseTypes + = reader.readArray(reader1 -> LicenseTypeCapability.fromJson(reader1)); + deserializedElasticPoolPerformanceLevelCapability.supportedLicenseTypes = supportedLicenseTypes; + } else if ("maxDatabaseCount".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.maxDatabaseCount + = reader.getNullable(JsonReader::getInt); + } else if ("includedMaxSize".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.includedMaxSize + = MaxSizeCapability.fromJson(reader); + } else if ("supportedMaxSizes".equals(fieldName)) { + List supportedMaxSizes + = reader.readArray(reader1 -> MaxSizeRangeCapability.fromJson(reader1)); + deserializedElasticPoolPerformanceLevelCapability.supportedMaxSizes = supportedMaxSizes; + } else if ("supportedPerDatabaseMaxSizes".equals(fieldName)) { + List supportedPerDatabaseMaxSizes + = reader.readArray(reader1 -> MaxSizeRangeCapability.fromJson(reader1)); + deserializedElasticPoolPerformanceLevelCapability.supportedPerDatabaseMaxSizes + = supportedPerDatabaseMaxSizes; + } else if ("supportedPerDatabaseMaxPerformanceLevels".equals(fieldName)) { + List supportedPerDatabaseMaxPerformanceLevels + = reader.readArray( + reader1 -> ElasticPoolPerDatabaseMaxPerformanceLevelCapability.fromJson(reader1)); + deserializedElasticPoolPerformanceLevelCapability.supportedPerDatabaseMaxPerformanceLevels + = supportedPerDatabaseMaxPerformanceLevels; + } else if ("zoneRedundant".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.zoneRedundant + = reader.getNullable(JsonReader::getBoolean); + } else if ("supportedMaintenanceConfigurations".equals(fieldName)) { + List supportedMaintenanceConfigurations + = reader.readArray(reader1 -> MaintenanceConfigurationCapability.fromJson(reader1)); + deserializedElasticPoolPerformanceLevelCapability.supportedMaintenanceConfigurations + = supportedMaintenanceConfigurations; + } else if ("status".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedElasticPoolPerformanceLevelCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolPerformanceLevelCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java index aa35e1ae7bb5a..15110e4b649ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the elastic pool. */ +/** + * The state of the elastic pool. + */ public final class ElasticPoolState extends ExpandableStringEnum { - /** Static value Creating for ElasticPoolState. */ + /** + * Static value Creating for ElasticPoolState. + */ public static final ElasticPoolState CREATING = fromString("Creating"); - /** Static value Ready for ElasticPoolState. */ + /** + * Static value Ready for ElasticPoolState. + */ public static final ElasticPoolState READY = fromString("Ready"); - /** Static value Disabled for ElasticPoolState. */ + /** + * Static value Disabled for ElasticPoolState. + */ public static final ElasticPoolState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of ElasticPoolState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticPoolState() { + } + /** * Creates or finds a ElasticPoolState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ElasticPoolState. */ - @JsonCreator public static ElasticPoolState fromString(String name) { return fromString(name, ElasticPoolState.class); } /** * Gets known ElasticPoolState values. - * + * * @return known ElasticPoolState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java index eb0c60f9f2105..55e712447f658 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java @@ -5,40 +5,43 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolUpdateProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** An elastic pool update. */ +/** + * An elastic pool update. + */ @Fluent -public final class ElasticPoolUpdate { +public final class ElasticPoolUpdate implements JsonSerializable { /* * An ARM Resource SKU. */ - @JsonProperty(value = "sku") private Sku sku; /* * Resource properties. */ - @JsonProperty(value = "properties") private ElasticPoolUpdateProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ElasticPoolUpdate class. */ + /** + * Creates an instance of ElasticPoolUpdate class. + */ public ElasticPoolUpdate() { } /** * Get the sku property: An ARM Resource SKU. - * + * * @return the sku value. */ public Sku sku() { @@ -47,7 +50,7 @@ public Sku sku() { /** * Set the sku property: An ARM Resource SKU. - * + * * @param sku the sku value to set. * @return the ElasticPoolUpdate object itself. */ @@ -58,7 +61,7 @@ public ElasticPoolUpdate withSku(Sku sku) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ElasticPoolUpdateProperties innerProperties() { @@ -67,7 +70,7 @@ private ElasticPoolUpdateProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -76,7 +79,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the ElasticPoolUpdate object itself. */ @@ -87,7 +90,7 @@ public ElasticPoolUpdate withTags(Map tags) { /** * Get the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { @@ -96,7 +99,7 @@ public Long maxSizeBytes() { /** * Set the maxSizeBytes property: The storage limit for the database elastic pool in bytes. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the ElasticPoolUpdate object itself. */ @@ -110,7 +113,7 @@ public ElasticPoolUpdate withMaxSizeBytes(Long maxSizeBytes) { /** * Get the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @return the minCapacity value. */ public Double minCapacity() { @@ -119,7 +122,7 @@ public Double minCapacity() { /** * Set the minCapacity property: Minimal capacity that serverless pool will not shrink below, if not paused. - * + * * @param minCapacity the minCapacity value to set. * @return the ElasticPoolUpdate object itself. */ @@ -133,7 +136,7 @@ public ElasticPoolUpdate withMinCapacity(Double minCapacity) { /** * Get the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @return the perDatabaseSettings value. */ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { @@ -142,7 +145,7 @@ public ElasticPoolPerDatabaseSettings perDatabaseSettings() { /** * Set the perDatabaseSettings property: The per database settings for the elastic pool. - * + * * @param perDatabaseSettings the perDatabaseSettings value to set. * @return the ElasticPoolUpdate object itself. */ @@ -157,7 +160,7 @@ public ElasticPoolUpdate withPerDatabaseSettings(ElasticPoolPerDatabaseSettings /** * Get the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -167,7 +170,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this elastic pool is zone redundant, which means the replicas of * this elastic pool will be spread across multiple availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ElasticPoolUpdate object itself. */ @@ -181,7 +184,7 @@ public ElasticPoolUpdate withZoneRedundant(Boolean zoneRedundant) { /** * Get the licenseType property: The license type to apply for this elastic pool. - * + * * @return the licenseType value. */ public ElasticPoolLicenseType licenseType() { @@ -190,7 +193,7 @@ public ElasticPoolLicenseType licenseType() { /** * Set the licenseType property: The license type to apply for this elastic pool. - * + * * @param licenseType the licenseType value to set. * @return the ElasticPoolUpdate object itself. */ @@ -205,7 +208,7 @@ public ElasticPoolUpdate withLicenseType(ElasticPoolLicenseType licenseType) { /** * Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -215,7 +218,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the elastic pool. This * configuration defines the period when the maintenance updates will will occur. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ElasticPoolUpdate object itself. */ @@ -230,7 +233,7 @@ public ElasticPoolUpdate withMaintenanceConfigurationId(String maintenanceConfig /** * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @return the highAvailabilityReplicaCount value. */ public Integer highAvailabilityReplicaCount() { @@ -240,7 +243,7 @@ public Integer highAvailabilityReplicaCount() { /** * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool * that are used to provide high availability. Applicable only to Hyperscale elastic pools. - * + * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolUpdate object itself. */ @@ -254,7 +257,7 @@ public ElasticPoolUpdate withHighAvailabilityReplicaCount(Integer highAvailabili /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -265,4 +268,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticPoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticPoolUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticPoolUpdate. + */ + public static ElasticPoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticPoolUpdate deserializedElasticPoolUpdate = new ElasticPoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sku".equals(fieldName)) { + deserializedElasticPoolUpdate.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedElasticPoolUpdate.innerProperties = ElasticPoolUpdateProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticPoolUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticPoolUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java index 5944f1fb01afa..ee6c7ccb0be1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server encryption protectors. */ +/** + * A list of server encryption protectors. + */ @Immutable -public final class EncryptionProtectorListResult { +public final class EncryptionProtectorListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of EncryptionProtectorListResult class. */ + /** + * Creates an instance of EncryptionProtectorListResult class. + */ public EncryptionProtectorListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionProtectorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionProtectorListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EncryptionProtectorListResult. + */ + public static EncryptionProtectorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionProtectorListResult deserializedEncryptionProtectorListResult + = new EncryptionProtectorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EncryptionProtectorInner.fromJson(reader1)); + deserializedEncryptionProtectorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEncryptionProtectorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionProtectorListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java index 9dc5c206f6973..3ede35d261137 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EncryptionProtectorName. */ +/** + * Defines values for EncryptionProtectorName. + */ public final class EncryptionProtectorName extends ExpandableStringEnum { - /** Static value current for EncryptionProtectorName. */ + /** + * Static value current for EncryptionProtectorName. + */ public static final EncryptionProtectorName CURRENT = fromString("current"); + /** + * Creates a new instance of EncryptionProtectorName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionProtectorName() { + } + /** * Creates or finds a EncryptionProtectorName from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionProtectorName. */ - @JsonCreator public static EncryptionProtectorName fromString(String name) { return fromString(name, EncryptionProtectorName.class); } /** * Gets known EncryptionProtectorName values. - * + * * @return known EncryptionProtectorName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java index 21a2599d11b10..706b562eae76f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.EndpointCertificateInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of endpoint certificates on the target instance. */ +/** + * A list of endpoint certificates on the target instance. + */ @Immutable -public final class EndpointCertificateListResult { +public final class EndpointCertificateListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of EndpointCertificateListResult class. */ + /** + * Creates an instance of EndpointCertificateListResult class. + */ public EndpointCertificateListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointCertificateListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointCertificateListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointCertificateListResult. + */ + public static EndpointCertificateListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointCertificateListResult deserializedEndpointCertificateListResult + = new EndpointCertificateListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EndpointCertificateInner.fromJson(reader1)); + deserializedEndpointCertificateListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEndpointCertificateListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointCertificateListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java index ad03e87389bf2..e761558528abf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** A domain name that the managed instance service needs to communicate with, along with additional details. */ +/** + * A domain name that the managed instance service needs to communicate with, along with additional details. + */ @Immutable -public final class EndpointDependency { +public final class EndpointDependency implements JsonSerializable { /* * The domain name of the dependency. */ - @JsonProperty(value = "domainName", access = JsonProperty.Access.WRITE_ONLY) private String domainName; /* * The IP Addresses and Ports used when connecting to DomainName. */ - @JsonProperty(value = "endpointDetails", access = JsonProperty.Access.WRITE_ONLY) private List endpointDetails; - /** Creates an instance of EndpointDependency class. */ + /** + * Creates an instance of EndpointDependency class. + */ public EndpointDependency() { } /** * Get the domainName property: The domain name of the dependency. - * + * * @return the domainName value. */ public String domainName() { @@ -38,7 +44,7 @@ public String domainName() { /** * Get the endpointDetails property: The IP Addresses and Ports used when connecting to DomainName. - * + * * @return the endpointDetails value. */ public List endpointDetails() { @@ -47,7 +53,7 @@ public List endpointDetails() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -55,4 +61,43 @@ public void validate() { endpointDetails().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDependency if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointDependency. + */ + public static EndpointDependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDependency deserializedEndpointDependency = new EndpointDependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domainName".equals(fieldName)) { + deserializedEndpointDependency.domainName = reader.getString(); + } else if ("endpointDetails".equals(fieldName)) { + List endpointDetails + = reader.readArray(reader1 -> EndpointDetail.fromJson(reader1)); + deserializedEndpointDependency.endpointDetails = endpointDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDependency; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDetail.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDetail.java index 185c574edd256..14f6daed68331 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDetail.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDetail.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A domain name that the managed instance service needs to communicate with, along with additional details. */ +/** + * A domain name that the managed instance service needs to communicate with, along with additional details. + */ @Immutable -public final class EndpointDetail { +public final class EndpointDetail implements JsonSerializable { /* * The port an endpoint is connected to. */ - @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) private Integer port; - /** Creates an instance of EndpointDetail class. */ + /** + * Creates an instance of EndpointDetail class. + */ public EndpointDetail() { } /** * Get the port property: The port an endpoint is connected to. - * + * * @return the port value. */ public Integer port() { @@ -31,9 +38,44 @@ public Integer port() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDetail from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDetail if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointDetail. + */ + public static EndpointDetail fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDetail deserializedEndpointDetail = new EndpointDetail(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("port".equals(fieldName)) { + deserializedEndpointDetail.port = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDetail; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java index d30463c8273e2..d429e02fa5cac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java @@ -6,60 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform export database operation. */ +/** + * Contains the information necessary to perform export database operation. + */ @Fluent -public final class ExportDatabaseDefinition { +public final class ExportDatabaseDefinition implements JsonSerializable { /* * Storage key type. */ - @JsonProperty(value = "storageKeyType", required = true) private StorageKeyType storageKeyType; /* * Storage key. */ - @JsonProperty(value = "storageKey", required = true) private String storageKey; /* * Storage Uri. */ - @JsonProperty(value = "storageUri", required = true) private String storageUri; /* * Administrator login name. */ - @JsonProperty(value = "administratorLogin", required = true) private String administratorLogin; /* * Administrator login password. */ - @JsonProperty(value = "administratorLoginPassword", required = true) private String administratorLoginPassword; /* * Authentication type. */ - @JsonProperty(value = "authenticationType") private String authenticationType; /* * Optional resource information to enable network isolation for request. */ - @JsonProperty(value = "networkIsolation") private NetworkIsolationSettings networkIsolation; - /** Creates an instance of ExportDatabaseDefinition class. */ + /** + * Creates an instance of ExportDatabaseDefinition class. + */ public ExportDatabaseDefinition() { } /** * Get the storageKeyType property: Storage key type. - * + * * @return the storageKeyType value. */ public StorageKeyType storageKeyType() { @@ -68,7 +69,7 @@ public StorageKeyType storageKeyType() { /** * Set the storageKeyType property: Storage key type. - * + * * @param storageKeyType the storageKeyType value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -79,7 +80,7 @@ public ExportDatabaseDefinition withStorageKeyType(StorageKeyType storageKeyType /** * Get the storageKey property: Storage key. - * + * * @return the storageKey value. */ public String storageKey() { @@ -88,7 +89,7 @@ public String storageKey() { /** * Set the storageKey property: Storage key. - * + * * @param storageKey the storageKey value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -99,7 +100,7 @@ public ExportDatabaseDefinition withStorageKey(String storageKey) { /** * Get the storageUri property: Storage Uri. - * + * * @return the storageUri value. */ public String storageUri() { @@ -108,7 +109,7 @@ public String storageUri() { /** * Set the storageUri property: Storage Uri. - * + * * @param storageUri the storageUri value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -119,7 +120,7 @@ public ExportDatabaseDefinition withStorageUri(String storageUri) { /** * Get the administratorLogin property: Administrator login name. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -128,7 +129,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator login name. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -139,7 +140,7 @@ public ExportDatabaseDefinition withAdministratorLogin(String administratorLogin /** * Get the administratorLoginPassword property: Administrator login password. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -148,7 +149,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: Administrator login password. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -159,7 +160,7 @@ public ExportDatabaseDefinition withAdministratorLoginPassword(String administra /** * Get the authenticationType property: Authentication type. - * + * * @return the authenticationType value. */ public String authenticationType() { @@ -168,7 +169,7 @@ public String authenticationType() { /** * Set the authenticationType property: Authentication type. - * + * * @param authenticationType the authenticationType value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -179,7 +180,7 @@ public ExportDatabaseDefinition withAuthenticationType(String authenticationType /** * Get the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @return the networkIsolation value. */ public NetworkIsolationSettings networkIsolation() { @@ -188,7 +189,7 @@ public NetworkIsolationSettings networkIsolation() { /** * Set the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @param networkIsolation the networkIsolation value to set. * @return the ExportDatabaseDefinition object itself. */ @@ -199,39 +200,34 @@ public ExportDatabaseDefinition withNetworkIsolation(NetworkIsolationSettings ne /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKeyType in model ExportDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKeyType in model ExportDatabaseDefinition")); } if (storageKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKey in model ExportDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKey in model ExportDatabaseDefinition")); } if (storageUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageUri in model ExportDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageUri in model ExportDatabaseDefinition")); } if (administratorLogin() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLogin in model ExportDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLogin in model ExportDatabaseDefinition")); } if (administratorLoginPassword() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLoginPassword in model ExportDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLoginPassword in model ExportDatabaseDefinition")); } if (networkIsolation() != null) { networkIsolation().validate(); @@ -239,4 +235,60 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ExportDatabaseDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageKeyType", + this.storageKeyType == null ? null : this.storageKeyType.toString()); + jsonWriter.writeStringField("storageKey", this.storageKey); + jsonWriter.writeStringField("storageUri", this.storageUri); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("authenticationType", this.authenticationType); + jsonWriter.writeJsonField("networkIsolation", this.networkIsolation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportDatabaseDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportDatabaseDefinition if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExportDatabaseDefinition. + */ + public static ExportDatabaseDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportDatabaseDefinition deserializedExportDatabaseDefinition = new ExportDatabaseDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageKeyType".equals(fieldName)) { + deserializedExportDatabaseDefinition.storageKeyType = StorageKeyType.fromString(reader.getString()); + } else if ("storageKey".equals(fieldName)) { + deserializedExportDatabaseDefinition.storageKey = reader.getString(); + } else if ("storageUri".equals(fieldName)) { + deserializedExportDatabaseDefinition.storageUri = reader.getString(); + } else if ("administratorLogin".equals(fieldName)) { + deserializedExportDatabaseDefinition.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedExportDatabaseDefinition.administratorLoginPassword = reader.getString(); + } else if ("authenticationType".equals(fieldName)) { + deserializedExportDatabaseDefinition.authenticationType = reader.getString(); + } else if ("networkIsolation".equals(fieldName)) { + deserializedExportDatabaseDefinition.networkIsolation = NetworkIsolationSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExportDatabaseDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedDatabaseBlobAuditingPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedDatabaseBlobAuditingPolicyListResult.java index 42714e30d74ff..cf866a056e3c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedDatabaseBlobAuditingPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedDatabaseBlobAuditingPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of database extended auditing settings. */ +/** + * A list of database extended auditing settings. + */ @Immutable -public final class ExtendedDatabaseBlobAuditingPolicyListResult { +public final class ExtendedDatabaseBlobAuditingPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExtendedDatabaseBlobAuditingPolicyListResult class. */ + /** + * Creates an instance of ExtendedDatabaseBlobAuditingPolicyListResult class. + */ public ExtendedDatabaseBlobAuditingPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedDatabaseBlobAuditingPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedDatabaseBlobAuditingPolicyListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExtendedDatabaseBlobAuditingPolicyListResult. + */ + public static ExtendedDatabaseBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedDatabaseBlobAuditingPolicyListResult deserializedExtendedDatabaseBlobAuditingPolicyListResult + = new ExtendedDatabaseBlobAuditingPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExtendedDatabaseBlobAuditingPolicyInner.fromJson(reader1)); + deserializedExtendedDatabaseBlobAuditingPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExtendedDatabaseBlobAuditingPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedDatabaseBlobAuditingPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java index b96f662ebf94c..1984cf70522ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server extended auditing settings. */ +/** + * A list of server extended auditing settings. + */ @Immutable -public final class ExtendedServerBlobAuditingPolicyListResult { +public final class ExtendedServerBlobAuditingPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExtendedServerBlobAuditingPolicyListResult class. */ + /** + * Creates an instance of ExtendedServerBlobAuditingPolicyListResult class. + */ public ExtendedServerBlobAuditingPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtendedServerBlobAuditingPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtendedServerBlobAuditingPolicyListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExtendedServerBlobAuditingPolicyListResult. + */ + public static ExtendedServerBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtendedServerBlobAuditingPolicyListResult deserializedExtendedServerBlobAuditingPolicyListResult + = new ExtendedServerBlobAuditingPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExtendedServerBlobAuditingPolicyInner.fromJson(reader1)); + deserializedExtendedServerBlobAuditingPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExtendedServerBlobAuditingPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExtendedServerBlobAuditingPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java index 9699fb5c29d42..77e1078c9f331 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.FailoverGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of failover groups. */ +/** + * A list of failover groups. + */ @Immutable -public final class FailoverGroupListResult { +public final class FailoverGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of FailoverGroupListResult class. */ + /** + * Creates an instance of FailoverGroupListResult class. + */ public FailoverGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FailoverGroupListResult. + */ + public static FailoverGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupListResult deserializedFailoverGroupListResult = new FailoverGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FailoverGroupInner.fromJson(reader1)); + deserializedFailoverGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFailoverGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java index 990b4f271df32..80b8ab05369b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Read-only endpoint of the failover group instance. */ +/** + * Read-only endpoint of the failover group instance. + */ @Fluent -public final class FailoverGroupReadOnlyEndpoint { +public final class FailoverGroupReadOnlyEndpoint implements JsonSerializable { /* * Failover policy of the read-only endpoint for the failover group. */ - @JsonProperty(value = "failoverPolicy") private ReadOnlyEndpointFailoverPolicy failoverPolicy; - /** Creates an instance of FailoverGroupReadOnlyEndpoint class. */ + /** + * Creates an instance of FailoverGroupReadOnlyEndpoint class. + */ public FailoverGroupReadOnlyEndpoint() { } /** * Get the failoverPolicy property: Failover policy of the read-only endpoint for the failover group. - * + * * @return the failoverPolicy value. */ public ReadOnlyEndpointFailoverPolicy failoverPolicy() { @@ -31,7 +38,7 @@ public ReadOnlyEndpointFailoverPolicy failoverPolicy() { /** * Set the failoverPolicy property: Failover policy of the read-only endpoint for the failover group. - * + * * @param failoverPolicy the failoverPolicy value to set. * @return the FailoverGroupReadOnlyEndpoint object itself. */ @@ -42,9 +49,48 @@ public FailoverGroupReadOnlyEndpoint withFailoverPolicy(ReadOnlyEndpointFailover /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failoverPolicy", + this.failoverPolicy == null ? null : this.failoverPolicy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupReadOnlyEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupReadOnlyEndpoint if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FailoverGroupReadOnlyEndpoint. + */ + public static FailoverGroupReadOnlyEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupReadOnlyEndpoint deserializedFailoverGroupReadOnlyEndpoint + = new FailoverGroupReadOnlyEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failoverPolicy".equals(fieldName)) { + deserializedFailoverGroupReadOnlyEndpoint.failoverPolicy + = ReadOnlyEndpointFailoverPolicy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupReadOnlyEndpoint; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadWriteEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadWriteEndpoint.java index 825e0c7582d21..25958b65fad8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadWriteEndpoint.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadWriteEndpoint.java @@ -6,33 +6,39 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Read-write endpoint of the failover group instance. */ +/** + * Read-write endpoint of the failover group instance. + */ @Fluent -public final class FailoverGroupReadWriteEndpoint { +public final class FailoverGroupReadWriteEndpoint implements JsonSerializable { /* * Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then * failoverWithDataLossGracePeriodMinutes is required. */ - @JsonProperty(value = "failoverPolicy", required = true) private ReadWriteEndpointFailoverPolicy failoverPolicy; /* * Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is * Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - @JsonProperty(value = "failoverWithDataLossGracePeriodMinutes") private Integer failoverWithDataLossGracePeriodMinutes; - /** Creates an instance of FailoverGroupReadWriteEndpoint class. */ + /** + * Creates an instance of FailoverGroupReadWriteEndpoint class. + */ public FailoverGroupReadWriteEndpoint() { } /** * Get the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. - * + * * @return the failoverPolicy value. */ public ReadWriteEndpointFailoverPolicy failoverPolicy() { @@ -42,7 +48,7 @@ public ReadWriteEndpointFailoverPolicy failoverPolicy() { /** * Set the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. - * + * * @param failoverPolicy the failoverPolicy value to set. * @return the FailoverGroupReadWriteEndpoint object itself. */ @@ -55,7 +61,7 @@ public FailoverGroupReadWriteEndpoint withFailoverPolicy(ReadWriteEndpointFailov * Get the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted * for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is * required. - * + * * @return the failoverWithDataLossGracePeriodMinutes value. */ public Integer failoverWithDataLossGracePeriodMinutes() { @@ -66,29 +72,73 @@ public Integer failoverWithDataLossGracePeriodMinutes() { * Set the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted * for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is * required. - * + * * @param failoverWithDataLossGracePeriodMinutes the failoverWithDataLossGracePeriodMinutes value to set. * @return the FailoverGroupReadWriteEndpoint object itself. */ - public FailoverGroupReadWriteEndpoint withFailoverWithDataLossGracePeriodMinutes( - Integer failoverWithDataLossGracePeriodMinutes) { + public FailoverGroupReadWriteEndpoint + withFailoverWithDataLossGracePeriodMinutes(Integer failoverWithDataLossGracePeriodMinutes) { this.failoverWithDataLossGracePeriodMinutes = failoverWithDataLossGracePeriodMinutes; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (failoverPolicy() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property failoverPolicy in model FailoverGroupReadWriteEndpoint")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property failoverPolicy in model FailoverGroupReadWriteEndpoint")); } } private static final ClientLogger LOGGER = new ClientLogger(FailoverGroupReadWriteEndpoint.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failoverPolicy", + this.failoverPolicy == null ? null : this.failoverPolicy.toString()); + jsonWriter.writeNumberField("failoverWithDataLossGracePeriodMinutes", + this.failoverWithDataLossGracePeriodMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupReadWriteEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupReadWriteEndpoint if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FailoverGroupReadWriteEndpoint. + */ + public static FailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupReadWriteEndpoint deserializedFailoverGroupReadWriteEndpoint + = new FailoverGroupReadWriteEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failoverPolicy".equals(fieldName)) { + deserializedFailoverGroupReadWriteEndpoint.failoverPolicy + = ReadWriteEndpointFailoverPolicy.fromString(reader.getString()); + } else if ("failoverWithDataLossGracePeriodMinutes".equals(fieldName)) { + deserializedFailoverGroupReadWriteEndpoint.failoverWithDataLossGracePeriodMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupReadWriteEndpoint; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReplicationRole.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReplicationRole.java index b479451851b37..881067796f884 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReplicationRole.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReplicationRole.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Local replication role of the failover group instance. */ +/** + * Local replication role of the failover group instance. + */ public final class FailoverGroupReplicationRole extends ExpandableStringEnum { - /** Static value Primary for FailoverGroupReplicationRole. */ + /** + * Static value Primary for FailoverGroupReplicationRole. + */ public static final FailoverGroupReplicationRole PRIMARY = fromString("Primary"); - /** Static value Secondary for FailoverGroupReplicationRole. */ + /** + * Static value Secondary for FailoverGroupReplicationRole. + */ public static final FailoverGroupReplicationRole SECONDARY = fromString("Secondary"); + /** + * Creates a new instance of FailoverGroupReplicationRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FailoverGroupReplicationRole() { + } + /** * Creates or finds a FailoverGroupReplicationRole from its string representation. - * + * * @param name a name to look for. * @return the corresponding FailoverGroupReplicationRole. */ - @JsonCreator public static FailoverGroupReplicationRole fromString(String name) { return fromString(name, FailoverGroupReplicationRole.class); } /** * Gets known FailoverGroupReplicationRole values. - * + * * @return known FailoverGroupReplicationRole values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java index 44c04be73a0d3..175ddff098a4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java @@ -5,35 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.FailoverGroupUpdateProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; -/** A failover group update request. */ +/** + * A failover group update request. + */ @Fluent -public final class FailoverGroupUpdate { +public final class FailoverGroupUpdate implements JsonSerializable { /* * Resource properties. */ - @JsonProperty(value = "properties") private FailoverGroupUpdateProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of FailoverGroupUpdate class. */ + /** + * Creates an instance of FailoverGroupUpdate class. + */ public FailoverGroupUpdate() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private FailoverGroupUpdateProperties innerProperties() { @@ -42,7 +46,7 @@ private FailoverGroupUpdateProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -51,7 +55,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the FailoverGroupUpdate object itself. */ @@ -62,7 +66,7 @@ public FailoverGroupUpdate withTags(Map tags) { /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @return the readWriteEndpoint value. */ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { @@ -71,7 +75,7 @@ public FailoverGroupReadWriteEndpoint readWriteEndpoint() { /** * Set the readWriteEndpoint property: Read-write endpoint of the failover group instance. - * + * * @param readWriteEndpoint the readWriteEndpoint value to set. * @return the FailoverGroupUpdate object itself. */ @@ -85,7 +89,7 @@ public FailoverGroupUpdate withReadWriteEndpoint(FailoverGroupReadWriteEndpoint /** * Get the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @return the readOnlyEndpoint value. */ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { @@ -94,7 +98,7 @@ public FailoverGroupReadOnlyEndpoint readOnlyEndpoint() { /** * Set the readOnlyEndpoint property: Read-only endpoint of the failover group instance. - * + * * @param readOnlyEndpoint the readOnlyEndpoint value to set. * @return the FailoverGroupUpdate object itself. */ @@ -108,7 +112,7 @@ public FailoverGroupUpdate withReadOnlyEndpoint(FailoverGroupReadOnlyEndpoint re /** * Get the databases property: List of databases in the failover group. - * + * * @return the databases value. */ public List databases() { @@ -117,7 +121,7 @@ public List databases() { /** * Set the databases property: List of databases in the failover group. - * + * * @param databases the databases value to set. * @return the FailoverGroupUpdate object itself. */ @@ -131,7 +135,7 @@ public FailoverGroupUpdate withDatabases(List databases) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -139,4 +143,44 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FailoverGroupUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FailoverGroupUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FailoverGroupUpdate. + */ + public static FailoverGroupUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FailoverGroupUpdate deserializedFailoverGroupUpdate = new FailoverGroupUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedFailoverGroupUpdate.innerProperties = FailoverGroupUpdateProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFailoverGroupUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedFailoverGroupUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java index d2d2497825e3b..e69cbb7e80f2a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java @@ -5,26 +5,33 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server firewall rules. */ +/** + * A list of server firewall rules. + */ @Fluent -public final class FirewallRuleList { +public final class FirewallRuleList implements JsonSerializable { /* * The values property. */ - @JsonProperty(value = "values") private List values; - /** Creates an instance of FirewallRuleList class. */ + /** + * Creates an instance of FirewallRuleList class. + */ public FirewallRuleList() { } /** * Get the values property: The values property. - * + * * @return the values value. */ public List values() { @@ -33,7 +40,7 @@ public List values() { /** * Set the values property: The values property. - * + * * @param values the values value to set. * @return the FirewallRuleList object itself. */ @@ -44,7 +51,7 @@ public FirewallRuleList withValues(List values) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -52,4 +59,41 @@ public void validate() { values().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FirewallRuleList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FirewallRuleList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FirewallRuleList. + */ + public static FirewallRuleList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FirewallRuleList deserializedFirewallRuleList = new FirewallRuleList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1)); + deserializedFirewallRuleList.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedFirewallRuleList; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java index aed855643af8b..7191f701c5ac1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list firewall rules request. */ +/** + * The response to a list firewall rules request. + */ @Immutable -public final class FirewallRuleListResult { +public final class FirewallRuleListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of FirewallRuleListResult class. */ + /** + * Creates an instance of FirewallRuleListResult class. + */ public FirewallRuleListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FirewallRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FirewallRuleListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FirewallRuleListResult. + */ + public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FirewallRuleListResult deserializedFirewallRuleListResult = new FirewallRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1)); + deserializedFirewallRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFirewallRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFirewallRuleListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java index 6ac73367c2dbc..5c165a15708f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The list of geo backup policies. */ +/** + * The list of geo backup policies. + */ @Immutable -public final class GeoBackupPolicyListResult { +public final class GeoBackupPolicyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of GeoBackupPolicyListResult class. */ + /** + * Creates an instance of GeoBackupPolicyListResult class. + */ public GeoBackupPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeoBackupPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeoBackupPolicyListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GeoBackupPolicyListResult. + */ + public static GeoBackupPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeoBackupPolicyListResult deserializedGeoBackupPolicyListResult = new GeoBackupPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GeoBackupPolicyInner.fromJson(reader1)); + deserializedGeoBackupPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGeoBackupPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGeoBackupPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java index 85c8ba354b9a2..2ed0db59642ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for GeoBackupPolicyName. */ +/** + * Defines values for GeoBackupPolicyName. + */ public final class GeoBackupPolicyName extends ExpandableStringEnum { - /** Static value Default for GeoBackupPolicyName. */ + /** + * Static value Default for GeoBackupPolicyName. + */ public static final GeoBackupPolicyName DEFAULT = fromString("Default"); + /** + * Creates a new instance of GeoBackupPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeoBackupPolicyName() { + } + /** * Creates or finds a GeoBackupPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding GeoBackupPolicyName. */ - @JsonCreator public static GeoBackupPolicyName fromString(String name) { return fromString(name, GeoBackupPolicyName.class); } /** * Gets known GeoBackupPolicyName values. - * + * * @return known GeoBackupPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java index 9d144ad43326a..aa9f74657fa18 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The state of the geo backup policy. */ +/** + * The state of the geo backup policy. + */ public enum GeoBackupPolicyState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a GeoBackupPolicyState instance. */ + /** + * The actual serialized value for a GeoBackupPolicyState instance. + */ private final String value; GeoBackupPolicyState(String value) { @@ -24,11 +29,10 @@ public enum GeoBackupPolicyState { /** * Parses a serialized value to a GeoBackupPolicyState instance. - * + * * @param value the serialized value to parse. * @return the parsed GeoBackupPolicyState object, or null if unable to parse. */ - @JsonCreator public static GeoBackupPolicyState fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static GeoBackupPolicyState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java index cd155d8ec0ad8..96a3fd7b0acdd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list IPv6 firewall rules request. */ +/** + * The response to a list IPv6 firewall rules request. + */ @Immutable -public final class IPv6FirewallRuleListResult { +public final class IPv6FirewallRuleListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of IPv6FirewallRuleListResult class. */ + /** + * Creates an instance of IPv6FirewallRuleListResult class. + */ public IPv6FirewallRuleListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPv6FirewallRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPv6FirewallRuleListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IPv6FirewallRuleListResult. + */ + public static IPv6FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPv6FirewallRuleListResult deserializedIPv6FirewallRuleListResult = new IPv6FirewallRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> IPv6FirewallRuleInner.fromJson(reader1)); + deserializedIPv6FirewallRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIPv6FirewallRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIPv6FirewallRuleListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java index 62f994442c07d..b18fa8736c7c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,32 +12,48 @@ * principal for the resource. */ public final class IdentityType extends ExpandableStringEnum { - /** Static value None for IdentityType. */ + /** + * Static value None for IdentityType. + */ public static final IdentityType NONE = fromString("None"); - /** Static value SystemAssigned for IdentityType. */ + /** + * Static value SystemAssigned for IdentityType. + */ public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for IdentityType. */ + /** + * Static value UserAssigned for IdentityType. + */ public static final IdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned,UserAssigned for IdentityType. */ + /** + * Static value SystemAssigned,UserAssigned for IdentityType. + */ public static final IdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); + /** + * Creates a new instance of IdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityType() { + } + /** * Creates or finds a IdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding IdentityType. */ - @JsonCreator public static IdentityType fromString(String name) { return fromString(name, IdentityType.class); } /** * Gets known IdentityType values. - * + * * @return known IdentityType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java index 5f6f9450cc9ce..a17617e277e6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. */ +/** + * Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. + */ public enum ImplementationMethod { - /** Enum value TSql. */ + /** + * Enum value TSql. + */ TSQL("TSql"), - /** Enum value AzurePowerShell. */ + /** + * Enum value AzurePowerShell. + */ AZURE_POWER_SHELL("AzurePowerShell"); - /** The actual serialized value for a ImplementationMethod instance. */ + /** + * The actual serialized value for a ImplementationMethod instance. + */ private final String value; ImplementationMethod(String value) { @@ -24,11 +29,10 @@ public enum ImplementationMethod { /** * Parses a serialized value to a ImplementationMethod instance. - * + * * @param value the serialized value to parse. * @return the parsed ImplementationMethod object, or null if unable to parse. */ - @JsonCreator public static ImplementationMethod fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static ImplementationMethod fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java index 588ae3411d004..fc7797bb929fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java @@ -6,60 +6,61 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform import operation for existing database. */ +/** + * Contains the information necessary to perform import operation for existing database. + */ @Fluent -public final class ImportExistingDatabaseDefinition { +public final class ImportExistingDatabaseDefinition implements JsonSerializable { /* * Storage key type. */ - @JsonProperty(value = "storageKeyType", required = true) private StorageKeyType storageKeyType; /* * Storage key. */ - @JsonProperty(value = "storageKey", required = true) private String storageKey; /* * Storage Uri. */ - @JsonProperty(value = "storageUri", required = true) private String storageUri; /* * Administrator login name. */ - @JsonProperty(value = "administratorLogin", required = true) private String administratorLogin; /* * Administrator login password. */ - @JsonProperty(value = "administratorLoginPassword", required = true) private String administratorLoginPassword; /* * Authentication type. */ - @JsonProperty(value = "authenticationType") private String authenticationType; /* * Optional resource information to enable network isolation for request. */ - @JsonProperty(value = "networkIsolation") private NetworkIsolationSettings networkIsolation; - /** Creates an instance of ImportExistingDatabaseDefinition class. */ + /** + * Creates an instance of ImportExistingDatabaseDefinition class. + */ public ImportExistingDatabaseDefinition() { } /** * Get the storageKeyType property: Storage key type. - * + * * @return the storageKeyType value. */ public StorageKeyType storageKeyType() { @@ -68,7 +69,7 @@ public StorageKeyType storageKeyType() { /** * Set the storageKeyType property: Storage key type. - * + * * @param storageKeyType the storageKeyType value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -79,7 +80,7 @@ public ImportExistingDatabaseDefinition withStorageKeyType(StorageKeyType storag /** * Get the storageKey property: Storage key. - * + * * @return the storageKey value. */ public String storageKey() { @@ -88,7 +89,7 @@ public String storageKey() { /** * Set the storageKey property: Storage key. - * + * * @param storageKey the storageKey value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -99,7 +100,7 @@ public ImportExistingDatabaseDefinition withStorageKey(String storageKey) { /** * Get the storageUri property: Storage Uri. - * + * * @return the storageUri value. */ public String storageUri() { @@ -108,7 +109,7 @@ public String storageUri() { /** * Set the storageUri property: Storage Uri. - * + * * @param storageUri the storageUri value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -119,7 +120,7 @@ public ImportExistingDatabaseDefinition withStorageUri(String storageUri) { /** * Get the administratorLogin property: Administrator login name. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -128,7 +129,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator login name. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -139,7 +140,7 @@ public ImportExistingDatabaseDefinition withAdministratorLogin(String administra /** * Get the administratorLoginPassword property: Administrator login password. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -148,7 +149,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: Administrator login password. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -159,7 +160,7 @@ public ImportExistingDatabaseDefinition withAdministratorLoginPassword(String ad /** * Get the authenticationType property: Authentication type. - * + * * @return the authenticationType value. */ public String authenticationType() { @@ -168,7 +169,7 @@ public String authenticationType() { /** * Set the authenticationType property: Authentication type. - * + * * @param authenticationType the authenticationType value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -179,7 +180,7 @@ public ImportExistingDatabaseDefinition withAuthenticationType(String authentica /** * Get the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @return the networkIsolation value. */ public NetworkIsolationSettings networkIsolation() { @@ -188,7 +189,7 @@ public NetworkIsolationSettings networkIsolation() { /** * Set the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @param networkIsolation the networkIsolation value to set. * @return the ImportExistingDatabaseDefinition object itself. */ @@ -199,40 +200,34 @@ public ImportExistingDatabaseDefinition withNetworkIsolation(NetworkIsolationSet /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKeyType in model ImportExistingDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKeyType in model ImportExistingDatabaseDefinition")); } if (storageKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKey in model ImportExistingDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKey in model ImportExistingDatabaseDefinition")); } if (storageUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageUri in model ImportExistingDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageUri in model ImportExistingDatabaseDefinition")); } if (administratorLogin() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLogin in model ImportExistingDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLogin in model ImportExistingDatabaseDefinition")); } if (administratorLoginPassword() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLoginPassword in model" - + " ImportExistingDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLoginPassword in model ImportExistingDatabaseDefinition")); } if (networkIsolation() != null) { networkIsolation().validate(); @@ -240,4 +235,63 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ImportExistingDatabaseDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageKeyType", + this.storageKeyType == null ? null : this.storageKeyType.toString()); + jsonWriter.writeStringField("storageKey", this.storageKey); + jsonWriter.writeStringField("storageUri", this.storageUri); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("authenticationType", this.authenticationType); + jsonWriter.writeJsonField("networkIsolation", this.networkIsolation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExistingDatabaseDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExistingDatabaseDefinition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportExistingDatabaseDefinition. + */ + public static ImportExistingDatabaseDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExistingDatabaseDefinition deserializedImportExistingDatabaseDefinition + = new ImportExistingDatabaseDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageKeyType".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.storageKeyType + = StorageKeyType.fromString(reader.getString()); + } else if ("storageKey".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.storageKey = reader.getString(); + } else if ("storageUri".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.storageUri = reader.getString(); + } else if ("administratorLogin".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.administratorLoginPassword = reader.getString(); + } else if ("authenticationType".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.authenticationType = reader.getString(); + } else if ("networkIsolation".equals(fieldName)) { + deserializedImportExistingDatabaseDefinition.networkIsolation + = NetworkIsolationSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportExistingDatabaseDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java index 9e39b7b5b95e2..c27f190958204 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ImportExportExtensionsOperationResultInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Import export operation extensions list. */ +/** + * Import export operation extensions list. + */ @Immutable -public final class ImportExportExtensionsOperationListResult { +public final class ImportExportExtensionsOperationListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ImportExportExtensionsOperationListResult class. */ + /** + * Creates an instance of ImportExportExtensionsOperationListResult class. + */ public ImportExportExtensionsOperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportExportExtensionsOperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportExportExtensionsOperationListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ImportExportExtensionsOperationListResult. + */ + public static ImportExportExtensionsOperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportExportExtensionsOperationListResult deserializedImportExportExtensionsOperationListResult + = new ImportExportExtensionsOperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ImportExportExtensionsOperationResultInner.fromJson(reader1)); + deserializedImportExportExtensionsOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedImportExportExtensionsOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImportExportExtensionsOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java index 41cce0d490f6d..d29fb5f0ea705 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java @@ -6,84 +6,81 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Contains the information necessary to perform import operation for new database. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains the information necessary to perform import operation for new database. + */ @Fluent -public final class ImportNewDatabaseDefinition { +public final class ImportNewDatabaseDefinition implements JsonSerializable { /* * Name of the import database. */ - @JsonProperty(value = "databaseName") private String databaseName; /* * Edition of the import database. */ - @JsonProperty(value = "edition") private String edition; /* * Service level objective name of the import database. */ - @JsonProperty(value = "serviceObjectiveName") private String serviceObjectiveName; /* * Max size in bytes for the import database. */ - @JsonProperty(value = "maxSizeBytes") private String maxSizeBytes; /* * Storage key type. */ - @JsonProperty(value = "storageKeyType", required = true) private StorageKeyType storageKeyType; /* * Storage key. */ - @JsonProperty(value = "storageKey", required = true) private String storageKey; /* * Storage Uri. */ - @JsonProperty(value = "storageUri", required = true) private String storageUri; /* * Administrator login name. */ - @JsonProperty(value = "administratorLogin", required = true) private String administratorLogin; /* * Administrator login password. */ - @JsonProperty(value = "administratorLoginPassword", required = true) private String administratorLoginPassword; /* * Authentication type. */ - @JsonProperty(value = "authenticationType") private String authenticationType; /* * Optional resource information to enable network isolation for request. */ - @JsonProperty(value = "networkIsolation") private NetworkIsolationSettings networkIsolation; - /** Creates an instance of ImportNewDatabaseDefinition class. */ + /** + * Creates an instance of ImportNewDatabaseDefinition class. + */ public ImportNewDatabaseDefinition() { } /** * Get the databaseName property: Name of the import database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -92,7 +89,7 @@ public String databaseName() { /** * Set the databaseName property: Name of the import database. - * + * * @param databaseName the databaseName value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -103,7 +100,7 @@ public ImportNewDatabaseDefinition withDatabaseName(String databaseName) { /** * Get the edition property: Edition of the import database. - * + * * @return the edition value. */ public String edition() { @@ -112,7 +109,7 @@ public String edition() { /** * Set the edition property: Edition of the import database. - * + * * @param edition the edition value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -123,7 +120,7 @@ public ImportNewDatabaseDefinition withEdition(String edition) { /** * Get the serviceObjectiveName property: Service level objective name of the import database. - * + * * @return the serviceObjectiveName value. */ public String serviceObjectiveName() { @@ -132,7 +129,7 @@ public String serviceObjectiveName() { /** * Set the serviceObjectiveName property: Service level objective name of the import database. - * + * * @param serviceObjectiveName the serviceObjectiveName value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -143,7 +140,7 @@ public ImportNewDatabaseDefinition withServiceObjectiveName(String serviceObject /** * Get the maxSizeBytes property: Max size in bytes for the import database. - * + * * @return the maxSizeBytes value. */ public String maxSizeBytes() { @@ -152,7 +149,7 @@ public String maxSizeBytes() { /** * Set the maxSizeBytes property: Max size in bytes for the import database. - * + * * @param maxSizeBytes the maxSizeBytes value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -163,7 +160,7 @@ public ImportNewDatabaseDefinition withMaxSizeBytes(String maxSizeBytes) { /** * Get the storageKeyType property: Storage key type. - * + * * @return the storageKeyType value. */ public StorageKeyType storageKeyType() { @@ -172,7 +169,7 @@ public StorageKeyType storageKeyType() { /** * Set the storageKeyType property: Storage key type. - * + * * @param storageKeyType the storageKeyType value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -183,7 +180,7 @@ public ImportNewDatabaseDefinition withStorageKeyType(StorageKeyType storageKeyT /** * Get the storageKey property: Storage key. - * + * * @return the storageKey value. */ public String storageKey() { @@ -192,7 +189,7 @@ public String storageKey() { /** * Set the storageKey property: Storage key. - * + * * @param storageKey the storageKey value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -203,7 +200,7 @@ public ImportNewDatabaseDefinition withStorageKey(String storageKey) { /** * Get the storageUri property: Storage Uri. - * + * * @return the storageUri value. */ public String storageUri() { @@ -212,7 +209,7 @@ public String storageUri() { /** * Set the storageUri property: Storage Uri. - * + * * @param storageUri the storageUri value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -223,7 +220,7 @@ public ImportNewDatabaseDefinition withStorageUri(String storageUri) { /** * Get the administratorLogin property: Administrator login name. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -232,7 +229,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator login name. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -243,7 +240,7 @@ public ImportNewDatabaseDefinition withAdministratorLogin(String administratorLo /** * Get the administratorLoginPassword property: Administrator login password. - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -252,7 +249,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: Administrator login password. - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -263,7 +260,7 @@ public ImportNewDatabaseDefinition withAdministratorLoginPassword(String adminis /** * Get the authenticationType property: Authentication type. - * + * * @return the authenticationType value. */ public String authenticationType() { @@ -272,7 +269,7 @@ public String authenticationType() { /** * Set the authenticationType property: Authentication type. - * + * * @param authenticationType the authenticationType value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -283,7 +280,7 @@ public ImportNewDatabaseDefinition withAuthenticationType(String authenticationT /** * Get the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @return the networkIsolation value. */ public NetworkIsolationSettings networkIsolation() { @@ -292,7 +289,7 @@ public NetworkIsolationSettings networkIsolation() { /** * Set the networkIsolation property: Optional resource information to enable network isolation for request. - * + * * @param networkIsolation the networkIsolation value to set. * @return the ImportNewDatabaseDefinition object itself. */ @@ -303,39 +300,34 @@ public ImportNewDatabaseDefinition withNetworkIsolation(NetworkIsolationSettings /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageKeyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKeyType in model ImportNewDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKeyType in model ImportNewDatabaseDefinition")); } if (storageKey() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageKey in model ImportNewDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageKey in model ImportNewDatabaseDefinition")); } if (storageUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageUri in model ImportNewDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageUri in model ImportNewDatabaseDefinition")); } if (administratorLogin() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLogin in model ImportNewDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLogin in model ImportNewDatabaseDefinition")); } if (administratorLoginPassword() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property administratorLoginPassword in model ImportNewDatabaseDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLoginPassword in model ImportNewDatabaseDefinition")); } if (networkIsolation() != null) { networkIsolation().validate(); @@ -343,4 +335,74 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ImportNewDatabaseDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageKeyType", + this.storageKeyType == null ? null : this.storageKeyType.toString()); + jsonWriter.writeStringField("storageKey", this.storageKey); + jsonWriter.writeStringField("storageUri", this.storageUri); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + jsonWriter.writeStringField("databaseName", this.databaseName); + jsonWriter.writeStringField("edition", this.edition); + jsonWriter.writeStringField("serviceObjectiveName", this.serviceObjectiveName); + jsonWriter.writeStringField("maxSizeBytes", this.maxSizeBytes); + jsonWriter.writeStringField("authenticationType", this.authenticationType); + jsonWriter.writeJsonField("networkIsolation", this.networkIsolation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImportNewDatabaseDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImportNewDatabaseDefinition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ImportNewDatabaseDefinition. + */ + public static ImportNewDatabaseDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImportNewDatabaseDefinition deserializedImportNewDatabaseDefinition = new ImportNewDatabaseDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageKeyType".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.storageKeyType + = StorageKeyType.fromString(reader.getString()); + } else if ("storageKey".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.storageKey = reader.getString(); + } else if ("storageUri".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.storageUri = reader.getString(); + } else if ("administratorLogin".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.administratorLoginPassword = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.databaseName = reader.getString(); + } else if ("edition".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.edition = reader.getString(); + } else if ("serviceObjectiveName".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.serviceObjectiveName = reader.getString(); + } else if ("maxSizeBytes".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.maxSizeBytes = reader.getString(); + } else if ("authenticationType".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.authenticationType = reader.getString(); + } else if ("networkIsolation".equals(fieldName)) { + deserializedImportNewDatabaseDefinition.networkIsolation + = NetworkIsolationSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImportNewDatabaseDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java index e90ca64f0194f..750f5d7474b9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of instance failover groups. */ +/** + * A list of instance failover groups. + */ @Immutable -public final class InstanceFailoverGroupListResult { +public final class InstanceFailoverGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of InstanceFailoverGroupListResult class. */ + /** + * Creates an instance of InstanceFailoverGroupListResult class. + */ public InstanceFailoverGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstanceFailoverGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstanceFailoverGroupListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstanceFailoverGroupListResult. + */ + public static InstanceFailoverGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstanceFailoverGroupListResult deserializedInstanceFailoverGroupListResult + = new InstanceFailoverGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InstanceFailoverGroupInner.fromJson(reader1)); + deserializedInstanceFailoverGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInstanceFailoverGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstanceFailoverGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java index e8d5aba091f47..381d239c7b555 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java @@ -5,24 +5,32 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Read-only endpoint of the failover group instance. */ +/** + * Read-only endpoint of the failover group instance. + */ @Fluent -public final class InstanceFailoverGroupReadOnlyEndpoint { +public final class InstanceFailoverGroupReadOnlyEndpoint + implements JsonSerializable { /* * Failover policy of the read-only endpoint for the failover group. */ - @JsonProperty(value = "failoverPolicy") private ReadOnlyEndpointFailoverPolicy failoverPolicy; - /** Creates an instance of InstanceFailoverGroupReadOnlyEndpoint class. */ + /** + * Creates an instance of InstanceFailoverGroupReadOnlyEndpoint class. + */ public InstanceFailoverGroupReadOnlyEndpoint() { } /** * Get the failoverPolicy property: Failover policy of the read-only endpoint for the failover group. - * + * * @return the failoverPolicy value. */ public ReadOnlyEndpointFailoverPolicy failoverPolicy() { @@ -31,7 +39,7 @@ public ReadOnlyEndpointFailoverPolicy failoverPolicy() { /** * Set the failoverPolicy property: Failover policy of the read-only endpoint for the failover group. - * + * * @param failoverPolicy the failoverPolicy value to set. * @return the InstanceFailoverGroupReadOnlyEndpoint object itself. */ @@ -42,9 +50,48 @@ public InstanceFailoverGroupReadOnlyEndpoint withFailoverPolicy(ReadOnlyEndpoint /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failoverPolicy", + this.failoverPolicy == null ? null : this.failoverPolicy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstanceFailoverGroupReadOnlyEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstanceFailoverGroupReadOnlyEndpoint if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstanceFailoverGroupReadOnlyEndpoint. + */ + public static InstanceFailoverGroupReadOnlyEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstanceFailoverGroupReadOnlyEndpoint deserializedInstanceFailoverGroupReadOnlyEndpoint + = new InstanceFailoverGroupReadOnlyEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failoverPolicy".equals(fieldName)) { + deserializedInstanceFailoverGroupReadOnlyEndpoint.failoverPolicy + = ReadOnlyEndpointFailoverPolicy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedInstanceFailoverGroupReadOnlyEndpoint; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java index 4a3e0e659eac5..950d823acc90d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java @@ -6,33 +6,40 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Read-write endpoint of the failover group instance. */ +/** + * Read-write endpoint of the failover group instance. + */ @Fluent -public final class InstanceFailoverGroupReadWriteEndpoint { +public final class InstanceFailoverGroupReadWriteEndpoint + implements JsonSerializable { /* * Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then * failoverWithDataLossGracePeriodMinutes is required. */ - @JsonProperty(value = "failoverPolicy", required = true) private ReadWriteEndpointFailoverPolicy failoverPolicy; /* * Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is * Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - @JsonProperty(value = "failoverWithDataLossGracePeriodMinutes") private Integer failoverWithDataLossGracePeriodMinutes; - /** Creates an instance of InstanceFailoverGroupReadWriteEndpoint class. */ + /** + * Creates an instance of InstanceFailoverGroupReadWriteEndpoint class. + */ public InstanceFailoverGroupReadWriteEndpoint() { } /** * Get the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. - * + * * @return the failoverPolicy value. */ public ReadWriteEndpointFailoverPolicy failoverPolicy() { @@ -42,7 +49,7 @@ public ReadWriteEndpointFailoverPolicy failoverPolicy() { /** * Set the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. - * + * * @param failoverPolicy the failoverPolicy value to set. * @return the InstanceFailoverGroupReadWriteEndpoint object itself. */ @@ -55,7 +62,7 @@ public InstanceFailoverGroupReadWriteEndpoint withFailoverPolicy(ReadWriteEndpoi * Get the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted * for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is * required. - * + * * @return the failoverWithDataLossGracePeriodMinutes value. */ public Integer failoverWithDataLossGracePeriodMinutes() { @@ -66,29 +73,73 @@ public Integer failoverWithDataLossGracePeriodMinutes() { * Set the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted * for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is * required. - * + * * @param failoverWithDataLossGracePeriodMinutes the failoverWithDataLossGracePeriodMinutes value to set. * @return the InstanceFailoverGroupReadWriteEndpoint object itself. */ - public InstanceFailoverGroupReadWriteEndpoint withFailoverWithDataLossGracePeriodMinutes( - Integer failoverWithDataLossGracePeriodMinutes) { + public InstanceFailoverGroupReadWriteEndpoint + withFailoverWithDataLossGracePeriodMinutes(Integer failoverWithDataLossGracePeriodMinutes) { this.failoverWithDataLossGracePeriodMinutes = failoverWithDataLossGracePeriodMinutes; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (failoverPolicy() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property failoverPolicy in model InstanceFailoverGroupReadWriteEndpoint")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property failoverPolicy in model InstanceFailoverGroupReadWriteEndpoint")); } } private static final ClientLogger LOGGER = new ClientLogger(InstanceFailoverGroupReadWriteEndpoint.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failoverPolicy", + this.failoverPolicy == null ? null : this.failoverPolicy.toString()); + jsonWriter.writeNumberField("failoverWithDataLossGracePeriodMinutes", + this.failoverWithDataLossGracePeriodMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstanceFailoverGroupReadWriteEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstanceFailoverGroupReadWriteEndpoint if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InstanceFailoverGroupReadWriteEndpoint. + */ + public static InstanceFailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstanceFailoverGroupReadWriteEndpoint deserializedInstanceFailoverGroupReadWriteEndpoint + = new InstanceFailoverGroupReadWriteEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failoverPolicy".equals(fieldName)) { + deserializedInstanceFailoverGroupReadWriteEndpoint.failoverPolicy + = ReadWriteEndpointFailoverPolicy.fromString(reader.getString()); + } else if ("failoverWithDataLossGracePeriodMinutes".equals(fieldName)) { + deserializedInstanceFailoverGroupReadWriteEndpoint.failoverWithDataLossGracePeriodMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedInstanceFailoverGroupReadWriteEndpoint; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java index db661b3975e04..b9f6909a2a055 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java @@ -5,32 +5,45 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Local replication role of the failover group instance. */ +/** + * Local replication role of the failover group instance. + */ public final class InstanceFailoverGroupReplicationRole extends ExpandableStringEnum { - /** Static value Primary for InstanceFailoverGroupReplicationRole. */ + /** + * Static value Primary for InstanceFailoverGroupReplicationRole. + */ public static final InstanceFailoverGroupReplicationRole PRIMARY = fromString("Primary"); - /** Static value Secondary for InstanceFailoverGroupReplicationRole. */ + /** + * Static value Secondary for InstanceFailoverGroupReplicationRole. + */ public static final InstanceFailoverGroupReplicationRole SECONDARY = fromString("Secondary"); + /** + * Creates a new instance of InstanceFailoverGroupReplicationRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstanceFailoverGroupReplicationRole() { + } + /** * Creates or finds a InstanceFailoverGroupReplicationRole from its string representation. - * + * * @param name a name to look for. * @return the corresponding InstanceFailoverGroupReplicationRole. */ - @JsonCreator public static InstanceFailoverGroupReplicationRole fromString(String name) { return fromString(name, InstanceFailoverGroupReplicationRole.class); } /** * Gets known InstanceFailoverGroupReplicationRole values. - * + * * @return known InstanceFailoverGroupReplicationRole values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java index 024d3c503f07b..bd13531a80d8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java @@ -5,43 +5,47 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The instance pool capability. */ +/** + * The instance pool capability. + */ @Fluent -public final class InstancePoolEditionCapability { +public final class InstancePoolEditionCapability implements JsonSerializable { /* * The instance pool version name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The supported families. */ - @JsonProperty(value = "supportedFamilies", access = JsonProperty.Access.WRITE_ONLY) private List supportedFamilies; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of InstancePoolEditionCapability class. */ + /** + * Creates an instance of InstancePoolEditionCapability class. + */ public InstancePoolEditionCapability() { } /** * Get the name property: The instance pool version name. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Get the supportedFamilies property: The supported families. - * + * * @return the supportedFamilies value. */ public List supportedFamilies() { @@ -59,7 +63,7 @@ public List supportedFamilies() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -68,7 +72,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -77,7 +81,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the InstancePoolEditionCapability object itself. */ @@ -88,7 +92,7 @@ public InstancePoolEditionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -96,4 +100,49 @@ public void validate() { supportedFamilies().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolEditionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolEditionCapability if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstancePoolEditionCapability. + */ + public static InstancePoolEditionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolEditionCapability deserializedInstancePoolEditionCapability + = new InstancePoolEditionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedInstancePoolEditionCapability.name = reader.getString(); + } else if ("supportedFamilies".equals(fieldName)) { + List supportedFamilies + = reader.readArray(reader1 -> InstancePoolFamilyCapability.fromJson(reader1)); + deserializedInstancePoolEditionCapability.supportedFamilies = supportedFamilies; + } else if ("status".equals(fieldName)) { + deserializedInstancePoolEditionCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedInstancePoolEditionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolEditionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolFamilyCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolFamilyCapability.java index 584988f784c9f..79e11e90f0888 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolFamilyCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolFamilyCapability.java @@ -5,49 +5,52 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The instance pool family capability. */ +/** + * The instance pool family capability. + */ @Fluent -public final class InstancePoolFamilyCapability { +public final class InstancePoolFamilyCapability implements JsonSerializable { /* * Family name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * List of supported license types. */ - @JsonProperty(value = "supportedLicenseTypes", access = JsonProperty.Access.WRITE_ONLY) private List supportedLicenseTypes; /* * List of supported virtual cores values. */ - @JsonProperty(value = "supportedVcoresValues", access = JsonProperty.Access.WRITE_ONLY) private List supportedVcoresValues; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of InstancePoolFamilyCapability class. */ + /** + * Creates an instance of InstancePoolFamilyCapability class. + */ public InstancePoolFamilyCapability() { } /** * Get the name property: Family name. - * + * * @return the name value. */ public String name() { @@ -56,7 +59,7 @@ public String name() { /** * Get the supportedLicenseTypes property: List of supported license types. - * + * * @return the supportedLicenseTypes value. */ public List supportedLicenseTypes() { @@ -65,7 +68,7 @@ public List supportedLicenseTypes() { /** * Get the supportedVcoresValues property: List of supported virtual cores values. - * + * * @return the supportedVcoresValues value. */ public List supportedVcoresValues() { @@ -74,7 +77,7 @@ public List supportedVcoresValues() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -83,7 +86,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -92,7 +95,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the InstancePoolFamilyCapability object itself. */ @@ -103,7 +106,7 @@ public InstancePoolFamilyCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,4 +117,52 @@ public void validate() { supportedVcoresValues().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolFamilyCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolFamilyCapability if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstancePoolFamilyCapability. + */ + public static InstancePoolFamilyCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolFamilyCapability deserializedInstancePoolFamilyCapability = new InstancePoolFamilyCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedInstancePoolFamilyCapability.name = reader.getString(); + } else if ("supportedLicenseTypes".equals(fieldName)) { + List supportedLicenseTypes + = reader.readArray(reader1 -> LicenseTypeCapability.fromJson(reader1)); + deserializedInstancePoolFamilyCapability.supportedLicenseTypes = supportedLicenseTypes; + } else if ("supportedVcoresValues".equals(fieldName)) { + List supportedVcoresValues + = reader.readArray(reader1 -> InstancePoolVcoresCapability.fromJson(reader1)); + deserializedInstancePoolFamilyCapability.supportedVcoresValues = supportedVcoresValues; + } else if ("status".equals(fieldName)) { + deserializedInstancePoolFamilyCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedInstancePoolFamilyCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolFamilyCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolLicenseType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolLicenseType.java index 376e57eaf514d..0e8db45a6e2b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolLicenseType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolLicenseType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * SQL license price). */ public final class InstancePoolLicenseType extends ExpandableStringEnum { - /** Static value LicenseIncluded for InstancePoolLicenseType. */ + /** + * Static value LicenseIncluded for InstancePoolLicenseType. + */ public static final InstancePoolLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); - /** Static value BasePrice for InstancePoolLicenseType. */ + /** + * Static value BasePrice for InstancePoolLicenseType. + */ public static final InstancePoolLicenseType BASE_PRICE = fromString("BasePrice"); + /** + * Creates a new instance of InstancePoolLicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstancePoolLicenseType() { + } + /** * Creates or finds a InstancePoolLicenseType from its string representation. - * + * * @param name a name to look for. * @return the corresponding InstancePoolLicenseType. */ - @JsonCreator public static InstancePoolLicenseType fromString(String name) { return fromString(name, InstancePoolLicenseType.class); } /** * Gets known InstancePoolLicenseType values. - * + * * @return known InstancePoolLicenseType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java index 8a54550e44200..c71936c07011f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.InstancePoolInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of Azure SQL instance pools. */ +/** + * A list of Azure SQL instance pools. + */ @Immutable -public final class InstancePoolListResult { +public final class InstancePoolListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of InstancePoolListResult class. */ + /** + * Creates an instance of InstancePoolListResult class. + */ public InstancePoolListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstancePoolListResult. + */ + public static InstancePoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolListResult deserializedInstancePoolListResult = new InstancePoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> InstancePoolInner.fromJson(reader1)); + deserializedInstancePoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInstancePoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java index 54e7e3846e62a..0f98a45445353 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java @@ -5,27 +5,32 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; -/** An update to an Instance pool. */ +/** + * An update to an Instance pool. + */ @Fluent -public final class InstancePoolUpdate { +public final class InstancePoolUpdate implements JsonSerializable { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of InstancePoolUpdate class. */ + /** + * Creates an instance of InstancePoolUpdate class. + */ public InstancePoolUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +39,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the InstancePoolUpdate object itself. */ @@ -45,9 +50,46 @@ public InstancePoolUpdate withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the InstancePoolUpdate. + */ + public static InstancePoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolUpdate deserializedInstancePoolUpdate = new InstancePoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInstancePoolUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java index aa49679f29c59..5e2f947c2eac7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java @@ -5,48 +5,51 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The managed instance virtual cores capability. */ +/** + * The managed instance virtual cores capability. + */ @Fluent -public final class InstancePoolVcoresCapability { +public final class InstancePoolVcoresCapability implements JsonSerializable { /* * The virtual cores identifier. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The virtual cores value. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Integer value; /* * Storage limit. */ - @JsonProperty(value = "storageLimit", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability storageLimit; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of InstancePoolVcoresCapability class. */ + /** + * Creates an instance of InstancePoolVcoresCapability class. + */ public InstancePoolVcoresCapability() { } /** * Get the name property: The virtual cores identifier. - * + * * @return the name value. */ public String name() { @@ -55,7 +58,7 @@ public String name() { /** * Get the value property: The virtual cores value. - * + * * @return the value value. */ public Integer value() { @@ -64,7 +67,7 @@ public Integer value() { /** * Get the storageLimit property: Storage limit. - * + * * @return the storageLimit value. */ public MaxSizeCapability storageLimit() { @@ -73,7 +76,7 @@ public MaxSizeCapability storageLimit() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -82,7 +85,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -91,7 +94,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the InstancePoolVcoresCapability object itself. */ @@ -102,7 +105,7 @@ public InstancePoolVcoresCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -110,4 +113,48 @@ public void validate() { storageLimit().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InstancePoolVcoresCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InstancePoolVcoresCapability if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InstancePoolVcoresCapability. + */ + public static InstancePoolVcoresCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InstancePoolVcoresCapability deserializedInstancePoolVcoresCapability = new InstancePoolVcoresCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedInstancePoolVcoresCapability.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedInstancePoolVcoresCapability.value = reader.getNullable(JsonReader::getInt); + } else if ("storageLimit".equals(fieldName)) { + deserializedInstancePoolVcoresCapability.storageLimit = MaxSizeCapability.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedInstancePoolVcoresCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedInstancePoolVcoresCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInstancePoolVcoresCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java index 40def348a2061..0849a0d246b2a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No. */ +/** + * Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No. + */ public enum IsRetryable { - /** Enum value Yes. */ + /** + * Enum value Yes. + */ YES("Yes"), - /** Enum value No. */ + /** + * Enum value No. + */ NO("No"); - /** The actual serialized value for a IsRetryable instance. */ + /** + * The actual serialized value for a IsRetryable instance. + */ private final String value; IsRetryable(String value) { @@ -24,11 +29,10 @@ public enum IsRetryable { /** * Parses a serialized value to a IsRetryable instance. - * + * * @param value the serialized value to parse. * @return the parsed IsRetryable object, or null if unable to parse. */ - @JsonCreator public static IsRetryable fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static IsRetryable fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java index 1cb483ef515d6..1634ba41c19d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobAgentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of Azure SQL job agents. */ +/** + * A list of Azure SQL job agents. + */ @Immutable -public final class JobAgentListResult { +public final class JobAgentListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobAgentListResult class. */ + /** + * Creates an instance of JobAgentListResult class. + */ public JobAgentListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobAgentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobAgentListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobAgentListResult. + */ + public static JobAgentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobAgentListResult deserializedJobAgentListResult = new JobAgentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobAgentInner.fromJson(reader1)); + deserializedJobAgentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobAgentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobAgentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java index f8d26925cffe1..aabb8b51bb118 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the job agent. */ +/** + * The state of the job agent. + */ public final class JobAgentState extends ExpandableStringEnum { - /** Static value Creating for JobAgentState. */ + /** + * Static value Creating for JobAgentState. + */ public static final JobAgentState CREATING = fromString("Creating"); - /** Static value Ready for JobAgentState. */ + /** + * Static value Ready for JobAgentState. + */ public static final JobAgentState READY = fromString("Ready"); - /** Static value Updating for JobAgentState. */ + /** + * Static value Updating for JobAgentState. + */ public static final JobAgentState UPDATING = fromString("Updating"); - /** Static value Deleting for JobAgentState. */ + /** + * Static value Deleting for JobAgentState. + */ public static final JobAgentState DELETING = fromString("Deleting"); - /** Static value Disabled for JobAgentState. */ + /** + * Static value Disabled for JobAgentState. + */ public static final JobAgentState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of JobAgentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobAgentState() { + } + /** * Creates or finds a JobAgentState from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobAgentState. */ - @JsonCreator public static JobAgentState fromString(String name) { return fromString(name, JobAgentState.class); } /** * Gets known JobAgentState values. - * + * * @return known JobAgentState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java index 43f16acf2d7d4..8603d35635aaa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java @@ -5,27 +5,32 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; -/** An update to an Azure SQL job agent. */ +/** + * An update to an Azure SQL job agent. + */ @Fluent -public final class JobAgentUpdate { +public final class JobAgentUpdate implements JsonSerializable { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of JobAgentUpdate class. */ + /** + * Creates an instance of JobAgentUpdate class. + */ public JobAgentUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +39,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the JobAgentUpdate object itself. */ @@ -45,9 +50,46 @@ public JobAgentUpdate withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobAgentUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobAgentUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobAgentUpdate. + */ + public static JobAgentUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobAgentUpdate deserializedJobAgentUpdate = new JobAgentUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedJobAgentUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedJobAgentUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java index 7272fb860ec1b..3154354b0cc3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobCredentialInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of job credentials. */ +/** + * A list of job credentials. + */ @Immutable -public final class JobCredentialListResult { +public final class JobCredentialListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobCredentialListResult class. */ + /** + * Creates an instance of JobCredentialListResult class. + */ public JobCredentialListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobCredentialListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobCredentialListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobCredentialListResult. + */ + public static JobCredentialListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobCredentialListResult deserializedJobCredentialListResult = new JobCredentialListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobCredentialInner.fromJson(reader1)); + deserializedJobCredentialListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobCredentialListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobCredentialListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java index cf3c1d4df2e74..c1c556bbb3f78 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java @@ -5,56 +5,85 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The detailed state of the job execution. */ +/** + * The detailed state of the job execution. + */ public final class JobExecutionLifecycle extends ExpandableStringEnum { - /** Static value Created for JobExecutionLifecycle. */ + /** + * Static value Created for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle CREATED = fromString("Created"); - /** Static value InProgress for JobExecutionLifecycle. */ + /** + * Static value InProgress for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle IN_PROGRESS = fromString("InProgress"); - /** Static value WaitingForChildJobExecutions for JobExecutionLifecycle. */ - public static final JobExecutionLifecycle WAITING_FOR_CHILD_JOB_EXECUTIONS = - fromString("WaitingForChildJobExecutions"); + /** + * Static value WaitingForChildJobExecutions for JobExecutionLifecycle. + */ + public static final JobExecutionLifecycle WAITING_FOR_CHILD_JOB_EXECUTIONS + = fromString("WaitingForChildJobExecutions"); - /** Static value WaitingForRetry for JobExecutionLifecycle. */ + /** + * Static value WaitingForRetry for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle WAITING_FOR_RETRY = fromString("WaitingForRetry"); - /** Static value Succeeded for JobExecutionLifecycle. */ + /** + * Static value Succeeded for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle SUCCEEDED = fromString("Succeeded"); - /** Static value SucceededWithSkipped for JobExecutionLifecycle. */ + /** + * Static value SucceededWithSkipped for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle SUCCEEDED_WITH_SKIPPED = fromString("SucceededWithSkipped"); - /** Static value Failed for JobExecutionLifecycle. */ + /** + * Static value Failed for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle FAILED = fromString("Failed"); - /** Static value TimedOut for JobExecutionLifecycle. */ + /** + * Static value TimedOut for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle TIMED_OUT = fromString("TimedOut"); - /** Static value Canceled for JobExecutionLifecycle. */ + /** + * Static value Canceled for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle CANCELED = fromString("Canceled"); - /** Static value Skipped for JobExecutionLifecycle. */ + /** + * Static value Skipped for JobExecutionLifecycle. + */ public static final JobExecutionLifecycle SKIPPED = fromString("Skipped"); + /** + * Creates a new instance of JobExecutionLifecycle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobExecutionLifecycle() { + } + /** * Creates or finds a JobExecutionLifecycle from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobExecutionLifecycle. */ - @JsonCreator public static JobExecutionLifecycle fromString(String name) { return fromString(name, JobExecutionLifecycle.class); } /** * Gets known JobExecutionLifecycle values. - * + * * @return known JobExecutionLifecycle values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java index ad1c624de1a93..ea4e94f61eae7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobExecutionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of job executions. */ +/** + * A list of job executions. + */ @Immutable -public final class JobExecutionListResult { +public final class JobExecutionListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobExecutionListResult class. */ + /** + * Creates an instance of JobExecutionListResult class. + */ public JobExecutionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobExecutionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobExecutionListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobExecutionListResult. + */ + public static JobExecutionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobExecutionListResult deserializedJobExecutionListResult = new JobExecutionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobExecutionInner.fromJson(reader1)); + deserializedJobExecutionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobExecutionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobExecutionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java index 1fd05b20f89fd..6e2d9b8134ff7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The target that a job execution is executed on. */ +/** + * The target that a job execution is executed on. + */ @Immutable -public final class JobExecutionTarget { +public final class JobExecutionTarget implements JsonSerializable { /* * The type of the target. */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private JobTargetType type; /* * The server name. */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) private String serverName; /* * The database name. */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; - /** Creates an instance of JobExecutionTarget class. */ + /** + * Creates an instance of JobExecutionTarget class. + */ public JobExecutionTarget() { } /** * Get the type property: The type of the target. - * + * * @return the type value. */ public JobTargetType type() { @@ -43,7 +48,7 @@ public JobTargetType type() { /** * Get the serverName property: The server name. - * + * * @return the serverName value. */ public String serverName() { @@ -52,7 +57,7 @@ public String serverName() { /** * Get the databaseName property: The database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -61,9 +66,48 @@ public String databaseName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobExecutionTarget from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobExecutionTarget if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobExecutionTarget. + */ + public static JobExecutionTarget fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobExecutionTarget deserializedJobExecutionTarget = new JobExecutionTarget(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedJobExecutionTarget.type = JobTargetType.fromString(reader.getString()); + } else if ("serverName".equals(fieldName)) { + deserializedJobExecutionTarget.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedJobExecutionTarget.databaseName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobExecutionTarget; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobListResult.java index 92cd34d75a719..774e244ab1354 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of jobs. */ +/** + * A list of jobs. + */ @Immutable -public final class JobListResult { +public final class JobListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobListResult class. */ + /** + * Creates an instance of JobListResult class. + */ public JobListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobListResult. + */ + public static JobListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobListResult deserializedJobListResult = new JobListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobInner.fromJson(reader1)); + deserializedJobListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java index 97d4d329cf528..423c340262385 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java @@ -5,49 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; -/** Scheduling properties of a job. */ +/** + * Scheduling properties of a job. + */ @Fluent -public final class JobSchedule { +public final class JobSchedule implements JsonSerializable { /* * Schedule start time. */ - @JsonProperty(value = "startTime") private OffsetDateTime startTime; /* * Schedule end time. */ - @JsonProperty(value = "endTime") private OffsetDateTime endTime; /* * Schedule interval type */ - @JsonProperty(value = "type") private JobScheduleType type; /* * Whether or not the schedule is enabled. */ - @JsonProperty(value = "enabled") private Boolean enabled; /* * Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. */ - @JsonProperty(value = "interval") private String interval; - /** Creates an instance of JobSchedule class. */ + /** + * Creates an instance of JobSchedule class. + */ public JobSchedule() { } /** * Get the startTime property: Schedule start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -56,7 +61,7 @@ public OffsetDateTime startTime() { /** * Set the startTime property: Schedule start time. - * + * * @param startTime the startTime value to set. * @return the JobSchedule object itself. */ @@ -67,7 +72,7 @@ public JobSchedule withStartTime(OffsetDateTime startTime) { /** * Get the endTime property: Schedule end time. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -76,7 +81,7 @@ public OffsetDateTime endTime() { /** * Set the endTime property: Schedule end time. - * + * * @param endTime the endTime value to set. * @return the JobSchedule object itself. */ @@ -87,7 +92,7 @@ public JobSchedule withEndTime(OffsetDateTime endTime) { /** * Get the type property: Schedule interval type. - * + * * @return the type value. */ public JobScheduleType type() { @@ -96,7 +101,7 @@ public JobScheduleType type() { /** * Set the type property: Schedule interval type. - * + * * @param type the type value to set. * @return the JobSchedule object itself. */ @@ -107,7 +112,7 @@ public JobSchedule withType(JobScheduleType type) { /** * Get the enabled property: Whether or not the schedule is enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -116,7 +121,7 @@ public Boolean enabled() { /** * Set the enabled property: Whether or not the schedule is enabled. - * + * * @param enabled the enabled value to set. * @return the JobSchedule object itself. */ @@ -128,7 +133,7 @@ public JobSchedule withEnabled(Boolean enabled) { /** * Get the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 * duration format. - * + * * @return the interval value. */ public String interval() { @@ -138,7 +143,7 @@ public String interval() { /** * Set the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 * duration format. - * + * * @param interval the interval value to set. * @return the JobSchedule object itself. */ @@ -149,9 +154,61 @@ public JobSchedule withInterval(String interval) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobSchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobSchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobSchedule. + */ + public static JobSchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobSchedule deserializedJobSchedule = new JobSchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("startTime".equals(fieldName)) { + deserializedJobSchedule.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedJobSchedule.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("type".equals(fieldName)) { + deserializedJobSchedule.type = JobScheduleType.fromString(reader.getString()); + } else if ("enabled".equals(fieldName)) { + deserializedJobSchedule.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("interval".equals(fieldName)) { + deserializedJobSchedule.interval = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobSchedule; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java index fe707ad5edcbd..e4b3798d85ba0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Schedule interval type. */ +/** + * Schedule interval type. + */ public enum JobScheduleType { - /** Enum value Once. */ + /** + * Enum value Once. + */ ONCE("Once"), - /** Enum value Recurring. */ + /** + * Enum value Recurring. + */ RECURRING("Recurring"); - /** The actual serialized value for a JobScheduleType instance. */ + /** + * The actual serialized value for a JobScheduleType instance. + */ private final String value; JobScheduleType(String value) { @@ -24,11 +29,10 @@ public enum JobScheduleType { /** * Parses a serialized value to a JobScheduleType instance. - * + * * @param value the serialized value to parse. * @return the parsed JobScheduleType object, or null if unable to parse. */ - @JsonCreator public static JobScheduleType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static JobScheduleType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java index 756c78c615a61..df15accb87c2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java @@ -6,36 +6,41 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The action to be executed by a job step. */ +/** + * The action to be executed by a job step. + */ @Fluent -public final class JobStepAction { +public final class JobStepAction implements JsonSerializable { /* * Type of action being executed by the job step. */ - @JsonProperty(value = "type") private JobStepActionType type; /* * The source of the action to execute. */ - @JsonProperty(value = "source") private JobStepActionSource source; /* * The action value, for example the text of the T-SQL script to execute. */ - @JsonProperty(value = "value", required = true) private String value; - /** Creates an instance of JobStepAction class. */ + /** + * Creates an instance of JobStepAction class. + */ public JobStepAction() { } /** * Get the type property: Type of action being executed by the job step. - * + * * @return the type value. */ public JobStepActionType type() { @@ -44,7 +49,7 @@ public JobStepActionType type() { /** * Set the type property: Type of action being executed by the job step. - * + * * @param type the type value to set. * @return the JobStepAction object itself. */ @@ -55,7 +60,7 @@ public JobStepAction withType(JobStepActionType type) { /** * Get the source property: The source of the action to execute. - * + * * @return the source value. */ public JobStepActionSource source() { @@ -64,7 +69,7 @@ public JobStepActionSource source() { /** * Set the source property: The source of the action to execute. - * + * * @param source the source value to set. * @return the JobStepAction object itself. */ @@ -75,7 +80,7 @@ public JobStepAction withSource(JobStepActionSource source) { /** * Get the value property: The action value, for example the text of the T-SQL script to execute. - * + * * @return the value value. */ public String value() { @@ -84,7 +89,7 @@ public String value() { /** * Set the value property: The action value, for example the text of the T-SQL script to execute. - * + * * @param value the value value to set. * @return the JobStepAction object itself. */ @@ -95,16 +100,58 @@ public JobStepAction withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model JobStepAction")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model JobStepAction")); } } private static final ClientLogger LOGGER = new ClientLogger(JobStepAction.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepAction if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobStepAction. + */ + public static JobStepAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepAction deserializedJobStepAction = new JobStepAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedJobStepAction.value = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobStepAction.type = JobStepActionType.fromString(reader.getString()); + } else if ("source".equals(fieldName)) { + deserializedJobStepAction.source = JobStepActionSource.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepAction; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java index d4f3cffb84386..40f08e6f07d95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The source of the action to execute. */ +/** + * The source of the action to execute. + */ public final class JobStepActionSource extends ExpandableStringEnum { - /** Static value Inline for JobStepActionSource. */ + /** + * Static value Inline for JobStepActionSource. + */ public static final JobStepActionSource INLINE = fromString("Inline"); + /** + * Creates a new instance of JobStepActionSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobStepActionSource() { + } + /** * Creates or finds a JobStepActionSource from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobStepActionSource. */ - @JsonCreator public static JobStepActionSource fromString(String name) { return fromString(name, JobStepActionSource.class); } /** * Gets known JobStepActionSource values. - * + * * @return known JobStepActionSource values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java index 2941593b9d8d2..0720a73499086 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of action being executed by the job step. */ +/** + * Type of action being executed by the job step. + */ public final class JobStepActionType extends ExpandableStringEnum { - /** Static value TSql for JobStepActionType. */ + /** + * Static value TSql for JobStepActionType. + */ public static final JobStepActionType TSQL = fromString("TSql"); + /** + * Creates a new instance of JobStepActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobStepActionType() { + } + /** * Creates or finds a JobStepActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobStepActionType. */ - @JsonCreator public static JobStepActionType fromString(String name) { return fromString(name, JobStepActionType.class); } /** * Gets known JobStepActionType values. - * + * * @return known JobStepActionType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java index 49a8f16b72e8a..28b443e89140f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java @@ -5,48 +5,51 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The execution options of a job step. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The execution options of a job step. + */ @Fluent -public final class JobStepExecutionOptions { +public final class JobStepExecutionOptions implements JsonSerializable { /* * Execution timeout for the job step. */ - @JsonProperty(value = "timeoutSeconds") private Integer timeoutSeconds; /* * Maximum number of times the job step will be reattempted if the first attempt fails. */ - @JsonProperty(value = "retryAttempts") private Integer retryAttempts; /* * Initial delay between retries for job step execution. */ - @JsonProperty(value = "initialRetryIntervalSeconds") private Integer initialRetryIntervalSeconds; /* * The maximum amount of time to wait between retries for job step execution. */ - @JsonProperty(value = "maximumRetryIntervalSeconds") private Integer maximumRetryIntervalSeconds; /* * The backoff multiplier for the time between retries. */ - @JsonProperty(value = "retryIntervalBackoffMultiplier") private Float retryIntervalBackoffMultiplier; - /** Creates an instance of JobStepExecutionOptions class. */ + /** + * Creates an instance of JobStepExecutionOptions class. + */ public JobStepExecutionOptions() { } /** * Get the timeoutSeconds property: Execution timeout for the job step. - * + * * @return the timeoutSeconds value. */ public Integer timeoutSeconds() { @@ -55,7 +58,7 @@ public Integer timeoutSeconds() { /** * Set the timeoutSeconds property: Execution timeout for the job step. - * + * * @param timeoutSeconds the timeoutSeconds value to set. * @return the JobStepExecutionOptions object itself. */ @@ -67,7 +70,7 @@ public JobStepExecutionOptions withTimeoutSeconds(Integer timeoutSeconds) { /** * Get the retryAttempts property: Maximum number of times the job step will be reattempted if the first attempt * fails. - * + * * @return the retryAttempts value. */ public Integer retryAttempts() { @@ -77,7 +80,7 @@ public Integer retryAttempts() { /** * Set the retryAttempts property: Maximum number of times the job step will be reattempted if the first attempt * fails. - * + * * @param retryAttempts the retryAttempts value to set. * @return the JobStepExecutionOptions object itself. */ @@ -88,7 +91,7 @@ public JobStepExecutionOptions withRetryAttempts(Integer retryAttempts) { /** * Get the initialRetryIntervalSeconds property: Initial delay between retries for job step execution. - * + * * @return the initialRetryIntervalSeconds value. */ public Integer initialRetryIntervalSeconds() { @@ -97,7 +100,7 @@ public Integer initialRetryIntervalSeconds() { /** * Set the initialRetryIntervalSeconds property: Initial delay between retries for job step execution. - * + * * @param initialRetryIntervalSeconds the initialRetryIntervalSeconds value to set. * @return the JobStepExecutionOptions object itself. */ @@ -109,7 +112,7 @@ public JobStepExecutionOptions withInitialRetryIntervalSeconds(Integer initialRe /** * Get the maximumRetryIntervalSeconds property: The maximum amount of time to wait between retries for job step * execution. - * + * * @return the maximumRetryIntervalSeconds value. */ public Integer maximumRetryIntervalSeconds() { @@ -119,7 +122,7 @@ public Integer maximumRetryIntervalSeconds() { /** * Set the maximumRetryIntervalSeconds property: The maximum amount of time to wait between retries for job step * execution. - * + * * @param maximumRetryIntervalSeconds the maximumRetryIntervalSeconds value to set. * @return the JobStepExecutionOptions object itself. */ @@ -130,7 +133,7 @@ public JobStepExecutionOptions withMaximumRetryIntervalSeconds(Integer maximumRe /** * Get the retryIntervalBackoffMultiplier property: The backoff multiplier for the time between retries. - * + * * @return the retryIntervalBackoffMultiplier value. */ public Float retryIntervalBackoffMultiplier() { @@ -139,7 +142,7 @@ public Float retryIntervalBackoffMultiplier() { /** * Set the retryIntervalBackoffMultiplier property: The backoff multiplier for the time between retries. - * + * * @param retryIntervalBackoffMultiplier the retryIntervalBackoffMultiplier value to set. * @return the JobStepExecutionOptions object itself. */ @@ -150,9 +153,60 @@ public JobStepExecutionOptions withRetryIntervalBackoffMultiplier(Float retryInt /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("timeoutSeconds", this.timeoutSeconds); + jsonWriter.writeNumberField("retryAttempts", this.retryAttempts); + jsonWriter.writeNumberField("initialRetryIntervalSeconds", this.initialRetryIntervalSeconds); + jsonWriter.writeNumberField("maximumRetryIntervalSeconds", this.maximumRetryIntervalSeconds); + jsonWriter.writeNumberField("retryIntervalBackoffMultiplier", this.retryIntervalBackoffMultiplier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepExecutionOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepExecutionOptions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobStepExecutionOptions. + */ + public static JobStepExecutionOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepExecutionOptions deserializedJobStepExecutionOptions = new JobStepExecutionOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeoutSeconds".equals(fieldName)) { + deserializedJobStepExecutionOptions.timeoutSeconds = reader.getNullable(JsonReader::getInt); + } else if ("retryAttempts".equals(fieldName)) { + deserializedJobStepExecutionOptions.retryAttempts = reader.getNullable(JsonReader::getInt); + } else if ("initialRetryIntervalSeconds".equals(fieldName)) { + deserializedJobStepExecutionOptions.initialRetryIntervalSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("maximumRetryIntervalSeconds".equals(fieldName)) { + deserializedJobStepExecutionOptions.maximumRetryIntervalSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("retryIntervalBackoffMultiplier".equals(fieldName)) { + deserializedJobStepExecutionOptions.retryIntervalBackoffMultiplier + = reader.getNullable(JsonReader::getFloat); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepExecutionOptions; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java index a7d3f02549ad9..853cefd9cbc1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobStepInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of job steps. */ +/** + * A list of job steps. + */ @Immutable -public final class JobStepListResult { +public final class JobStepListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobStepListResult class. */ + /** + * Creates an instance of JobStepListResult class. + */ public JobStepListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobStepListResult. + */ + public static JobStepListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepListResult deserializedJobStepListResult = new JobStepListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobStepInner.fromJson(reader1)); + deserializedJobStepListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobStepListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java index e717d39bdc3ef..a698a286dbaa2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java @@ -6,67 +6,68 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** The output configuration of a job step. */ +/** + * The output configuration of a job step. + */ @Fluent -public final class JobStepOutput { +public final class JobStepOutput implements JsonSerializable { /* * The output destination type. */ - @JsonProperty(value = "type") private JobStepOutputType type; /* * The output destination subscription id. */ - @JsonProperty(value = "subscriptionId") private UUID subscriptionId; /* * The output destination resource group. */ - @JsonProperty(value = "resourceGroupName") private String resourceGroupName; /* * The output destination server name. */ - @JsonProperty(value = "serverName", required = true) private String serverName; /* * The output destination database. */ - @JsonProperty(value = "databaseName", required = true) private String databaseName; /* * The output destination schema. */ - @JsonProperty(value = "schemaName") private String schemaName; /* * The output destination table. */ - @JsonProperty(value = "tableName", required = true) private String tableName; /* * The resource ID of the credential to use to connect to the output destination. */ - @JsonProperty(value = "credential", required = true) private String credential; - /** Creates an instance of JobStepOutput class. */ + /** + * Creates an instance of JobStepOutput class. + */ public JobStepOutput() { } /** * Get the type property: The output destination type. - * + * * @return the type value. */ public JobStepOutputType type() { @@ -75,7 +76,7 @@ public JobStepOutputType type() { /** * Set the type property: The output destination type. - * + * * @param type the type value to set. * @return the JobStepOutput object itself. */ @@ -86,7 +87,7 @@ public JobStepOutput withType(JobStepOutputType type) { /** * Get the subscriptionId property: The output destination subscription id. - * + * * @return the subscriptionId value. */ public UUID subscriptionId() { @@ -95,7 +96,7 @@ public UUID subscriptionId() { /** * Set the subscriptionId property: The output destination subscription id. - * + * * @param subscriptionId the subscriptionId value to set. * @return the JobStepOutput object itself. */ @@ -106,7 +107,7 @@ public JobStepOutput withSubscriptionId(UUID subscriptionId) { /** * Get the resourceGroupName property: The output destination resource group. - * + * * @return the resourceGroupName value. */ public String resourceGroupName() { @@ -115,7 +116,7 @@ public String resourceGroupName() { /** * Set the resourceGroupName property: The output destination resource group. - * + * * @param resourceGroupName the resourceGroupName value to set. * @return the JobStepOutput object itself. */ @@ -126,7 +127,7 @@ public JobStepOutput withResourceGroupName(String resourceGroupName) { /** * Get the serverName property: The output destination server name. - * + * * @return the serverName value. */ public String serverName() { @@ -135,7 +136,7 @@ public String serverName() { /** * Set the serverName property: The output destination server name. - * + * * @param serverName the serverName value to set. * @return the JobStepOutput object itself. */ @@ -146,7 +147,7 @@ public JobStepOutput withServerName(String serverName) { /** * Get the databaseName property: The output destination database. - * + * * @return the databaseName value. */ public String databaseName() { @@ -155,7 +156,7 @@ public String databaseName() { /** * Set the databaseName property: The output destination database. - * + * * @param databaseName the databaseName value to set. * @return the JobStepOutput object itself. */ @@ -166,7 +167,7 @@ public JobStepOutput withDatabaseName(String databaseName) { /** * Get the schemaName property: The output destination schema. - * + * * @return the schemaName value. */ public String schemaName() { @@ -175,7 +176,7 @@ public String schemaName() { /** * Set the schemaName property: The output destination schema. - * + * * @param schemaName the schemaName value to set. * @return the JobStepOutput object itself. */ @@ -186,7 +187,7 @@ public JobStepOutput withSchemaName(String schemaName) { /** * Get the tableName property: The output destination table. - * + * * @return the tableName value. */ public String tableName() { @@ -195,7 +196,7 @@ public String tableName() { /** * Set the tableName property: The output destination table. - * + * * @param tableName the tableName value to set. * @return the JobStepOutput object itself. */ @@ -206,7 +207,7 @@ public JobStepOutput withTableName(String tableName) { /** * Get the credential property: The resource ID of the credential to use to connect to the output destination. - * + * * @return the credential value. */ public String credential() { @@ -215,7 +216,7 @@ public String credential() { /** * Set the credential property: The resource ID of the credential to use to connect to the output destination. - * + * * @param credential the credential value to set. * @return the JobStepOutput object itself. */ @@ -226,31 +227,86 @@ public JobStepOutput withCredential(String credential) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property serverName in model JobStepOutput")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serverName in model JobStepOutput")); } if (databaseName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property databaseName in model JobStepOutput")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property databaseName in model JobStepOutput")); } if (tableName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tableName in model JobStepOutput")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property tableName in model JobStepOutput")); } if (credential() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property credential in model JobStepOutput")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credential in model JobStepOutput")); } } private static final ClientLogger LOGGER = new ClientLogger(JobStepOutput.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverName", this.serverName); + jsonWriter.writeStringField("databaseName", this.databaseName); + jsonWriter.writeStringField("tableName", this.tableName); + jsonWriter.writeStringField("credential", this.credential); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("subscriptionId", Objects.toString(this.subscriptionId, null)); + jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); + jsonWriter.writeStringField("schemaName", this.schemaName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobStepOutput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobStepOutput if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobStepOutput. + */ + public static JobStepOutput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobStepOutput deserializedJobStepOutput = new JobStepOutput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverName".equals(fieldName)) { + deserializedJobStepOutput.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedJobStepOutput.databaseName = reader.getString(); + } else if ("tableName".equals(fieldName)) { + deserializedJobStepOutput.tableName = reader.getString(); + } else if ("credential".equals(fieldName)) { + deserializedJobStepOutput.credential = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJobStepOutput.type = JobStepOutputType.fromString(reader.getString()); + } else if ("subscriptionId".equals(fieldName)) { + deserializedJobStepOutput.subscriptionId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("resourceGroupName".equals(fieldName)) { + deserializedJobStepOutput.resourceGroupName = reader.getString(); + } else if ("schemaName".equals(fieldName)) { + deserializedJobStepOutput.schemaName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobStepOutput; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java index e8de1d06c7903..27bd84fa01237 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The output destination type. */ +/** + * The output destination type. + */ public final class JobStepOutputType extends ExpandableStringEnum { - /** Static value SqlDatabase for JobStepOutputType. */ + /** + * Static value SqlDatabase for JobStepOutputType. + */ public static final JobStepOutputType SQL_DATABASE = fromString("SqlDatabase"); + /** + * Creates a new instance of JobStepOutputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobStepOutputType() { + } + /** * Creates or finds a JobStepOutputType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobStepOutputType. */ - @JsonCreator public static JobStepOutputType fromString(String name) { return fromString(name, JobStepOutputType.class); } /** * Gets known JobStepOutputType values. - * + * * @return known JobStepOutputType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java index 9b4b9813d045a..5cf249291cf69 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java @@ -6,61 +6,62 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A job target, for example a specific database or a container of databases that is evaluated during job execution. */ +/** + * A job target, for example a specific database or a container of databases that is evaluated during job execution. + */ @Fluent -public final class JobTarget { +public final class JobTarget implements JsonSerializable { /* * Whether the target is included or excluded from the group. */ - @JsonProperty(value = "membershipType") private JobTargetGroupMembershipType membershipType; /* * The target type. */ - @JsonProperty(value = "type", required = true) private JobTargetType type; /* * The target server name. */ - @JsonProperty(value = "serverName") private String serverName; /* * The target database name. */ - @JsonProperty(value = "databaseName") private String databaseName; /* * The target elastic pool name. */ - @JsonProperty(value = "elasticPoolName") private String elasticPoolName; /* * The target shard map. */ - @JsonProperty(value = "shardMapName") private String shardMapName; /* * The resource ID of the credential that is used during job execution to connect to the target and determine the * list of databases inside the target. */ - @JsonProperty(value = "refreshCredential") private String refreshCredential; - /** Creates an instance of JobTarget class. */ + /** + * Creates an instance of JobTarget class. + */ public JobTarget() { } /** * Get the membershipType property: Whether the target is included or excluded from the group. - * + * * @return the membershipType value. */ public JobTargetGroupMembershipType membershipType() { @@ -69,7 +70,7 @@ public JobTargetGroupMembershipType membershipType() { /** * Set the membershipType property: Whether the target is included or excluded from the group. - * + * * @param membershipType the membershipType value to set. * @return the JobTarget object itself. */ @@ -80,7 +81,7 @@ public JobTarget withMembershipType(JobTargetGroupMembershipType membershipType) /** * Get the type property: The target type. - * + * * @return the type value. */ public JobTargetType type() { @@ -89,7 +90,7 @@ public JobTargetType type() { /** * Set the type property: The target type. - * + * * @param type the type value to set. * @return the JobTarget object itself. */ @@ -100,7 +101,7 @@ public JobTarget withType(JobTargetType type) { /** * Get the serverName property: The target server name. - * + * * @return the serverName value. */ public String serverName() { @@ -109,7 +110,7 @@ public String serverName() { /** * Set the serverName property: The target server name. - * + * * @param serverName the serverName value to set. * @return the JobTarget object itself. */ @@ -120,7 +121,7 @@ public JobTarget withServerName(String serverName) { /** * Get the databaseName property: The target database name. - * + * * @return the databaseName value. */ public String databaseName() { @@ -129,7 +130,7 @@ public String databaseName() { /** * Set the databaseName property: The target database name. - * + * * @param databaseName the databaseName value to set. * @return the JobTarget object itself. */ @@ -140,7 +141,7 @@ public JobTarget withDatabaseName(String databaseName) { /** * Get the elasticPoolName property: The target elastic pool name. - * + * * @return the elasticPoolName value. */ public String elasticPoolName() { @@ -149,7 +150,7 @@ public String elasticPoolName() { /** * Set the elasticPoolName property: The target elastic pool name. - * + * * @param elasticPoolName the elasticPoolName value to set. * @return the JobTarget object itself. */ @@ -160,7 +161,7 @@ public JobTarget withElasticPoolName(String elasticPoolName) { /** * Get the shardMapName property: The target shard map. - * + * * @return the shardMapName value. */ public String shardMapName() { @@ -169,7 +170,7 @@ public String shardMapName() { /** * Set the shardMapName property: The target shard map. - * + * * @param shardMapName the shardMapName value to set. * @return the JobTarget object itself. */ @@ -181,7 +182,7 @@ public JobTarget withShardMapName(String shardMapName) { /** * Get the refreshCredential property: The resource ID of the credential that is used during job execution to * connect to the target and determine the list of databases inside the target. - * + * * @return the refreshCredential value. */ public String refreshCredential() { @@ -191,7 +192,7 @@ public String refreshCredential() { /** * Set the refreshCredential property: The resource ID of the credential that is used during job execution to * connect to the target and determine the list of databases inside the target. - * + * * @param refreshCredential the refreshCredential value to set. * @return the JobTarget object itself. */ @@ -202,15 +203,71 @@ public JobTarget withRefreshCredential(String refreshCredential) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property type in model JobTarget")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model JobTarget")); } } private static final ClientLogger LOGGER = new ClientLogger(JobTarget.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("membershipType", + this.membershipType == null ? null : this.membershipType.toString()); + jsonWriter.writeStringField("serverName", this.serverName); + jsonWriter.writeStringField("databaseName", this.databaseName); + jsonWriter.writeStringField("elasticPoolName", this.elasticPoolName); + jsonWriter.writeStringField("shardMapName", this.shardMapName); + jsonWriter.writeStringField("refreshCredential", this.refreshCredential); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobTarget from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobTarget if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JobTarget. + */ + public static JobTarget fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobTarget deserializedJobTarget = new JobTarget(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedJobTarget.type = JobTargetType.fromString(reader.getString()); + } else if ("membershipType".equals(fieldName)) { + deserializedJobTarget.membershipType = JobTargetGroupMembershipType.fromString(reader.getString()); + } else if ("serverName".equals(fieldName)) { + deserializedJobTarget.serverName = reader.getString(); + } else if ("databaseName".equals(fieldName)) { + deserializedJobTarget.databaseName = reader.getString(); + } else if ("elasticPoolName".equals(fieldName)) { + deserializedJobTarget.elasticPoolName = reader.getString(); + } else if ("shardMapName".equals(fieldName)) { + deserializedJobTarget.shardMapName = reader.getString(); + } else if ("refreshCredential".equals(fieldName)) { + deserializedJobTarget.refreshCredential = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobTarget; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java index d30ac3d4142f6..e74d4c1a05be2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of target groups. */ +/** + * A list of target groups. + */ @Immutable -public final class JobTargetGroupListResult { +public final class JobTargetGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobTargetGroupListResult class. */ + /** + * Creates an instance of JobTargetGroupListResult class. + */ public JobTargetGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobTargetGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobTargetGroupListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobTargetGroupListResult. + */ + public static JobTargetGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobTargetGroupListResult deserializedJobTargetGroupListResult = new JobTargetGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> JobTargetGroupInner.fromJson(reader1)); + deserializedJobTargetGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobTargetGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobTargetGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java index 17fff7ab06bed..02ffe3f044797 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Whether the target is included or excluded from the group. */ +/** + * Whether the target is included or excluded from the group. + */ public enum JobTargetGroupMembershipType { - /** Enum value Include. */ + /** + * Enum value Include. + */ INCLUDE("Include"), - /** Enum value Exclude. */ + /** + * Enum value Exclude. + */ EXCLUDE("Exclude"); - /** The actual serialized value for a JobTargetGroupMembershipType instance. */ + /** + * The actual serialized value for a JobTargetGroupMembershipType instance. + */ private final String value; JobTargetGroupMembershipType(String value) { @@ -24,11 +29,10 @@ public enum JobTargetGroupMembershipType { /** * Parses a serialized value to a JobTargetGroupMembershipType instance. - * + * * @param value the serialized value to parse. * @return the parsed JobTargetGroupMembershipType object, or null if unable to parse. */ - @JsonCreator public static JobTargetGroupMembershipType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static JobTargetGroupMembershipType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java index a85f22cea4b2d..e5f480f4e4344 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the target. */ +/** + * The type of the target. + */ public final class JobTargetType extends ExpandableStringEnum { - /** Static value TargetGroup for JobTargetType. */ + /** + * Static value TargetGroup for JobTargetType. + */ public static final JobTargetType TARGET_GROUP = fromString("TargetGroup"); - /** Static value SqlDatabase for JobTargetType. */ + /** + * Static value SqlDatabase for JobTargetType. + */ public static final JobTargetType SQL_DATABASE = fromString("SqlDatabase"); - /** Static value SqlElasticPool for JobTargetType. */ + /** + * Static value SqlElasticPool for JobTargetType. + */ public static final JobTargetType SQL_ELASTIC_POOL = fromString("SqlElasticPool"); - /** Static value SqlShardMap for JobTargetType. */ + /** + * Static value SqlShardMap for JobTargetType. + */ public static final JobTargetType SQL_SHARD_MAP = fromString("SqlShardMap"); - /** Static value SqlServer for JobTargetType. */ + /** + * Static value SqlServer for JobTargetType. + */ public static final JobTargetType SQL_SERVER = fromString("SqlServer"); + /** + * Creates a new instance of JobTargetType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobTargetType() { + } + /** * Creates or finds a JobTargetType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobTargetType. */ - @JsonCreator public static JobTargetType fromString(String name) { return fromString(name, JobTargetType.class); } /** * Gets known JobTargetType values. - * + * * @return known JobTargetType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java index 7131443f40cb4..951a17f99520c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.JobVersionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of job versions. */ +/** + * A list of job versions. + */ @Immutable -public final class JobVersionListResult { +public final class JobVersionListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobVersionListResult class. */ + /** + * Creates an instance of JobVersionListResult class. + */ public JobVersionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobVersionListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the JobVersionListResult. + */ + public static JobVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobVersionListResult deserializedJobVersionListResult = new JobVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> JobVersionInner.fromJson(reader1)); + deserializedJobVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJobVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJobVersionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java index 518b79305b361..3e94383f71a00 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of ledger digest upload settings. */ +/** + * A list of ledger digest upload settings. + */ @Immutable -public final class LedgerDigestUploadsListResult { +public final class LedgerDigestUploadsListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LedgerDigestUploadsListResult class. */ + /** + * Creates an instance of LedgerDigestUploadsListResult class. + */ public LedgerDigestUploadsListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LedgerDigestUploadsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LedgerDigestUploadsListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LedgerDigestUploadsListResult. + */ + public static LedgerDigestUploadsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LedgerDigestUploadsListResult deserializedLedgerDigestUploadsListResult + = new LedgerDigestUploadsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LedgerDigestUploadsInner.fromJson(reader1)); + deserializedLedgerDigestUploadsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLedgerDigestUploadsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLedgerDigestUploadsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java index f96d2ec1c1cfa..37b272f3a81bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LedgerDigestUploadsName. */ +/** + * Defines values for LedgerDigestUploadsName. + */ public final class LedgerDigestUploadsName extends ExpandableStringEnum { - /** Static value current for LedgerDigestUploadsName. */ + /** + * Static value current for LedgerDigestUploadsName. + */ public static final LedgerDigestUploadsName CURRENT = fromString("current"); + /** + * Creates a new instance of LedgerDigestUploadsName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LedgerDigestUploadsName() { + } + /** * Creates or finds a LedgerDigestUploadsName from its string representation. - * + * * @param name a name to look for. * @return the corresponding LedgerDigestUploadsName. */ - @JsonCreator public static LedgerDigestUploadsName fromString(String name) { return fromString(name, LedgerDigestUploadsName.class); } /** * Gets known LedgerDigestUploadsName values. - * + * * @return known LedgerDigestUploadsName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java index c47f5ab9c7055..61f6df5a96493 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Specifies the state of ledger digest upload. */ +/** + * Specifies the state of ledger digest upload. + */ public enum LedgerDigestUploadsState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a LedgerDigestUploadsState instance. */ + /** + * The actual serialized value for a LedgerDigestUploadsState instance. + */ private final String value; LedgerDigestUploadsState(String value) { @@ -24,11 +29,10 @@ public enum LedgerDigestUploadsState { /** * Parses a serialized value to a LedgerDigestUploadsState instance. - * + * * @param value the serialized value to parse. * @return the parsed LedgerDigestUploadsState object, or null if unable to parse. */ - @JsonCreator public static LedgerDigestUploadsState fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static LedgerDigestUploadsState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java index 3ab0afc0a596e..9addb88420050 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The license type capability. */ +/** + * The license type capability. + */ @Fluent -public final class LicenseTypeCapability { +public final class LicenseTypeCapability implements JsonSerializable { /* * License type identifier. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of LicenseTypeCapability class. */ + /** + * Creates an instance of LicenseTypeCapability class. + */ public LicenseTypeCapability() { } /** * Get the name property: License type identifier. - * + * * @return the name value. */ public String name() { @@ -43,7 +48,7 @@ public String name() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -52,7 +57,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -61,7 +66,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the LicenseTypeCapability object itself. */ @@ -72,9 +77,49 @@ public LicenseTypeCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LicenseTypeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LicenseTypeCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LicenseTypeCapability. + */ + public static LicenseTypeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LicenseTypeCapability deserializedLicenseTypeCapability = new LicenseTypeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLicenseTypeCapability.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedLicenseTypeCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedLicenseTypeCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLicenseTypeCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java index fc26f08d81cee..b8c821a32b83d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The log size capability. */ +/** + * The log size capability. + */ @Immutable -public final class LogSizeCapability { +public final class LogSizeCapability implements JsonSerializable { /* * The log size limit (see 'unit' for the units). */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Integer limit; /* * The units that the limit is expressed in. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private LogSizeUnit unit; - /** Creates an instance of LogSizeCapability class. */ + /** + * Creates an instance of LogSizeCapability class. + */ public LogSizeCapability() { } /** * Get the limit property: The log size limit (see 'unit' for the units). - * + * * @return the limit value. */ public Integer limit() { @@ -37,7 +43,7 @@ public Integer limit() { /** * Get the unit property: The units that the limit is expressed in. - * + * * @return the unit value. */ public LogSizeUnit unit() { @@ -46,9 +52,46 @@ public LogSizeUnit unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogSizeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogSizeCapability if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LogSizeCapability. + */ + public static LogSizeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogSizeCapability deserializedLogSizeCapability = new LogSizeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("limit".equals(fieldName)) { + deserializedLogSizeCapability.limit = reader.getNullable(JsonReader::getInt); + } else if ("unit".equals(fieldName)) { + deserializedLogSizeCapability.unit = LogSizeUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLogSizeCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeUnit.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeUnit.java index bd2fa69eb2ec1..cc3fcd0bb6744 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeUnit.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeUnit.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The units that the limit is expressed in. */ +/** + * The units that the limit is expressed in. + */ public final class LogSizeUnit extends ExpandableStringEnum { - /** Static value Megabytes for LogSizeUnit. */ + /** + * Static value Megabytes for LogSizeUnit. + */ public static final LogSizeUnit MEGABYTES = fromString("Megabytes"); - /** Static value Gigabytes for LogSizeUnit. */ + /** + * Static value Gigabytes for LogSizeUnit. + */ public static final LogSizeUnit GIGABYTES = fromString("Gigabytes"); - /** Static value Terabytes for LogSizeUnit. */ + /** + * Static value Terabytes for LogSizeUnit. + */ public static final LogSizeUnit TERABYTES = fromString("Terabytes"); - /** Static value Petabytes for LogSizeUnit. */ + /** + * Static value Petabytes for LogSizeUnit. + */ public static final LogSizeUnit PETABYTES = fromString("Petabytes"); - /** Static value Percent for LogSizeUnit. */ + /** + * Static value Percent for LogSizeUnit. + */ public static final LogSizeUnit PERCENT = fromString("Percent"); + /** + * Creates a new instance of LogSizeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogSizeUnit() { + } + /** * Creates or finds a LogSizeUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding LogSizeUnit. */ - @JsonCreator public static LogSizeUnit fromString(String name) { return fromString(name, LogSizeUnit.class); } /** * Gets known LogSizeUnit values. - * + * * @return known LogSizeUnit values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java index e10ce88865f6f..e4aa4e9f852e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.LogicalDatabaseTransparentDataEncryptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of transparent data encryptions. */ +/** + * A list of transparent data encryptions. + */ @Immutable -public final class LogicalDatabaseTransparentDataEncryptionListResult { +public final class LogicalDatabaseTransparentDataEncryptionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LogicalDatabaseTransparentDataEncryptionListResult class. */ + /** + * Creates an instance of LogicalDatabaseTransparentDataEncryptionListResult class. + */ public LogicalDatabaseTransparentDataEncryptionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogicalDatabaseTransparentDataEncryptionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogicalDatabaseTransparentDataEncryptionListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogicalDatabaseTransparentDataEncryptionListResult. + */ + public static LogicalDatabaseTransparentDataEncryptionListResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + LogicalDatabaseTransparentDataEncryptionListResult deserializedLogicalDatabaseTransparentDataEncryptionListResult + = new LogicalDatabaseTransparentDataEncryptionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LogicalDatabaseTransparentDataEncryptionInner.fromJson(reader1)); + deserializedLogicalDatabaseTransparentDataEncryptionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogicalDatabaseTransparentDataEncryptionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogicalDatabaseTransparentDataEncryptionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java index b3dc465a8f50f..b6d981880570d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerAdvancedThreatProtectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the server's Advanced Threat Protection configurations. */ +/** + * A list of the server's Advanced Threat Protection configurations. + */ @Immutable -public final class LogicalServerAdvancedThreatProtectionListResult { +public final class LogicalServerAdvancedThreatProtectionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LogicalServerAdvancedThreatProtectionListResult class. */ + /** + * Creates an instance of LogicalServerAdvancedThreatProtectionListResult class. + */ public LogicalServerAdvancedThreatProtectionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogicalServerAdvancedThreatProtectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogicalServerAdvancedThreatProtectionListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogicalServerAdvancedThreatProtectionListResult. + */ + public static LogicalServerAdvancedThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogicalServerAdvancedThreatProtectionListResult deserializedLogicalServerAdvancedThreatProtectionListResult + = new LogicalServerAdvancedThreatProtectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerAdvancedThreatProtectionInner.fromJson(reader1)); + deserializedLogicalServerAdvancedThreatProtectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogicalServerAdvancedThreatProtectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogicalServerAdvancedThreatProtectionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java index d8974fefde8d0..88cc4eec73648 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the server's security alert policies. */ +/** + * A list of the server's security alert policies. + */ @Immutable -public final class LogicalServerSecurityAlertPolicyListResult { +public final class LogicalServerSecurityAlertPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LogicalServerSecurityAlertPolicyListResult class. */ + /** + * Creates an instance of LogicalServerSecurityAlertPolicyListResult class. + */ public LogicalServerSecurityAlertPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogicalServerSecurityAlertPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogicalServerSecurityAlertPolicyListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LogicalServerSecurityAlertPolicyListResult. + */ + public static LogicalServerSecurityAlertPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogicalServerSecurityAlertPolicyListResult deserializedLogicalServerSecurityAlertPolicyListResult + = new LogicalServerSecurityAlertPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerSecurityAlertPolicyInner.fromJson(reader1)); + deserializedLogicalServerSecurityAlertPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogicalServerSecurityAlertPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogicalServerSecurityAlertPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java index 096055a911b5e..47d2936b56fe9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of long term retention backups. */ +/** + * A list of long term retention backups. + */ @Immutable -public final class LongTermRetentionBackupListResult { +public final class LongTermRetentionBackupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LongTermRetentionBackupListResult class. */ + /** + * Creates an instance of LongTermRetentionBackupListResult class. + */ public LongTermRetentionBackupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionBackupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionBackupListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LongTermRetentionBackupListResult. + */ + public static LongTermRetentionBackupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionBackupListResult deserializedLongTermRetentionBackupListResult + = new LongTermRetentionBackupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LongTermRetentionBackupInner.fromJson(reader1)); + deserializedLongTermRetentionBackupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLongTermRetentionBackupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionBackupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java index b6a6ba726a53d..bc02c6a4efb78 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of long term retention policies. */ +/** + * A list of long term retention policies. + */ @Immutable -public final class LongTermRetentionPolicyListResult { +public final class LongTermRetentionPolicyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of LongTermRetentionPolicyListResult class. */ + /** + * Creates an instance of LongTermRetentionPolicyListResult class. + */ public LongTermRetentionPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LongTermRetentionPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LongTermRetentionPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LongTermRetentionPolicyListResult. + */ + public static LongTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LongTermRetentionPolicyListResult deserializedLongTermRetentionPolicyListResult + = new LongTermRetentionPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LongTermRetentionPolicyInner.fromJson(reader1)); + deserializedLongTermRetentionPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLongTermRetentionPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLongTermRetentionPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java index 7e2f60a3f5f80..be4236be35f34 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LongTermRetentionPolicyName. */ +/** + * Defines values for LongTermRetentionPolicyName. + */ public final class LongTermRetentionPolicyName extends ExpandableStringEnum { - /** Static value default for LongTermRetentionPolicyName. */ + /** + * Static value default for LongTermRetentionPolicyName. + */ public static final LongTermRetentionPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of LongTermRetentionPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LongTermRetentionPolicyName() { + } + /** * Creates or finds a LongTermRetentionPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding LongTermRetentionPolicyName. */ - @JsonCreator public static LongTermRetentionPolicyName fromString(String name) { return fromString(name, LongTermRetentionPolicyName.class); } /** * Gets known LongTermRetentionPolicyName values. - * + * * @return known LongTermRetentionPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java index 3b229b3227317..7aa109e16bc32 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The maintenance configuration capability. */ +/** + * The maintenance configuration capability. + */ @Fluent -public final class MaintenanceConfigurationCapability { +public final class MaintenanceConfigurationCapability implements JsonSerializable { /* * Maintenance configuration name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Whether or not zone redundancy is supported for the maintenance configuration. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of MaintenanceConfigurationCapability class. */ + /** + * Creates an instance of MaintenanceConfigurationCapability class. + */ public MaintenanceConfigurationCapability() { } /** * Get the name property: Maintenance configuration name. - * + * * @return the name value. */ public String name() { @@ -49,7 +53,7 @@ public String name() { /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the maintenance configuration. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -58,7 +62,7 @@ public Boolean zoneRedundant() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -67,7 +71,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -76,7 +80,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the MaintenanceConfigurationCapability object itself. */ @@ -87,9 +91,54 @@ public MaintenanceConfigurationCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceConfigurationCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceConfigurationCapability if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceConfigurationCapability. + */ + public static MaintenanceConfigurationCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceConfigurationCapability deserializedMaintenanceConfigurationCapability + = new MaintenanceConfigurationCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMaintenanceConfigurationCapability.name = reader.getString(); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedMaintenanceConfigurationCapability.zoneRedundant + = reader.getNullable(JsonReader::getBoolean); + } else if ("status".equals(fieldName)) { + deserializedMaintenanceConfigurationCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedMaintenanceConfigurationCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceConfigurationCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java index 24bbf6be98f5b..cc462b70574f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Maintenance window time range. */ +/** + * Maintenance window time range. + */ @Fluent -public final class MaintenanceWindowTimeRange { +public final class MaintenanceWindowTimeRange implements JsonSerializable { /* * Day of maintenance window. */ - @JsonProperty(value = "dayOfWeek") private DayOfWeek dayOfWeek; /* * Start time minutes offset from 12am. */ - @JsonProperty(value = "startTime") private String startTime; /* * Duration of maintenance window in minutes. */ - @JsonProperty(value = "duration") private String duration; - /** Creates an instance of MaintenanceWindowTimeRange class. */ + /** + * Creates an instance of MaintenanceWindowTimeRange class. + */ public MaintenanceWindowTimeRange() { } /** * Get the dayOfWeek property: Day of maintenance window. - * + * * @return the dayOfWeek value. */ public DayOfWeek dayOfWeek() { @@ -43,7 +48,7 @@ public DayOfWeek dayOfWeek() { /** * Set the dayOfWeek property: Day of maintenance window. - * + * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindowTimeRange object itself. */ @@ -54,7 +59,7 @@ public MaintenanceWindowTimeRange withDayOfWeek(DayOfWeek dayOfWeek) { /** * Get the startTime property: Start time minutes offset from 12am. - * + * * @return the startTime value. */ public String startTime() { @@ -63,7 +68,7 @@ public String startTime() { /** * Set the startTime property: Start time minutes offset from 12am. - * + * * @param startTime the startTime value to set. * @return the MaintenanceWindowTimeRange object itself. */ @@ -74,7 +79,7 @@ public MaintenanceWindowTimeRange withStartTime(String startTime) { /** * Get the duration property: Duration of maintenance window in minutes. - * + * * @return the duration value. */ public String duration() { @@ -83,7 +88,7 @@ public String duration() { /** * Set the duration property: Duration of maintenance window in minutes. - * + * * @param duration the duration value to set. * @return the MaintenanceWindowTimeRange object itself. */ @@ -94,9 +99,51 @@ public MaintenanceWindowTimeRange withDuration(String duration) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dayOfWeek", this.dayOfWeek == null ? null : this.dayOfWeek.toString()); + jsonWriter.writeStringField("startTime", this.startTime); + jsonWriter.writeStringField("duration", this.duration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowTimeRange from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowTimeRange if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceWindowTimeRange. + */ + public static MaintenanceWindowTimeRange fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowTimeRange deserializedMaintenanceWindowTimeRange = new MaintenanceWindowTimeRange(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dayOfWeek".equals(fieldName)) { + deserializedMaintenanceWindowTimeRange.dayOfWeek = DayOfWeek.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedMaintenanceWindowTimeRange.startTime = reader.getString(); + } else if ("duration".equals(fieldName)) { + deserializedMaintenanceWindowTimeRange.duration = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowTimeRange; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java index edb5ab79e97f1..35b8b5f3c400e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of short term retention policies. */ +/** + * A list of short term retention policies. + */ @Immutable -public final class ManagedBackupShortTermRetentionPolicyListResult { +public final class ManagedBackupShortTermRetentionPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedBackupShortTermRetentionPolicyListResult class. */ + /** + * Creates an instance of ManagedBackupShortTermRetentionPolicyListResult class. + */ public ManagedBackupShortTermRetentionPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedBackupShortTermRetentionPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedBackupShortTermRetentionPolicyListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedBackupShortTermRetentionPolicyListResult. + */ + public static ManagedBackupShortTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedBackupShortTermRetentionPolicyListResult deserializedManagedBackupShortTermRetentionPolicyListResult + = new ManagedBackupShortTermRetentionPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedBackupShortTermRetentionPolicyInner.fromJson(reader1)); + deserializedManagedBackupShortTermRetentionPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedBackupShortTermRetentionPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedBackupShortTermRetentionPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java index 258210c8990f1..7432f3a204888 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -18,36 +17,54 @@ * (longTermRetentionBackupResourceId required). */ public final class ManagedDatabaseCreateMode extends ExpandableStringEnum { - /** Static value Default for ManagedDatabaseCreateMode. */ + /** + * Static value Default for ManagedDatabaseCreateMode. + */ public static final ManagedDatabaseCreateMode DEFAULT = fromString("Default"); - /** Static value RestoreExternalBackup for ManagedDatabaseCreateMode. */ + /** + * Static value RestoreExternalBackup for ManagedDatabaseCreateMode. + */ public static final ManagedDatabaseCreateMode RESTORE_EXTERNAL_BACKUP = fromString("RestoreExternalBackup"); - /** Static value PointInTimeRestore for ManagedDatabaseCreateMode. */ + /** + * Static value PointInTimeRestore for ManagedDatabaseCreateMode. + */ public static final ManagedDatabaseCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); - /** Static value Recovery for ManagedDatabaseCreateMode. */ + /** + * Static value Recovery for ManagedDatabaseCreateMode. + */ public static final ManagedDatabaseCreateMode RECOVERY = fromString("Recovery"); - /** Static value RestoreLongTermRetentionBackup for ManagedDatabaseCreateMode. */ - public static final ManagedDatabaseCreateMode RESTORE_LONG_TERM_RETENTION_BACKUP = - fromString("RestoreLongTermRetentionBackup"); + /** + * Static value RestoreLongTermRetentionBackup for ManagedDatabaseCreateMode. + */ + public static final ManagedDatabaseCreateMode RESTORE_LONG_TERM_RETENTION_BACKUP + = fromString("RestoreLongTermRetentionBackup"); + + /** + * Creates a new instance of ManagedDatabaseCreateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedDatabaseCreateMode() { + } /** * Creates or finds a ManagedDatabaseCreateMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedDatabaseCreateMode. */ - @JsonCreator public static ManagedDatabaseCreateMode fromString(String name) { return fromString(name, ManagedDatabaseCreateMode.class); } /** * Gets known ManagedDatabaseCreateMode values. - * + * * @return known ManagedDatabaseCreateMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java index 49524ee6be801..9fec223b2ccc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed databases. */ +/** + * A list of managed databases. + */ @Immutable -public final class ManagedDatabaseListResult { +public final class ManagedDatabaseListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedDatabaseListResult class. */ + /** + * Creates an instance of ManagedDatabaseListResult class. + */ public ManagedDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedDatabaseListResult. + */ + public static ManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseListResult deserializedManagedDatabaseListResult = new ManagedDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedDatabaseInner.fromJson(reader1)); + deserializedManagedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java index 7f439b393f004..556db21e58e46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java @@ -6,24 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform a managed database move. */ +/** + * Contains the information necessary to perform a managed database move. + */ @Fluent -public final class ManagedDatabaseMoveDefinition { +public final class ManagedDatabaseMoveDefinition implements JsonSerializable { /* * The destination managed database ID */ - @JsonProperty(value = "destinationManagedDatabaseId", required = true) private String destinationManagedDatabaseId; - /** Creates an instance of ManagedDatabaseMoveDefinition class. */ + /** + * Creates an instance of ManagedDatabaseMoveDefinition class. + */ public ManagedDatabaseMoveDefinition() { } /** * Get the destinationManagedDatabaseId property: The destination managed database ID. - * + * * @return the destinationManagedDatabaseId value. */ public String destinationManagedDatabaseId() { @@ -32,7 +39,7 @@ public String destinationManagedDatabaseId() { /** * Set the destinationManagedDatabaseId property: The destination managed database ID. - * + * * @param destinationManagedDatabaseId the destinationManagedDatabaseId value to set. * @return the ManagedDatabaseMoveDefinition object itself. */ @@ -43,18 +50,54 @@ public ManagedDatabaseMoveDefinition withDestinationManagedDatabaseId(String des /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (destinationManagedDatabaseId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationManagedDatabaseId in model" - + " ManagedDatabaseMoveDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property destinationManagedDatabaseId in model ManagedDatabaseMoveDefinition")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedDatabaseMoveDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("destinationManagedDatabaseId", this.destinationManagedDatabaseId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseMoveDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseMoveDefinition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedDatabaseMoveDefinition. + */ + public static ManagedDatabaseMoveDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseMoveDefinition deserializedManagedDatabaseMoveDefinition + = new ManagedDatabaseMoveDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destinationManagedDatabaseId".equals(fieldName)) { + deserializedManagedDatabaseMoveDefinition.destinationManagedDatabaseId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseMoveDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java index 45e471f91bcc5..da285c2511787 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseSecurityAlertPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the managed database's security alert policies. */ +/** + * A list of the managed database's security alert policies. + */ @Immutable -public final class ManagedDatabaseSecurityAlertPolicyListResult { +public final class ManagedDatabaseSecurityAlertPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedDatabaseSecurityAlertPolicyListResult class. */ + /** + * Creates an instance of ManagedDatabaseSecurityAlertPolicyListResult class. + */ public ManagedDatabaseSecurityAlertPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseSecurityAlertPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseSecurityAlertPolicyListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedDatabaseSecurityAlertPolicyListResult. + */ + public static ManagedDatabaseSecurityAlertPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseSecurityAlertPolicyListResult deserializedManagedDatabaseSecurityAlertPolicyListResult + = new ManagedDatabaseSecurityAlertPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedDatabaseSecurityAlertPolicyInner.fromJson(reader1)); + deserializedManagedDatabaseSecurityAlertPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedDatabaseSecurityAlertPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseSecurityAlertPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java index fb4d7b754d3db..cf24be2fd91a3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java @@ -6,30 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to start a managed database move. */ +/** + * Contains the information necessary to start a managed database move. + */ @Fluent -public final class ManagedDatabaseStartMoveDefinition { +public final class ManagedDatabaseStartMoveDefinition implements JsonSerializable { /* * The destination managed database ID */ - @JsonProperty(value = "destinationManagedDatabaseId", required = true) private String destinationManagedDatabaseId; /* * The move operation mode. */ - @JsonProperty(value = "operationMode") private MoveOperationMode operationMode; - /** Creates an instance of ManagedDatabaseStartMoveDefinition class. */ + /** + * Creates an instance of ManagedDatabaseStartMoveDefinition class. + */ public ManagedDatabaseStartMoveDefinition() { } /** * Get the destinationManagedDatabaseId property: The destination managed database ID. - * + * * @return the destinationManagedDatabaseId value. */ public String destinationManagedDatabaseId() { @@ -38,7 +44,7 @@ public String destinationManagedDatabaseId() { /** * Set the destinationManagedDatabaseId property: The destination managed database ID. - * + * * @param destinationManagedDatabaseId the destinationManagedDatabaseId value to set. * @return the ManagedDatabaseStartMoveDefinition object itself. */ @@ -49,7 +55,7 @@ public ManagedDatabaseStartMoveDefinition withDestinationManagedDatabaseId(Strin /** * Get the operationMode property: The move operation mode. - * + * * @return the operationMode value. */ public MoveOperationMode operationMode() { @@ -58,7 +64,7 @@ public MoveOperationMode operationMode() { /** * Set the operationMode property: The move operation mode. - * + * * @param operationMode the operationMode value to set. * @return the ManagedDatabaseStartMoveDefinition object itself. */ @@ -69,18 +75,58 @@ public ManagedDatabaseStartMoveDefinition withOperationMode(MoveOperationMode op /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (destinationManagedDatabaseId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationManagedDatabaseId in model" - + " ManagedDatabaseStartMoveDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property destinationManagedDatabaseId in model ManagedDatabaseStartMoveDefinition")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedDatabaseStartMoveDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("destinationManagedDatabaseId", this.destinationManagedDatabaseId); + jsonWriter.writeStringField("operationMode", this.operationMode == null ? null : this.operationMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseStartMoveDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseStartMoveDefinition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedDatabaseStartMoveDefinition. + */ + public static ManagedDatabaseStartMoveDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseStartMoveDefinition deserializedManagedDatabaseStartMoveDefinition + = new ManagedDatabaseStartMoveDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destinationManagedDatabaseId".equals(fieldName)) { + deserializedManagedDatabaseStartMoveDefinition.destinationManagedDatabaseId = reader.getString(); + } else if ("operationMode".equals(fieldName)) { + deserializedManagedDatabaseStartMoveDefinition.operationMode + = MoveOperationMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseStartMoveDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java index 5b6156ff8c223..11d96725a6ffe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java @@ -5,46 +5,69 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Status of the database. */ +/** + * Status of the database. + */ public final class ManagedDatabaseStatus extends ExpandableStringEnum { - /** Static value Online for ManagedDatabaseStatus. */ + /** + * Static value Online for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus ONLINE = fromString("Online"); - /** Static value Offline for ManagedDatabaseStatus. */ + /** + * Static value Offline for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus OFFLINE = fromString("Offline"); - /** Static value Shutdown for ManagedDatabaseStatus. */ + /** + * Static value Shutdown for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus SHUTDOWN = fromString("Shutdown"); - /** Static value Creating for ManagedDatabaseStatus. */ + /** + * Static value Creating for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus CREATING = fromString("Creating"); - /** Static value Inaccessible for ManagedDatabaseStatus. */ + /** + * Static value Inaccessible for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus INACCESSIBLE = fromString("Inaccessible"); - /** Static value Restoring for ManagedDatabaseStatus. */ + /** + * Static value Restoring for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus RESTORING = fromString("Restoring"); - /** Static value Updating for ManagedDatabaseStatus. */ + /** + * Static value Updating for ManagedDatabaseStatus. + */ public static final ManagedDatabaseStatus UPDATING = fromString("Updating"); + /** + * Creates a new instance of ManagedDatabaseStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedDatabaseStatus() { + } + /** * Creates or finds a ManagedDatabaseStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedDatabaseStatus. */ - @JsonCreator public static ManagedDatabaseStatus fromString(String name) { return fromString(name, ManagedDatabaseStatus.class); } /** * Gets known ManagedDatabaseStatus values. - * + * * @return known ManagedDatabaseStatus values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java index 4ee7f4376f50a..9334e19673c08 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java @@ -5,35 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; -/** An managed database update. */ +/** + * An managed database update. + */ @Fluent -public final class ManagedDatabaseUpdate { +public final class ManagedDatabaseUpdate implements JsonSerializable { /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedDatabaseProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ManagedDatabaseUpdate class. */ + /** + * Creates an instance of ManagedDatabaseUpdate class. + */ public ManagedDatabaseUpdate() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedDatabaseProperties innerProperties() { @@ -42,7 +46,7 @@ private ManagedDatabaseProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -51,7 +55,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -62,7 +66,7 @@ public ManagedDatabaseUpdate withTags(Map tags) { /** * Get the collation property: Collation of the managed database. - * + * * @return the collation value. */ public String collation() { @@ -71,7 +75,7 @@ public String collation() { /** * Set the collation property: Collation of the managed database. - * + * * @param collation the collation value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -85,7 +89,7 @@ public ManagedDatabaseUpdate withCollation(String collation) { /** * Get the status property: Status of the database. - * + * * @return the status value. */ public ManagedDatabaseStatus status() { @@ -94,7 +98,7 @@ public ManagedDatabaseStatus status() { /** * Get the creationDate property: Creation date of the database. - * + * * @return the creationDate value. */ public OffsetDateTime creationDate() { @@ -103,7 +107,7 @@ public OffsetDateTime creationDate() { /** * Get the earliestRestorePoint property: Earliest restore point in time for point in time restore. - * + * * @return the earliestRestorePoint value. */ public OffsetDateTime earliestRestorePoint() { @@ -114,7 +118,7 @@ public OffsetDateTime earliestRestorePoint() { * Get the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -125,7 +129,7 @@ public OffsetDateTime restorePointInTime() { * Set the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. * Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new * database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -139,7 +143,7 @@ public ManagedDatabaseUpdate withRestorePointInTime(OffsetDateTime restorePointI /** * Get the defaultSecondaryLocation property: Geo paired region. - * + * * @return the defaultSecondaryLocation value. */ public String defaultSecondaryLocation() { @@ -148,7 +152,7 @@ public String defaultSecondaryLocation() { /** * Get the catalogCollation property: Collation of the metadata catalog. - * + * * @return the catalogCollation value. */ public CatalogCollationType catalogCollation() { @@ -157,7 +161,7 @@ public CatalogCollationType catalogCollation() { /** * Set the catalogCollation property: Collation of the metadata catalog. - * + * * @param catalogCollation the catalogCollation value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -177,7 +181,7 @@ public ManagedDatabaseUpdate withCatalogCollation(CatalogCollationType catalogCo * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @return the createMode value. */ public ManagedDatabaseCreateMode createMode() { @@ -192,7 +196,7 @@ public ManagedDatabaseCreateMode createMode() { * geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to * restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup * (longTermRetentionBackupResourceId required). - * + * * @param createMode the createMode value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -207,7 +211,7 @@ public ManagedDatabaseUpdate withCreateMode(ManagedDatabaseCreateMode createMode /** * Get the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @return the storageContainerUri value. */ public String storageContainerUri() { @@ -217,7 +221,7 @@ public String storageContainerUri() { /** * Set the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the uri of the storage container where backups for this restore are stored. - * + * * @param storageContainerUri the storageContainerUri value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -232,7 +236,7 @@ public ManagedDatabaseUpdate withStorageContainerUri(String storageContainerUri) /** * Get the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { @@ -242,7 +246,7 @@ public String sourceDatabaseId() { /** * Set the sourceDatabaseId property: The resource identifier of the source database associated with create * operation of this database. - * + * * @param sourceDatabaseId the sourceDatabaseId value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -257,7 +261,7 @@ public ManagedDatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) { /** * Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @return the restorableDroppedDatabaseId value. */ public String restorableDroppedDatabaseId() { @@ -267,7 +271,7 @@ public String restorableDroppedDatabaseId() { /** * Set the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. - * + * * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -282,7 +286,7 @@ public ManagedDatabaseUpdate withRestorableDroppedDatabaseId(String restorableDr /** * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @return the storageContainerSasToken value. */ public String storageContainerSasToken() { @@ -292,7 +296,7 @@ public String storageContainerSasToken() { /** * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is * required. Specifies the storage container sas token. - * + * * @param storageContainerSasToken the storageContainerSasToken value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -307,7 +311,7 @@ public ManagedDatabaseUpdate withStorageContainerSasToken(String storageContaine /** * Get the failoverGroupId property: Instance Failover Group resource identifier that this managed database belongs * to. - * + * * @return the failoverGroupId value. */ public String failoverGroupId() { @@ -317,7 +321,7 @@ public String failoverGroupId() { /** * Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { @@ -327,7 +331,7 @@ public String recoverableDatabaseId() { /** * Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with * create operation of this database. - * + * * @param recoverableDatabaseId the recoverableDatabaseId value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -342,7 +346,7 @@ public ManagedDatabaseUpdate withRecoverableDatabaseId(String recoverableDatabas /** * Get the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @return the longTermRetentionBackupResourceId value. */ public String longTermRetentionBackupResourceId() { @@ -352,7 +356,7 @@ public String longTermRetentionBackupResourceId() { /** * Set the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for * restore of this managed database. - * + * * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -366,7 +370,7 @@ public ManagedDatabaseUpdate withLongTermRetentionBackupResourceId(String longTe /** * Get the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @return the autoCompleteRestore value. */ public Boolean autoCompleteRestore() { @@ -375,7 +379,7 @@ public Boolean autoCompleteRestore() { /** * Set the autoCompleteRestore property: Whether to auto complete restore of this managed database. - * + * * @param autoCompleteRestore the autoCompleteRestore value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -389,7 +393,7 @@ public ManagedDatabaseUpdate withAutoCompleteRestore(Boolean autoCompleteRestore /** * Get the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @return the lastBackupName value. */ public String lastBackupName() { @@ -398,7 +402,7 @@ public String lastBackupName() { /** * Set the lastBackupName property: Last backup file name for restore of this managed database. - * + * * @param lastBackupName the lastBackupName value to set. * @return the ManagedDatabaseUpdate object itself. */ @@ -412,7 +416,7 @@ public ManagedDatabaseUpdate withLastBackupName(String lastBackupName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -420,4 +424,44 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedDatabaseUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedDatabaseUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedDatabaseUpdate. + */ + public static ManagedDatabaseUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedDatabaseUpdate deserializedManagedDatabaseUpdate = new ManagedDatabaseUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedManagedDatabaseUpdate.innerProperties = ManagedDatabaseProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedDatabaseUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedDatabaseUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java index 9bb5d061566b0..ce39629d4d2b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed instance administrators. */ +/** + * A list of managed instance administrators. + */ @Immutable -public final class ManagedInstanceAdministratorListResult { +public final class ManagedInstanceAdministratorListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceAdministratorListResult class. */ + /** + * Creates an instance of ManagedInstanceAdministratorListResult class. + */ public ManagedInstanceAdministratorListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAdministratorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAdministratorListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceAdministratorListResult. + */ + public static ManagedInstanceAdministratorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAdministratorListResult deserializedManagedInstanceAdministratorListResult + = new ManagedInstanceAdministratorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceAdministratorInner.fromJson(reader1)); + deserializedManagedInstanceAdministratorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceAdministratorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAdministratorListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java index d3fd36b5dd589..b8dd46e91ecc8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of the managed instance administrator. */ +/** + * Type of the managed instance administrator. + */ public final class ManagedInstanceAdministratorType extends ExpandableStringEnum { - /** Static value ActiveDirectory for ManagedInstanceAdministratorType. */ + /** + * Static value ActiveDirectory for ManagedInstanceAdministratorType. + */ public static final ManagedInstanceAdministratorType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + /** + * Creates a new instance of ManagedInstanceAdministratorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstanceAdministratorType() { + } + /** * Creates or finds a ManagedInstanceAdministratorType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedInstanceAdministratorType. */ - @JsonCreator public static ManagedInstanceAdministratorType fromString(String name) { return fromString(name, ManagedInstanceAdministratorType.class); } /** * Gets known ManagedInstanceAdministratorType values. - * + * * @return known ManagedInstanceAdministratorType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java index 1a0d09eb24371..1cb1ec687a19e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthenticationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of active directory only authentications. */ +/** + * A list of active directory only authentications. + */ @Immutable -public final class ManagedInstanceAzureADOnlyAuthListResult { +public final class ManagedInstanceAzureADOnlyAuthListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceAzureADOnlyAuthListResult class. */ + /** + * Creates an instance of ManagedInstanceAzureADOnlyAuthListResult class. + */ public ManagedInstanceAzureADOnlyAuthListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceAzureADOnlyAuthListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceAzureADOnlyAuthListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceAzureADOnlyAuthListResult. + */ + public static ManagedInstanceAzureADOnlyAuthListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceAzureADOnlyAuthListResult deserializedManagedInstanceAzureADOnlyAuthListResult + = new ManagedInstanceAzureADOnlyAuthListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceAzureADOnlyAuthenticationInner.fromJson(reader1)); + deserializedManagedInstanceAzureADOnlyAuthListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceAzureADOnlyAuthListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceAzureADOnlyAuthListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java index 5fe2d0c9f8bea..0434ad6d3f620 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java @@ -5,55 +5,57 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The managed server capability. */ +/** + * The managed server capability. + */ @Fluent -public final class ManagedInstanceEditionCapability { +public final class ManagedInstanceEditionCapability implements JsonSerializable { /* * The managed server version name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The supported families. */ - @JsonProperty(value = "supportedFamilies", access = JsonProperty.Access.WRITE_ONLY) private List supportedFamilies; /* * The list of supported storage capabilities for this edition */ - @JsonProperty(value = "supportedStorageCapabilities", access = JsonProperty.Access.WRITE_ONLY) private List supportedStorageCapabilities; /* * Whether or not zone redundancy is supported for the edition. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ManagedInstanceEditionCapability class. */ + /** + * Creates an instance of ManagedInstanceEditionCapability class. + */ public ManagedInstanceEditionCapability() { } /** * Get the name property: The managed server version name. - * + * * @return the name value. */ public String name() { @@ -62,7 +64,7 @@ public String name() { /** * Get the supportedFamilies property: The supported families. - * + * * @return the supportedFamilies value. */ public List supportedFamilies() { @@ -71,7 +73,7 @@ public List supportedFamilies() { /** * Get the supportedStorageCapabilities property: The list of supported storage capabilities for this edition. - * + * * @return the supportedStorageCapabilities value. */ public List supportedStorageCapabilities() { @@ -80,7 +82,7 @@ public List supportedStorageCapabilities() { /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the edition. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -89,7 +91,7 @@ public Boolean zoneRedundant() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -98,7 +100,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -107,7 +109,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ManagedInstanceEditionCapability object itself. */ @@ -118,7 +120,7 @@ public ManagedInstanceEditionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -129,4 +131,58 @@ public void validate() { supportedStorageCapabilities().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceEditionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceEditionCapability if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceEditionCapability. + */ + public static ManagedInstanceEditionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceEditionCapability deserializedManagedInstanceEditionCapability + = new ManagedInstanceEditionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedInstanceEditionCapability.name = reader.getString(); + } else if ("supportedFamilies".equals(fieldName)) { + List supportedFamilies + = reader.readArray(reader1 -> ManagedInstanceFamilyCapability.fromJson(reader1)); + deserializedManagedInstanceEditionCapability.supportedFamilies = supportedFamilies; + } else if ("supportedStorageCapabilities".equals(fieldName)) { + List supportedStorageCapabilities + = reader.readArray(reader1 -> StorageCapability.fromJson(reader1)); + deserializedManagedInstanceEditionCapability.supportedStorageCapabilities + = supportedStorageCapabilities; + } else if ("zoneRedundant".equals(fieldName)) { + deserializedManagedInstanceEditionCapability.zoneRedundant + = reader.getNullable(JsonReader::getBoolean); + } else if ("status".equals(fieldName)) { + deserializedManagedInstanceEditionCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedManagedInstanceEditionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceEditionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java index a73a5e6e083f0..38c2abbf5741c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed instance encryption protectors. */ +/** + * A list of managed instance encryption protectors. + */ @Immutable -public final class ManagedInstanceEncryptionProtectorListResult { +public final class ManagedInstanceEncryptionProtectorListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceEncryptionProtectorListResult class. */ + /** + * Creates an instance of ManagedInstanceEncryptionProtectorListResult class. + */ public ManagedInstanceEncryptionProtectorListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceEncryptionProtectorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceEncryptionProtectorListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceEncryptionProtectorListResult. + */ + public static ManagedInstanceEncryptionProtectorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceEncryptionProtectorListResult deserializedManagedInstanceEncryptionProtectorListResult + = new ManagedInstanceEncryptionProtectorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceEncryptionProtectorInner.fromJson(reader1)); + deserializedManagedInstanceEncryptionProtectorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceEncryptionProtectorListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java index 2da9e851cbc6a..3d799ed7cf5f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java @@ -5,55 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** Properties of a active directory administrator. */ +/** + * Properties of a active directory administrator. + */ @Fluent -public final class ManagedInstanceExternalAdministrator { +public final class ManagedInstanceExternalAdministrator + implements JsonSerializable { /* * Type of the sever administrator. */ - @JsonProperty(value = "administratorType") private AdministratorType administratorType; /* * Principal Type of the sever administrator. */ - @JsonProperty(value = "principalType") private PrincipalType principalType; /* * Login name of the server administrator. */ - @JsonProperty(value = "login") private String login; /* * SID (object ID) of the server administrator. */ - @JsonProperty(value = "sid") private UUID sid; /* * Tenant ID of the administrator. */ - @JsonProperty(value = "tenantId") private UUID tenantId; /* * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "azureADOnlyAuthentication") private Boolean azureADOnlyAuthentication; - /** Creates an instance of ManagedInstanceExternalAdministrator class. */ + /** + * Creates an instance of ManagedInstanceExternalAdministrator class. + */ public ManagedInstanceExternalAdministrator() { } /** * Get the administratorType property: Type of the sever administrator. - * + * * @return the administratorType value. */ public AdministratorType administratorType() { @@ -62,7 +66,7 @@ public AdministratorType administratorType() { /** * Set the administratorType property: Type of the sever administrator. - * + * * @param administratorType the administratorType value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -73,7 +77,7 @@ public ManagedInstanceExternalAdministrator withAdministratorType(AdministratorT /** * Get the principalType property: Principal Type of the sever administrator. - * + * * @return the principalType value. */ public PrincipalType principalType() { @@ -82,7 +86,7 @@ public PrincipalType principalType() { /** * Set the principalType property: Principal Type of the sever administrator. - * + * * @param principalType the principalType value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -93,7 +97,7 @@ public ManagedInstanceExternalAdministrator withPrincipalType(PrincipalType prin /** * Get the login property: Login name of the server administrator. - * + * * @return the login value. */ public String login() { @@ -102,7 +106,7 @@ public String login() { /** * Set the login property: Login name of the server administrator. - * + * * @param login the login value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -113,7 +117,7 @@ public ManagedInstanceExternalAdministrator withLogin(String login) { /** * Get the sid property: SID (object ID) of the server administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -122,7 +126,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the server administrator. - * + * * @param sid the sid value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -133,7 +137,7 @@ public ManagedInstanceExternalAdministrator withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -142,7 +146,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the administrator. - * + * * @param tenantId the tenantId value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -153,7 +157,7 @@ public ManagedInstanceExternalAdministrator withTenantId(UUID tenantId) { /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -162,7 +166,7 @@ public Boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the ManagedInstanceExternalAdministrator object itself. */ @@ -173,9 +177,67 @@ public ManagedInstanceExternalAdministrator withAzureADOnlyAuthentication(Boolea /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("administratorType", + this.administratorType == null ? null : this.administratorType.toString()); + jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); + jsonWriter.writeStringField("login", this.login); + jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + jsonWriter.writeBooleanField("azureADOnlyAuthentication", this.azureADOnlyAuthentication); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceExternalAdministrator from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceExternalAdministrator if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceExternalAdministrator. + */ + public static ManagedInstanceExternalAdministrator fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceExternalAdministrator deserializedManagedInstanceExternalAdministrator + = new ManagedInstanceExternalAdministrator(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administratorType".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.administratorType + = AdministratorType.fromString(reader.getString()); + } else if ("principalType".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.principalType + = PrincipalType.fromString(reader.getString()); + } else if ("login".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.login = reader.getString(); + } else if ("sid".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.sid + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("azureADOnlyAuthentication".equals(fieldName)) { + deserializedManagedInstanceExternalAdministrator.azureADOnlyAuthentication + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceExternalAdministrator; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java index 39122859b1c41..5f3748ef668e4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java @@ -5,55 +5,57 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The managed server family capability. */ +/** + * The managed server family capability. + */ @Fluent -public final class ManagedInstanceFamilyCapability { +public final class ManagedInstanceFamilyCapability implements JsonSerializable { /* * Family name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * SKU name. */ - @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) private String sku; /* * List of supported license types. */ - @JsonProperty(value = "supportedLicenseTypes", access = JsonProperty.Access.WRITE_ONLY) private List supportedLicenseTypes; /* * List of supported virtual cores values. */ - @JsonProperty(value = "supportedVcoresValues", access = JsonProperty.Access.WRITE_ONLY) private List supportedVcoresValues; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ManagedInstanceFamilyCapability class. */ + /** + * Creates an instance of ManagedInstanceFamilyCapability class. + */ public ManagedInstanceFamilyCapability() { } /** * Get the name property: Family name. - * + * * @return the name value. */ public String name() { @@ -62,7 +64,7 @@ public String name() { /** * Get the sku property: SKU name. - * + * * @return the sku value. */ public String sku() { @@ -71,7 +73,7 @@ public String sku() { /** * Get the supportedLicenseTypes property: List of supported license types. - * + * * @return the supportedLicenseTypes value. */ public List supportedLicenseTypes() { @@ -80,7 +82,7 @@ public List supportedLicenseTypes() { /** * Get the supportedVcoresValues property: List of supported virtual cores values. - * + * * @return the supportedVcoresValues value. */ public List supportedVcoresValues() { @@ -89,7 +91,7 @@ public List supportedVcoresValues() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -98,7 +100,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -107,7 +109,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ManagedInstanceFamilyCapability object itself. */ @@ -118,7 +120,7 @@ public ManagedInstanceFamilyCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -129,4 +131,56 @@ public void validate() { supportedVcoresValues().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceFamilyCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceFamilyCapability if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceFamilyCapability. + */ + public static ManagedInstanceFamilyCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceFamilyCapability deserializedManagedInstanceFamilyCapability + = new ManagedInstanceFamilyCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedInstanceFamilyCapability.name = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedManagedInstanceFamilyCapability.sku = reader.getString(); + } else if ("supportedLicenseTypes".equals(fieldName)) { + List supportedLicenseTypes + = reader.readArray(reader1 -> LicenseTypeCapability.fromJson(reader1)); + deserializedManagedInstanceFamilyCapability.supportedLicenseTypes = supportedLicenseTypes; + } else if ("supportedVcoresValues".equals(fieldName)) { + List supportedVcoresValues + = reader.readArray(reader1 -> ManagedInstanceVcoresCapability.fromJson(reader1)); + deserializedManagedInstanceFamilyCapability.supportedVcoresValues = supportedVcoresValues; + } else if ("status".equals(fieldName)) { + deserializedManagedInstanceFamilyCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedManagedInstanceFamilyCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceFamilyCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java index d8639ea7d7793..61e85914cdd42 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed instance keys. */ +/** + * A list of managed instance keys. + */ @Immutable -public final class ManagedInstanceKeyListResult { +public final class ManagedInstanceKeyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceKeyListResult class. */ + /** + * Creates an instance of ManagedInstanceKeyListResult class. + */ public ManagedInstanceKeyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceKeyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceKeyListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceKeyListResult. + */ + public static ManagedInstanceKeyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceKeyListResult deserializedManagedInstanceKeyListResult = new ManagedInstanceKeyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceKeyInner.fromJson(reader1)); + deserializedManagedInstanceKeyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceKeyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceKeyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java index 15818adc90111..7b7b43b671008 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ public final class ManagedInstanceLicenseType extends ExpandableStringEnum { - /** Static value LicenseIncluded for ManagedInstanceLicenseType. */ + /** + * Static value LicenseIncluded for ManagedInstanceLicenseType. + */ public static final ManagedInstanceLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); - /** Static value BasePrice for ManagedInstanceLicenseType. */ + /** + * Static value BasePrice for ManagedInstanceLicenseType. + */ public static final ManagedInstanceLicenseType BASE_PRICE = fromString("BasePrice"); + /** + * Creates a new instance of ManagedInstanceLicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstanceLicenseType() { + } + /** * Creates or finds a ManagedInstanceLicenseType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedInstanceLicenseType. */ - @JsonCreator public static ManagedInstanceLicenseType fromString(String name) { return fromString(name, ManagedInstanceLicenseType.class); } /** * Gets known ManagedInstanceLicenseType values. - * + * * @return known ManagedInstanceLicenseType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java index 190166f9ee79b..6ce1c3f912a57 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed instances. */ +/** + * A list of managed instances. + */ @Immutable -public final class ManagedInstanceListResult { +public final class ManagedInstanceListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceListResult class. */ + /** + * Creates an instance of ManagedInstanceListResult class. + */ public ManagedInstanceListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceListResult. + */ + public static ManagedInstanceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceListResult deserializedManagedInstanceListResult = new ManagedInstanceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceInner.fromJson(reader1)); + deserializedManagedInstanceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java index 7311aae78c6ab..60b451e20a08e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of long term retention backups for managed database(s). */ +/** + * A list of long term retention backups for managed database(s). + */ @Immutable -public final class ManagedInstanceLongTermRetentionBackupListResult { +public final class ManagedInstanceLongTermRetentionBackupListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceLongTermRetentionBackupListResult class. */ + /** + * Creates an instance of ManagedInstanceLongTermRetentionBackupListResult class. + */ public ManagedInstanceLongTermRetentionBackupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceLongTermRetentionBackupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceLongTermRetentionBackupListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceLongTermRetentionBackupListResult. + */ + public static ManagedInstanceLongTermRetentionBackupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceLongTermRetentionBackupListResult deserializedManagedInstanceLongTermRetentionBackupListResult + = new ManagedInstanceLongTermRetentionBackupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceLongTermRetentionBackupInner.fromJson(reader1)); + deserializedManagedInstanceLongTermRetentionBackupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionBackupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceLongTermRetentionBackupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java index cbe041caf7e01..3aaf8031bd43f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of long term retention policies. */ +/** + * A list of long term retention policies. + */ @Immutable -public final class ManagedInstanceLongTermRetentionPolicyListResult { +public final class ManagedInstanceLongTermRetentionPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceLongTermRetentionPolicyListResult class. */ + /** + * Creates an instance of ManagedInstanceLongTermRetentionPolicyListResult class. + */ public ManagedInstanceLongTermRetentionPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceLongTermRetentionPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceLongTermRetentionPolicyListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceLongTermRetentionPolicyListResult. + */ + public static ManagedInstanceLongTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceLongTermRetentionPolicyListResult deserializedManagedInstanceLongTermRetentionPolicyListResult + = new ManagedInstanceLongTermRetentionPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceLongTermRetentionPolicyInner.fromJson(reader1)); + deserializedManagedInstanceLongTermRetentionPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceLongTermRetentionPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceLongTermRetentionPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java index 0d032bd37f86b..1e6c25e63371a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java @@ -5,29 +5,40 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedInstanceLongTermRetentionPolicyName. */ +/** + * Defines values for ManagedInstanceLongTermRetentionPolicyName. + */ public final class ManagedInstanceLongTermRetentionPolicyName extends ExpandableStringEnum { - /** Static value default for ManagedInstanceLongTermRetentionPolicyName. */ + /** + * Static value default for ManagedInstanceLongTermRetentionPolicyName. + */ public static final ManagedInstanceLongTermRetentionPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of ManagedInstanceLongTermRetentionPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstanceLongTermRetentionPolicyName() { + } + /** * Creates or finds a ManagedInstanceLongTermRetentionPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedInstanceLongTermRetentionPolicyName. */ - @JsonCreator public static ManagedInstanceLongTermRetentionPolicyName fromString(String name) { return fromString(name, ManagedInstanceLongTermRetentionPolicyName.class); } /** * Gets known ManagedInstanceLongTermRetentionPolicyName values. - * + * * @return known ManagedInstanceLongTermRetentionPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java index d0faae6f43bc9..5ab57476cc309 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java @@ -5,36 +5,42 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The maintenance configuration capability. */ +/** + * The maintenance configuration capability. + */ @Fluent -public final class ManagedInstanceMaintenanceConfigurationCapability { +public final class ManagedInstanceMaintenanceConfigurationCapability + implements JsonSerializable { /* * Maintenance configuration name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ManagedInstanceMaintenanceConfigurationCapability class. */ + /** + * Creates an instance of ManagedInstanceMaintenanceConfigurationCapability class. + */ public ManagedInstanceMaintenanceConfigurationCapability() { } /** * Get the name property: Maintenance configuration name. - * + * * @return the name value. */ public String name() { @@ -43,7 +49,7 @@ public String name() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -52,7 +58,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -61,7 +67,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ManagedInstanceMaintenanceConfigurationCapability object itself. */ @@ -72,9 +78,51 @@ public ManagedInstanceMaintenanceConfigurationCapability withReason(String reaso /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceMaintenanceConfigurationCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceMaintenanceConfigurationCapability if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceMaintenanceConfigurationCapability. + */ + public static ManagedInstanceMaintenanceConfigurationCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceMaintenanceConfigurationCapability deserializedManagedInstanceMaintenanceConfigurationCapability + = new ManagedInstanceMaintenanceConfigurationCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedInstanceMaintenanceConfigurationCapability.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedManagedInstanceMaintenanceConfigurationCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedManagedInstanceMaintenanceConfigurationCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceMaintenanceConfigurationCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java index c675105e87074..9d4775c1f7487 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list managed instance operations request. */ +/** + * The response to a list managed instance operations request. + */ @Immutable -public final class ManagedInstanceOperationListResult { +public final class ManagedInstanceOperationListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceOperationListResult class. */ + /** + * Creates an instance of ManagedInstanceOperationListResult class. + */ public ManagedInstanceOperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceOperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceOperationListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceOperationListResult. + */ + public static ManagedInstanceOperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceOperationListResult deserializedManagedInstanceOperationListResult + = new ManagedInstanceOperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceOperationInner.fromJson(reader1)); + deserializedManagedInstanceOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java index 60a3edf792b49..93ab7ca16f9d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java @@ -5,30 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The parameters of a managed instance operation. */ +/** + * The parameters of a managed instance operation. + */ @Immutable -public final class ManagedInstanceOperationParametersPair { +public final class ManagedInstanceOperationParametersPair + implements JsonSerializable { /* * The current parameters. */ - @JsonProperty(value = "currentParameters", access = JsonProperty.Access.WRITE_ONLY) private UpsertManagedServerOperationParameters currentParameters; /* * The requested parameters. */ - @JsonProperty(value = "requestedParameters", access = JsonProperty.Access.WRITE_ONLY) private UpsertManagedServerOperationParameters requestedParameters; - /** Creates an instance of ManagedInstanceOperationParametersPair class. */ + /** + * Creates an instance of ManagedInstanceOperationParametersPair class. + */ public ManagedInstanceOperationParametersPair() { } /** * Get the currentParameters property: The current parameters. - * + * * @return the currentParameters value. */ public UpsertManagedServerOperationParameters currentParameters() { @@ -37,7 +44,7 @@ public UpsertManagedServerOperationParameters currentParameters() { /** * Get the requestedParameters property: The requested parameters. - * + * * @return the requestedParameters value. */ public UpsertManagedServerOperationParameters requestedParameters() { @@ -46,7 +53,7 @@ public UpsertManagedServerOperationParameters requestedParameters() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -57,4 +64,44 @@ public void validate() { requestedParameters().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceOperationParametersPair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceOperationParametersPair if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceOperationParametersPair. + */ + public static ManagedInstanceOperationParametersPair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceOperationParametersPair deserializedManagedInstanceOperationParametersPair + = new ManagedInstanceOperationParametersPair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("currentParameters".equals(fieldName)) { + deserializedManagedInstanceOperationParametersPair.currentParameters + = UpsertManagedServerOperationParameters.fromJson(reader); + } else if ("requestedParameters".equals(fieldName)) { + deserializedManagedInstanceOperationParametersPair.requestedParameters + = UpsertManagedServerOperationParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceOperationParametersPair; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java index 3b46d5716502c..06817284252e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java @@ -5,37 +5,42 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The steps of a managed instance operation. */ +/** + * The steps of a managed instance operation. + */ @Immutable -public final class ManagedInstanceOperationSteps { +public final class ManagedInstanceOperationSteps implements JsonSerializable { /* * The total number of operation steps. */ - @JsonProperty(value = "totalSteps", access = JsonProperty.Access.WRITE_ONLY) private String totalSteps; /* * The number of current operation steps. */ - @JsonProperty(value = "currentStep", access = JsonProperty.Access.WRITE_ONLY) private Integer currentStep; /* * The operation steps list. */ - @JsonProperty(value = "stepsList", access = JsonProperty.Access.WRITE_ONLY) private List stepsList; - /** Creates an instance of ManagedInstanceOperationSteps class. */ + /** + * Creates an instance of ManagedInstanceOperationSteps class. + */ public ManagedInstanceOperationSteps() { } /** * Get the totalSteps property: The total number of operation steps. - * + * * @return the totalSteps value. */ public String totalSteps() { @@ -44,7 +49,7 @@ public String totalSteps() { /** * Get the currentStep property: The number of current operation steps. - * + * * @return the currentStep value. */ public Integer currentStep() { @@ -53,7 +58,7 @@ public Integer currentStep() { /** * Get the stepsList property: The operation steps list. - * + * * @return the stepsList value. */ public List stepsList() { @@ -62,7 +67,7 @@ public List stepsList( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -70,4 +75,46 @@ public void validate() { stepsList().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceOperationSteps from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceOperationSteps if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceOperationSteps. + */ + public static ManagedInstanceOperationSteps fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceOperationSteps deserializedManagedInstanceOperationSteps + = new ManagedInstanceOperationSteps(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("totalSteps".equals(fieldName)) { + deserializedManagedInstanceOperationSteps.totalSteps = reader.getString(); + } else if ("currentStep".equals(fieldName)) { + deserializedManagedInstanceOperationSteps.currentStep = reader.getNullable(JsonReader::getInt); + } else if ("stepsList".equals(fieldName)) { + List stepsList = reader.readArray( + reader1 -> UpsertManagedServerOperationStepWithEstimatesAndDuration.fromJson(reader1)); + deserializedManagedInstanceOperationSteps.stepsList = stepsList; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceOperationSteps; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePairInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePairInfo.java index b7e6a80ad3e62..177bfae085e46 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePairInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePairInfo.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Pairs of Managed Instances in the failover group. */ +/** + * Pairs of Managed Instances in the failover group. + */ @Fluent -public final class ManagedInstancePairInfo { +public final class ManagedInstancePairInfo implements JsonSerializable { /* * Id of Primary Managed Instance in pair. */ - @JsonProperty(value = "primaryManagedInstanceId") private String primaryManagedInstanceId; /* * Id of Partner Managed Instance in pair. */ - @JsonProperty(value = "partnerManagedInstanceId") private String partnerManagedInstanceId; - /** Creates an instance of ManagedInstancePairInfo class. */ + /** + * Creates an instance of ManagedInstancePairInfo class. + */ public ManagedInstancePairInfo() { } /** * Get the primaryManagedInstanceId property: Id of Primary Managed Instance in pair. - * + * * @return the primaryManagedInstanceId value. */ public String primaryManagedInstanceId() { @@ -37,7 +43,7 @@ public String primaryManagedInstanceId() { /** * Set the primaryManagedInstanceId property: Id of Primary Managed Instance in pair. - * + * * @param primaryManagedInstanceId the primaryManagedInstanceId value to set. * @return the ManagedInstancePairInfo object itself. */ @@ -48,7 +54,7 @@ public ManagedInstancePairInfo withPrimaryManagedInstanceId(String primaryManage /** * Get the partnerManagedInstanceId property: Id of Partner Managed Instance in pair. - * + * * @return the partnerManagedInstanceId value. */ public String partnerManagedInstanceId() { @@ -57,7 +63,7 @@ public String partnerManagedInstanceId() { /** * Set the partnerManagedInstanceId property: Id of Partner Managed Instance in pair. - * + * * @param partnerManagedInstanceId the partnerManagedInstanceId value to set. * @return the ManagedInstancePairInfo object itself. */ @@ -68,9 +74,48 @@ public ManagedInstancePairInfo withPartnerManagedInstanceId(String partnerManage /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryManagedInstanceId", this.primaryManagedInstanceId); + jsonWriter.writeStringField("partnerManagedInstanceId", this.partnerManagedInstanceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePairInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePairInfo if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePairInfo. + */ + public static ManagedInstancePairInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePairInfo deserializedManagedInstancePairInfo = new ManagedInstancePairInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryManagedInstanceId".equals(fieldName)) { + deserializedManagedInstancePairInfo.primaryManagedInstanceId = reader.getString(); + } else if ("partnerManagedInstanceId".equals(fieldName)) { + deserializedManagedInstancePairInfo.partnerManagedInstanceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePairInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePecProperty.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePecProperty.java index a1d8f1dedd8f5..ac0ec5d07fe94 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePecProperty.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePecProperty.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A private endpoint connection under a managed instance. */ +/** + * A private endpoint connection under a managed instance. + */ @Immutable -public final class ManagedInstancePecProperty { +public final class ManagedInstancePecProperty implements JsonSerializable { /* * Resource ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Private endpoint connection properties */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private ManagedInstancePrivateEndpointConnectionProperties properties; - /** Creates an instance of ManagedInstancePecProperty class. */ + /** + * Creates an instance of ManagedInstancePecProperty class. + */ public ManagedInstancePecProperty() { } /** * Get the id property: Resource ID. - * + * * @return the id value. */ public String id() { @@ -38,7 +44,7 @@ public String id() { /** * Get the properties property: Private endpoint connection properties. - * + * * @return the properties value. */ public ManagedInstancePrivateEndpointConnectionProperties properties() { @@ -47,7 +53,7 @@ public ManagedInstancePrivateEndpointConnectionProperties properties() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -55,4 +61,42 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePecProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePecProperty if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePecProperty. + */ + public static ManagedInstancePecProperty fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePecProperty deserializedManagedInstancePecProperty = new ManagedInstancePecProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstancePecProperty.id = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstancePecProperty.properties + = ManagedInstancePrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePecProperty; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointConnectionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointConnectionListResult.java index 56efd4ecde72b..d4ed5f2306d40 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointConnectionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointConnectionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of private endpoint connections. */ +/** + * A list of private endpoint connections. + */ @Immutable -public final class ManagedInstancePrivateEndpointConnectionListResult { +public final class ManagedInstancePrivateEndpointConnectionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstancePrivateEndpointConnectionListResult class. */ + /** + * Creates an instance of ManagedInstancePrivateEndpointConnectionListResult class. + */ public ManagedInstancePrivateEndpointConnectionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateEndpointConnectionListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateEndpointConnectionListResult. + */ + public static ManagedInstancePrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateEndpointConnectionListResult deserializedManagedInstancePrivateEndpointConnectionListResult + = new ManagedInstancePrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstancePrivateEndpointConnectionInner.fromJson(reader1)); + deserializedManagedInstancePrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateEndpointConnectionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java index 1df3855e078e3..f92e73bca8bb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java @@ -5,24 +5,32 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The ManagedInstancePrivateEndpointProperty model. */ +/** + * The ManagedInstancePrivateEndpointProperty model. + */ @Fluent -public final class ManagedInstancePrivateEndpointProperty { +public final class ManagedInstancePrivateEndpointProperty + implements JsonSerializable { /* * Resource id of the private endpoint. */ - @JsonProperty(value = "id") private String id; - /** Creates an instance of ManagedInstancePrivateEndpointProperty class. */ + /** + * Creates an instance of ManagedInstancePrivateEndpointProperty class. + */ public ManagedInstancePrivateEndpointProperty() { } /** * Get the id property: Resource id of the private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +39,7 @@ public String id() { /** * Set the id property: Resource id of the private endpoint. - * + * * @param id the id value to set. * @return the ManagedInstancePrivateEndpointProperty object itself. */ @@ -42,9 +50,46 @@ public ManagedInstancePrivateEndpointProperty withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateEndpointProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateEndpointProperty if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateEndpointProperty. + */ + public static ManagedInstancePrivateEndpointProperty fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateEndpointProperty deserializedManagedInstancePrivateEndpointProperty + = new ManagedInstancePrivateEndpointProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedInstancePrivateEndpointProperty.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateEndpointProperty; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java index 0266b91bd4743..b0183affddc5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateLinkInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of private link resources. */ +/** + * A list of private link resources. + */ @Immutable -public final class ManagedInstancePrivateLinkListResult { +public final class ManagedInstancePrivateLinkListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstancePrivateLinkListResult class. */ + /** + * Creates an instance of ManagedInstancePrivateLinkListResult class. + */ public ManagedInstancePrivateLinkListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateLinkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateLinkListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateLinkListResult. + */ + public static ManagedInstancePrivateLinkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateLinkListResult deserializedManagedInstancePrivateLinkListResult + = new ManagedInstancePrivateLinkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstancePrivateLinkInner.fromJson(reader1)); + deserializedManagedInstancePrivateLinkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstancePrivateLinkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateLinkListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java index 1ae0cc81e5c0b..b15ed86783160 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java @@ -5,37 +5,43 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Immutable -public final class ManagedInstancePrivateLinkProperties { +public final class ManagedInstancePrivateLinkProperties + implements JsonSerializable { /* * The private link resource group id. */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) private String groupId; /* * The private link resource required member names. */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) private List requiredMembers; /* * The private link resource required zone names. */ - @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) private List requiredZoneNames; - /** Creates an instance of ManagedInstancePrivateLinkProperties class. */ + /** + * Creates an instance of ManagedInstancePrivateLinkProperties class. + */ public ManagedInstancePrivateLinkProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -44,7 +50,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -53,7 +59,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource required zone names. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,9 +68,51 @@ public List requiredZoneNames() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateLinkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateLinkProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstancePrivateLinkProperties. + */ + public static ManagedInstancePrivateLinkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateLinkProperties deserializedManagedInstancePrivateLinkProperties + = new ManagedInstancePrivateLinkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedManagedInstancePrivateLinkProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedInstancePrivateLinkProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedInstancePrivateLinkProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateLinkProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java index 142cf92d214d6..4c7f335d54e7d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java @@ -6,36 +6,42 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The ManagedInstancePrivateLinkServiceConnectionStateProperty model. */ +/** + * The ManagedInstancePrivateLinkServiceConnectionStateProperty model. + */ @Fluent -public final class ManagedInstancePrivateLinkServiceConnectionStateProperty { +public final class ManagedInstancePrivateLinkServiceConnectionStateProperty + implements JsonSerializable { /* * The private link service connection status. */ - @JsonProperty(value = "status", required = true) private String status; /* * The private link service connection description. */ - @JsonProperty(value = "description", required = true) private String description; /* * The private link service connection description. */ - @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY) private String actionsRequired; - /** Creates an instance of ManagedInstancePrivateLinkServiceConnectionStateProperty class. */ + /** + * Creates an instance of ManagedInstancePrivateLinkServiceConnectionStateProperty class. + */ public ManagedInstancePrivateLinkServiceConnectionStateProperty() { } /** * Get the status property: The private link service connection status. - * + * * @return the status value. */ public String status() { @@ -44,7 +50,7 @@ public String status() { /** * Set the status property: The private link service connection status. - * + * * @param status the status value to set. * @return the ManagedInstancePrivateLinkServiceConnectionStateProperty object itself. */ @@ -55,7 +61,7 @@ public ManagedInstancePrivateLinkServiceConnectionStateProperty withStatus(Strin /** * Get the description property: The private link service connection description. - * + * * @return the description value. */ public String description() { @@ -64,7 +70,7 @@ public String description() { /** * Set the description property: The private link service connection description. - * + * * @param description the description value to set. * @return the ManagedInstancePrivateLinkServiceConnectionStateProperty object itself. */ @@ -75,7 +81,7 @@ public ManagedInstancePrivateLinkServiceConnectionStateProperty withDescription( /** * Get the actionsRequired property: The private link service connection description. - * + * * @return the actionsRequired value. */ public String actionsRequired() { @@ -84,26 +90,69 @@ public String actionsRequired() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model" - + " ManagedInstancePrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model ManagedInstancePrivateLinkServiceConnectionStateProperty")); } if (description() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property description in model" - + " ManagedInstancePrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model ManagedInstancePrivateLinkServiceConnectionStateProperty")); } } - private static final ClientLogger LOGGER = - new ClientLogger(ManagedInstancePrivateLinkServiceConnectionStateProperty.class); + private static final ClientLogger LOGGER + = new ClientLogger(ManagedInstancePrivateLinkServiceConnectionStateProperty.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstancePrivateLinkServiceConnectionStateProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstancePrivateLinkServiceConnectionStateProperty if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the + * ManagedInstancePrivateLinkServiceConnectionStateProperty. + */ + public static ManagedInstancePrivateLinkServiceConnectionStateProperty fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstancePrivateLinkServiceConnectionStateProperty deserializedManagedInstancePrivateLinkServiceConnectionStateProperty + = new ManagedInstancePrivateLinkServiceConnectionStateProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedManagedInstancePrivateLinkServiceConnectionStateProperty.status = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedManagedInstancePrivateLinkServiceConnectionStateProperty.description + = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedManagedInstancePrivateLinkServiceConnectionStateProperty.actionsRequired + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstancePrivateLinkServiceConnectionStateProperty; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java index 2feb391f8f7e0..c96a33d82a840 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java @@ -5,71 +5,110 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedInstancePropertiesProvisioningState. */ +/** + * Defines values for ManagedInstancePropertiesProvisioningState. + */ public final class ManagedInstancePropertiesProvisioningState extends ExpandableStringEnum { - /** Static value Creating for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Creating for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Deleting for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Updating for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState UPDATING = fromString("Updating"); - /** Static value Unknown for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Unknown for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState UNKNOWN = fromString("Unknown"); - /** Static value Succeeded for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Succeeded for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Failed for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState FAILED = fromString("Failed"); - /** Static value Accepted for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Accepted for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState ACCEPTED = fromString("Accepted"); - /** Static value Created for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Created for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState CREATED = fromString("Created"); - /** Static value Deleted for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Deleted for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState DELETED = fromString("Deleted"); - /** Static value Unrecognized for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Unrecognized for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState UNRECOGNIZED = fromString("Unrecognized"); - /** Static value Running for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Running for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState RUNNING = fromString("Running"); - /** Static value Canceled for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Canceled for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState CANCELED = fromString("Canceled"); - /** Static value NotSpecified for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value NotSpecified for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); - /** Static value Registering for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value Registering for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState REGISTERING = fromString("Registering"); - /** Static value TimedOut for ManagedInstancePropertiesProvisioningState. */ + /** + * Static value TimedOut for ManagedInstancePropertiesProvisioningState. + */ public static final ManagedInstancePropertiesProvisioningState TIMED_OUT = fromString("TimedOut"); + /** + * Creates a new instance of ManagedInstancePropertiesProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstancePropertiesProvisioningState() { + } + /** * Creates or finds a ManagedInstancePropertiesProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedInstancePropertiesProvisioningState. */ - @JsonCreator public static ManagedInstancePropertiesProvisioningState fromString(String name) { return fromString(name, ManagedInstancePropertiesProvisioningState.class); } /** * Gets known ManagedInstancePropertiesProvisioningState values. - * + * * @return known ManagedInstancePropertiesProvisioningState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java index a3184d33c533a..516016981c031 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Connection type used for connecting to the instance. */ +/** + * Connection type used for connecting to the instance. + */ public final class ManagedInstanceProxyOverride extends ExpandableStringEnum { - /** Static value Proxy for ManagedInstanceProxyOverride. */ + /** + * Static value Proxy for ManagedInstanceProxyOverride. + */ public static final ManagedInstanceProxyOverride PROXY = fromString("Proxy"); - /** Static value Redirect for ManagedInstanceProxyOverride. */ + /** + * Static value Redirect for ManagedInstanceProxyOverride. + */ public static final ManagedInstanceProxyOverride REDIRECT = fromString("Redirect"); - /** Static value Default for ManagedInstanceProxyOverride. */ + /** + * Static value Default for ManagedInstanceProxyOverride. + */ public static final ManagedInstanceProxyOverride DEFAULT = fromString("Default"); + /** + * Creates a new instance of ManagedInstanceProxyOverride value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstanceProxyOverride() { + } + /** * Creates or finds a ManagedInstanceProxyOverride from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedInstanceProxyOverride. */ - @JsonCreator public static ManagedInstanceProxyOverride fromString(String name) { return fromString(name, ManagedInstanceProxyOverride.class); } /** * Gets known ManagedInstanceProxyOverride values. - * + * * @return known ManagedInstanceProxyOverride values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java index 115eca4404f05..55b4a45cbbb26 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.QueryStatisticsInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Execution statistics for one particular query. */ +/** + * Execution statistics for one particular query. + */ @Immutable -public final class ManagedInstanceQueryStatistics { +public final class ManagedInstanceQueryStatistics implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceQueryStatistics class. */ + /** + * Creates an instance of ManagedInstanceQueryStatistics class. + */ public ManagedInstanceQueryStatistics() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceQueryStatistics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceQueryStatistics if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceQueryStatistics. + */ + public static ManagedInstanceQueryStatistics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceQueryStatistics deserializedManagedInstanceQueryStatistics + = new ManagedInstanceQueryStatistics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> QueryStatisticsInner.fromJson(reader1)); + deserializedManagedInstanceQueryStatistics.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceQueryStatistics.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceQueryStatistics; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java index 75e38c2f85ede..0ef7fa54b1507 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java @@ -5,48 +5,50 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** An update request for an Azure SQL Database managed instance. */ +/** + * An update request for an Azure SQL Database managed instance. + */ @Fluent -public final class ManagedInstanceUpdate { +public final class ManagedInstanceUpdate implements JsonSerializable { /* * Managed instance sku */ - @JsonProperty(value = "sku") private Sku sku; /* * Managed instance identity */ - @JsonProperty(value = "identity") private ResourceIdentity identity; /* * Resource properties. */ - @JsonProperty(value = "properties") private ManagedInstanceProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ManagedInstanceUpdate class. */ + /** + * Creates an instance of ManagedInstanceUpdate class. + */ public ManagedInstanceUpdate() { } /** * Get the sku property: Managed instance sku. - * + * * @return the sku value. */ public Sku sku() { @@ -55,7 +57,7 @@ public Sku sku() { /** * Set the sku property: Managed instance sku. - * + * * @param sku the sku value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -66,7 +68,7 @@ public ManagedInstanceUpdate withSku(Sku sku) { /** * Get the identity property: Managed instance identity. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -75,7 +77,7 @@ public ResourceIdentity identity() { /** * Set the identity property: Managed instance identity. - * + * * @param identity the identity value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -86,7 +88,7 @@ public ManagedInstanceUpdate withIdentity(ResourceIdentity identity) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ManagedInstanceProperties innerProperties() { @@ -95,7 +97,7 @@ private ManagedInstanceProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -104,7 +106,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -115,7 +117,7 @@ public ManagedInstanceUpdate withTags(Map tags) { /** * Get the provisioningState property: The provisioningState property. - * + * * @return the provisioningState value. */ public ManagedInstancePropertiesProvisioningState provisioningState() { @@ -124,12 +126,12 @@ public ManagedInstancePropertiesProvisioningState provisioningState() { /** * Get the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @return the managedInstanceCreateMode value. */ public ManagedServerCreateMode managedInstanceCreateMode() { @@ -138,12 +140,12 @@ public ManagedServerCreateMode managedInstanceCreateMode() { /** * Set the managedInstanceCreateMode property: Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. - * + * * @param managedInstanceCreateMode the managedInstanceCreateMode value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -157,7 +159,7 @@ public ManagedInstanceUpdate withManagedInstanceCreateMode(ManagedServerCreateMo /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the managed instance. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -167,7 +169,7 @@ public String fullyQualifiedDomainName() { /** * Get the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -177,7 +179,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). - * + * * @param administratorLogin the administratorLogin value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -192,7 +194,7 @@ public ManagedInstanceUpdate withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -202,7 +204,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for managed instance * creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -216,7 +218,7 @@ public ManagedInstanceUpdate withAdministratorLoginPassword(String administrator /** * Get the subnetId property: Subnet resource ID for the managed instance. - * + * * @return the subnetId value. */ public String subnetId() { @@ -225,7 +227,7 @@ public String subnetId() { /** * Set the subnetId property: Subnet resource ID for the managed instance. - * + * * @param subnetId the subnetId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -239,7 +241,7 @@ public ManagedInstanceUpdate withSubnetId(String subnetId) { /** * Get the state property: The state of the managed instance. - * + * * @return the state value. */ public String state() { @@ -249,7 +251,7 @@ public String state() { /** * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @return the licenseType value. */ public ManagedInstanceLicenseType licenseType() { @@ -259,7 +261,7 @@ public ManagedInstanceLicenseType licenseType() { /** * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (regular price inclusive of * a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). - * + * * @param licenseType the licenseType value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -273,7 +275,7 @@ public ManagedInstanceUpdate withLicenseType(ManagedInstanceLicenseType licenseT /** * Get the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @return the vCores value. */ public Integer vCores() { @@ -282,7 +284,7 @@ public Integer vCores() { /** * Set the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. - * + * * @param vCores the vCores value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -297,7 +299,7 @@ public ManagedInstanceUpdate withVCores(Integer vCores) { /** * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @return the storageSizeInGB value. */ public Integer storageSizeInGB() { @@ -307,7 +309,7 @@ public Integer storageSizeInGB() { /** * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. - * + * * @param storageSizeInGB the storageSizeInGB value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -321,7 +323,7 @@ public ManagedInstanceUpdate withStorageSizeInGB(Integer storageSizeInGB) { /** * Get the collation property: Collation of the managed instance. - * + * * @return the collation value. */ public String collation() { @@ -330,7 +332,7 @@ public String collation() { /** * Set the collation property: Collation of the managed instance. - * + * * @param collation the collation value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -344,7 +346,7 @@ public ManagedInstanceUpdate withCollation(String collation) { /** * Get the dnsZone property: The Dns Zone that the managed instance is in. - * + * * @return the dnsZone value. */ public String dnsZone() { @@ -354,7 +356,7 @@ public String dnsZone() { /** * Get the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @return the dnsZonePartner value. */ public String dnsZonePartner() { @@ -364,7 +366,7 @@ public String dnsZonePartner() { /** * Set the dnsZonePartner property: The resource id of another managed instance whose DNS zone this managed instance * will share after creation. - * + * * @param dnsZonePartner the dnsZonePartner value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -378,7 +380,7 @@ public ManagedInstanceUpdate withDnsZonePartner(String dnsZonePartner) { /** * Get the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @return the publicDataEndpointEnabled value. */ public Boolean publicDataEndpointEnabled() { @@ -387,7 +389,7 @@ public Boolean publicDataEndpointEnabled() { /** * Set the publicDataEndpointEnabled property: Whether or not the public data endpoint is enabled. - * + * * @param publicDataEndpointEnabled the publicDataEndpointEnabled value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -402,7 +404,7 @@ public ManagedInstanceUpdate withPublicDataEndpointEnabled(Boolean publicDataEnd /** * Get the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @return the sourceManagedInstanceId value. */ public String sourceManagedInstanceId() { @@ -412,7 +414,7 @@ public String sourceManagedInstanceId() { /** * Set the sourceManagedInstanceId property: The resource identifier of the source managed instance associated with * create operation of this instance. - * + * * @param sourceManagedInstanceId the sourceManagedInstanceId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -427,7 +429,7 @@ public ManagedInstanceUpdate withSourceManagedInstanceId(String sourceManagedIns /** * Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { @@ -437,7 +439,7 @@ public OffsetDateTime restorePointInTime() { /** * Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that * will be restored to create the new database. - * + * * @param restorePointInTime the restorePointInTime value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -451,7 +453,7 @@ public ManagedInstanceUpdate withRestorePointInTime(OffsetDateTime restorePointI /** * Get the proxyOverride property: Connection type used for connecting to the instance. - * + * * @return the proxyOverride value. */ public ManagedInstanceProxyOverride proxyOverride() { @@ -460,7 +462,7 @@ public ManagedInstanceProxyOverride proxyOverride() { /** * Set the proxyOverride property: Connection type used for connecting to the instance. - * + * * @param proxyOverride the proxyOverride value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -473,13 +475,13 @@ public ManagedInstanceUpdate withProxyOverride(ManagedInstanceProxyOverride prox } /** - * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Get the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @return the timezoneId value. */ public String timezoneId() { @@ -487,13 +489,13 @@ public String timezoneId() { } /** - * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps - * details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - * NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS - * timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing - * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard - * Time" or "W. Europe Standard Time". - * + * Set the timezoneId property: Id of the timezone. Allowed values are timezones supported by Windows. + * Windows keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + * * @param timezoneId the timezoneId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -507,7 +509,7 @@ public ManagedInstanceUpdate withTimezoneId(String timezoneId) { /** * Get the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @return the instancePoolId value. */ public String instancePoolId() { @@ -516,7 +518,7 @@ public String instancePoolId() { /** * Set the instancePoolId property: The Id of the instance pool this managed server belongs to. - * + * * @param instancePoolId the instancePoolId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -531,7 +533,7 @@ public ManagedInstanceUpdate withInstancePoolId(String instancePoolId) { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -541,7 +543,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed * instance. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -555,7 +557,7 @@ public ManagedInstanceUpdate withMaintenanceConfigurationId(String maintenanceCo /** * Get the privateEndpointConnections property: List of private endpoint connections on a managed instance. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -564,7 +566,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -573,7 +575,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -589,7 +591,7 @@ public ManagedInstanceUpdate withMinimalTlsVersion(String minimalTlsVersion) { * Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the currentBackupStorageRedundancy value. */ public BackupStorageRedundancy currentBackupStorageRedundancy() { @@ -600,7 +602,7 @@ public BackupStorageRedundancy currentBackupStorageRedundancy() { * Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -611,12 +613,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { * Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this * instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) * and GeoZone(GeoZoneRedundantStorage). - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the ManagedInstanceUpdate object itself. */ - public ManagedInstanceUpdate withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public ManagedInstanceUpdate + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new ManagedInstanceProperties(); } @@ -626,7 +628,7 @@ public ManagedInstanceUpdate withRequestedBackupStorageRedundancy( /** * Get the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -635,7 +637,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not the multi-az is enabled. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -650,7 +652,7 @@ public ManagedInstanceUpdate withZoneRedundant(Boolean zoneRedundant) { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -660,7 +662,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -674,7 +676,7 @@ public ManagedInstanceUpdate withPrimaryUserAssignedIdentityId(String primaryUse /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -683,7 +685,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -697,7 +699,7 @@ public ManagedInstanceUpdate withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ManagedInstanceExternalAdministrator administrators() { @@ -706,7 +708,7 @@ public ManagedInstanceExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -720,7 +722,7 @@ public ManagedInstanceUpdate withAdministrators(ManagedInstanceExternalAdministr /** * Get the servicePrincipal property: The managed instance's service principal. - * + * * @return the servicePrincipal value. */ public ServicePrincipal servicePrincipal() { @@ -729,7 +731,7 @@ public ServicePrincipal servicePrincipal() { /** * Set the servicePrincipal property: The managed instance's service principal. - * + * * @param servicePrincipal the servicePrincipal value to set. * @return the ManagedInstanceUpdate object itself. */ @@ -743,7 +745,7 @@ public ManagedInstanceUpdate withServicePrincipal(ServicePrincipal servicePrinci /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -757,4 +759,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceUpdate. + */ + public static ManagedInstanceUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceUpdate deserializedManagedInstanceUpdate = new ManagedInstanceUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sku".equals(fieldName)) { + deserializedManagedInstanceUpdate.sku = Sku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedManagedInstanceUpdate.identity = ResourceIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceUpdate.innerProperties = ManagedInstanceProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedInstanceUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java index 0a3f844fc0795..4fe6869387e77 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java @@ -5,73 +5,72 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The managed instance virtual cores capability. */ +/** + * The managed instance virtual cores capability. + */ @Fluent -public final class ManagedInstanceVcoresCapability { +public final class ManagedInstanceVcoresCapability implements JsonSerializable { /* * The virtual cores identifier. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The virtual cores value. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Integer value; /* * Included size. */ - @JsonProperty(value = "includedMaxSize", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability includedMaxSize; /* * Storage size ranges. */ - @JsonProperty(value = "supportedStorageSizes", access = JsonProperty.Access.WRITE_ONLY) private List supportedStorageSizes; /* * True if this service objective is supported for managed instances in an instance pool. */ - @JsonProperty(value = "instancePoolSupported", access = JsonProperty.Access.WRITE_ONLY) private Boolean instancePoolSupported; /* * True if this service objective is supported for standalone managed instances. */ - @JsonProperty(value = "standaloneSupported", access = JsonProperty.Access.WRITE_ONLY) private Boolean standaloneSupported; /* * List of supported maintenance configurations */ - @JsonProperty(value = "supportedMaintenanceConfigurations", access = JsonProperty.Access.WRITE_ONLY) private List supportedMaintenanceConfigurations; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ManagedInstanceVcoresCapability class. */ + /** + * Creates an instance of ManagedInstanceVcoresCapability class. + */ public ManagedInstanceVcoresCapability() { } /** * Get the name property: The virtual cores identifier. - * + * * @return the name value. */ public String name() { @@ -80,7 +79,7 @@ public String name() { /** * Get the value property: The virtual cores value. - * + * * @return the value value. */ public Integer value() { @@ -89,7 +88,7 @@ public Integer value() { /** * Get the includedMaxSize property: Included size. - * + * * @return the includedMaxSize value. */ public MaxSizeCapability includedMaxSize() { @@ -98,7 +97,7 @@ public MaxSizeCapability includedMaxSize() { /** * Get the supportedStorageSizes property: Storage size ranges. - * + * * @return the supportedStorageSizes value. */ public List supportedStorageSizes() { @@ -108,7 +107,7 @@ public List supportedStorageSizes() { /** * Get the instancePoolSupported property: True if this service objective is supported for managed instances in an * instance pool. - * + * * @return the instancePoolSupported value. */ public Boolean instancePoolSupported() { @@ -118,7 +117,7 @@ public Boolean instancePoolSupported() { /** * Get the standaloneSupported property: True if this service objective is supported for standalone managed * instances. - * + * * @return the standaloneSupported value. */ public Boolean standaloneSupported() { @@ -127,7 +126,7 @@ public Boolean standaloneSupported() { /** * Get the supportedMaintenanceConfigurations property: List of supported maintenance configurations. - * + * * @return the supportedMaintenanceConfigurations value. */ public List supportedMaintenanceConfigurations() { @@ -136,7 +135,7 @@ public List supportedMaintena /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -145,7 +144,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -154,7 +153,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ManagedInstanceVcoresCapability object itself. */ @@ -165,7 +164,7 @@ public ManagedInstanceVcoresCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -179,4 +178,65 @@ public void validate() { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceVcoresCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceVcoresCapability if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceVcoresCapability. + */ + public static ManagedInstanceVcoresCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceVcoresCapability deserializedManagedInstanceVcoresCapability + = new ManagedInstanceVcoresCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.value = reader.getNullable(JsonReader::getInt); + } else if ("includedMaxSize".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.includedMaxSize = MaxSizeCapability.fromJson(reader); + } else if ("supportedStorageSizes".equals(fieldName)) { + List supportedStorageSizes + = reader.readArray(reader1 -> MaxSizeRangeCapability.fromJson(reader1)); + deserializedManagedInstanceVcoresCapability.supportedStorageSizes = supportedStorageSizes; + } else if ("instancePoolSupported".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.instancePoolSupported + = reader.getNullable(JsonReader::getBoolean); + } else if ("standaloneSupported".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.standaloneSupported + = reader.getNullable(JsonReader::getBoolean); + } else if ("supportedMaintenanceConfigurations".equals(fieldName)) { + List supportedMaintenanceConfigurations = reader + .readArray(reader1 -> ManagedInstanceMaintenanceConfigurationCapability.fromJson(reader1)); + deserializedManagedInstanceVcoresCapability.supportedMaintenanceConfigurations + = supportedMaintenanceConfigurations; + } else if ("status".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedManagedInstanceVcoresCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceVcoresCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java index 94d6d6973b5a0..238c03380486a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java @@ -5,49 +5,52 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The managed instance capability. */ +/** + * The managed instance capability. + */ @Fluent -public final class ManagedInstanceVersionCapability { +public final class ManagedInstanceVersionCapability implements JsonSerializable { /* * The server version name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported managed instance editions. */ - @JsonProperty(value = "supportedEditions", access = JsonProperty.Access.WRITE_ONLY) private List supportedEditions; /* * The list of supported instance pool editions. */ - @JsonProperty(value = "supportedInstancePoolEditions", access = JsonProperty.Access.WRITE_ONLY) private List supportedInstancePoolEditions; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ManagedInstanceVersionCapability class. */ + /** + * Creates an instance of ManagedInstanceVersionCapability class. + */ public ManagedInstanceVersionCapability() { } /** * Get the name property: The server version name. - * + * * @return the name value. */ public String name() { @@ -56,7 +59,7 @@ public String name() { /** * Get the supportedEditions property: The list of supported managed instance editions. - * + * * @return the supportedEditions value. */ public List supportedEditions() { @@ -65,7 +68,7 @@ public List supportedEditions() { /** * Get the supportedInstancePoolEditions property: The list of supported instance pool editions. - * + * * @return the supportedInstancePoolEditions value. */ public List supportedInstancePoolEditions() { @@ -74,7 +77,7 @@ public List supportedInstancePoolEditions() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -83,7 +86,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -92,7 +95,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ManagedInstanceVersionCapability object itself. */ @@ -103,7 +106,7 @@ public ManagedInstanceVersionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,4 +117,55 @@ public void validate() { supportedInstancePoolEditions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceVersionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceVersionCapability if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceVersionCapability. + */ + public static ManagedInstanceVersionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceVersionCapability deserializedManagedInstanceVersionCapability + = new ManagedInstanceVersionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedManagedInstanceVersionCapability.name = reader.getString(); + } else if ("supportedEditions".equals(fieldName)) { + List supportedEditions + = reader.readArray(reader1 -> ManagedInstanceEditionCapability.fromJson(reader1)); + deserializedManagedInstanceVersionCapability.supportedEditions = supportedEditions; + } else if ("supportedInstancePoolEditions".equals(fieldName)) { + List supportedInstancePoolEditions + = reader.readArray(reader1 -> InstancePoolEditionCapability.fromJson(reader1)); + deserializedManagedInstanceVersionCapability.supportedInstancePoolEditions + = supportedInstancePoolEditions; + } else if ("status".equals(fieldName)) { + deserializedManagedInstanceVersionCapability.status + = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedManagedInstanceVersionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceVersionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java index 491ef745f4ac1..d12c3862a5a4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the ManagedInstance's vulnerability assessments. */ +/** + * A list of the ManagedInstance's vulnerability assessments. + */ @Immutable -public final class ManagedInstanceVulnerabilityAssessmentListResult { +public final class ManagedInstanceVulnerabilityAssessmentListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedInstanceVulnerabilityAssessmentListResult class. */ + /** + * Creates an instance of ManagedInstanceVulnerabilityAssessmentListResult class. + */ public ManagedInstanceVulnerabilityAssessmentListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedInstanceVulnerabilityAssessmentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedInstanceVulnerabilityAssessmentListResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedInstanceVulnerabilityAssessmentListResult. + */ + public static ManagedInstanceVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedInstanceVulnerabilityAssessmentListResult deserializedManagedInstanceVulnerabilityAssessmentListResult + = new ManagedInstanceVulnerabilityAssessmentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedInstanceVulnerabilityAssessmentInner.fromJson(reader1)); + deserializedManagedInstanceVulnerabilityAssessmentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedInstanceVulnerabilityAssessmentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedInstanceVulnerabilityAssessmentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java index 9866ab661e4c8..43254ee7ce486 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java @@ -5,38 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** * Specifies the mode of database creation. - * - *

Default: Regular instance creation. - * - *

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and * SourceManagedInstanceId must be specified. */ public final class ManagedServerCreateMode extends ExpandableStringEnum { - /** Static value Default for ManagedServerCreateMode. */ + /** + * Static value Default for ManagedServerCreateMode. + */ public static final ManagedServerCreateMode DEFAULT = fromString("Default"); - /** Static value PointInTimeRestore for ManagedServerCreateMode. */ + /** + * Static value PointInTimeRestore for ManagedServerCreateMode. + */ public static final ManagedServerCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); + /** + * Creates a new instance of ManagedServerCreateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServerCreateMode() { + } + /** * Creates or finds a ManagedServerCreateMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedServerCreateMode. */ - @JsonCreator public static ManagedServerCreateMode fromString(String name) { return fromString(name, ManagedServerCreateMode.class); } /** * Gets known ManagedServerCreateMode values. - * + * * @return known ManagedServerCreateMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java index e9d5043603f4b..11a7f1cc015b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java @@ -6,25 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A managed server DNS alias acquisition request. */ +/** + * A managed server DNS alias acquisition request. + */ @Fluent -public final class ManagedServerDnsAliasAcquisition { +public final class ManagedServerDnsAliasAcquisition implements JsonSerializable { /* * The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead. */ - @JsonProperty(value = "oldManagedServerDnsAliasResourceId", required = true) private String oldManagedServerDnsAliasResourceId; - /** Creates an instance of ManagedServerDnsAliasAcquisition class. */ + /** + * Creates an instance of ManagedServerDnsAliasAcquisition class. + */ public ManagedServerDnsAliasAcquisition() { } /** * Get the oldManagedServerDnsAliasResourceId property: The resource ID of the managed server DNS alias that will be * acquired to point to this managed server instead. - * + * * @return the oldManagedServerDnsAliasResourceId value. */ public String oldManagedServerDnsAliasResourceId() { @@ -34,30 +41,67 @@ public String oldManagedServerDnsAliasResourceId() { /** * Set the oldManagedServerDnsAliasResourceId property: The resource ID of the managed server DNS alias that will be * acquired to point to this managed server instead. - * + * * @param oldManagedServerDnsAliasResourceId the oldManagedServerDnsAliasResourceId value to set. * @return the ManagedServerDnsAliasAcquisition object itself. */ - public ManagedServerDnsAliasAcquisition withOldManagedServerDnsAliasResourceId( - String oldManagedServerDnsAliasResourceId) { + public ManagedServerDnsAliasAcquisition + withOldManagedServerDnsAliasResourceId(String oldManagedServerDnsAliasResourceId) { this.oldManagedServerDnsAliasResourceId = oldManagedServerDnsAliasResourceId; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (oldManagedServerDnsAliasResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property oldManagedServerDnsAliasResourceId in model" - + " ManagedServerDnsAliasAcquisition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property oldManagedServerDnsAliasResourceId in model ManagedServerDnsAliasAcquisition")); } } private static final ClientLogger LOGGER = new ClientLogger(ManagedServerDnsAliasAcquisition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("oldManagedServerDnsAliasResourceId", this.oldManagedServerDnsAliasResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerDnsAliasAcquisition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerDnsAliasAcquisition if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServerDnsAliasAcquisition. + */ + public static ManagedServerDnsAliasAcquisition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerDnsAliasAcquisition deserializedManagedServerDnsAliasAcquisition + = new ManagedServerDnsAliasAcquisition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("oldManagedServerDnsAliasResourceId".equals(fieldName)) { + deserializedManagedServerDnsAliasAcquisition.oldManagedServerDnsAliasResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerDnsAliasAcquisition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java index 7da9232254420..0f841c0f1a167 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A managed server dns alias creation request. */ +/** + * A managed server dns alias creation request. + */ @Fluent -public final class ManagedServerDnsAliasCreation { +public final class ManagedServerDnsAliasCreation implements JsonSerializable { /* * Whether or not DNS record should be created for this alias. */ - @JsonProperty(value = "createDnsRecord") private Boolean createDnsRecord; - /** Creates an instance of ManagedServerDnsAliasCreation class. */ + /** + * Creates an instance of ManagedServerDnsAliasCreation class. + */ public ManagedServerDnsAliasCreation() { } /** * Get the createDnsRecord property: Whether or not DNS record should be created for this alias. - * + * * @return the createDnsRecord value. */ public Boolean createDnsRecord() { @@ -31,7 +38,7 @@ public Boolean createDnsRecord() { /** * Set the createDnsRecord property: Whether or not DNS record should be created for this alias. - * + * * @param createDnsRecord the createDnsRecord value to set. * @return the ManagedServerDnsAliasCreation object itself. */ @@ -42,9 +49,47 @@ public ManagedServerDnsAliasCreation withCreateDnsRecord(Boolean createDnsRecord /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("createDnsRecord", this.createDnsRecord); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerDnsAliasCreation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerDnsAliasCreation if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServerDnsAliasCreation. + */ + public static ManagedServerDnsAliasCreation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerDnsAliasCreation deserializedManagedServerDnsAliasCreation + = new ManagedServerDnsAliasCreation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createDnsRecord".equals(fieldName)) { + deserializedManagedServerDnsAliasCreation.createDnsRecord + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerDnsAliasCreation; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java index 74e48950d6101..50e1ed780cfd6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedServerDnsAliasInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed server DNS aliases. */ +/** + * A list of managed server DNS aliases. + */ @Immutable -public final class ManagedServerDnsAliasListResult { +public final class ManagedServerDnsAliasListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedServerDnsAliasListResult class. */ + /** + * Creates an instance of ManagedServerDnsAliasListResult class. + */ public ManagedServerDnsAliasListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerDnsAliasListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerDnsAliasListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServerDnsAliasListResult. + */ + public static ManagedServerDnsAliasListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerDnsAliasListResult deserializedManagedServerDnsAliasListResult + = new ManagedServerDnsAliasListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedServerDnsAliasInner.fromJson(reader1)); + deserializedManagedServerDnsAliasListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedServerDnsAliasListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerDnsAliasListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java index 82cd7ecce889c..bc96ec832113a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the managed Server's security alert policies. */ +/** + * A list of the managed Server's security alert policies. + */ @Immutable -public final class ManagedServerSecurityAlertPolicyListResult { +public final class ManagedServerSecurityAlertPolicyListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedServerSecurityAlertPolicyListResult class. */ + /** + * Creates an instance of ManagedServerSecurityAlertPolicyListResult class. + */ public ManagedServerSecurityAlertPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServerSecurityAlertPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServerSecurityAlertPolicyListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedServerSecurityAlertPolicyListResult. + */ + public static ManagedServerSecurityAlertPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServerSecurityAlertPolicyListResult deserializedManagedServerSecurityAlertPolicyListResult + = new ManagedServerSecurityAlertPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedServerSecurityAlertPolicyInner.fromJson(reader1)); + deserializedManagedServerSecurityAlertPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServerSecurityAlertPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java index ed649053c2243..602ba5a262ae4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java @@ -5,29 +5,40 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedShortTermRetentionPolicyName. */ +/** + * Defines values for ManagedShortTermRetentionPolicyName. + */ public final class ManagedShortTermRetentionPolicyName extends ExpandableStringEnum { - /** Static value default for ManagedShortTermRetentionPolicyName. */ + /** + * Static value default for ManagedShortTermRetentionPolicyName. + */ public static final ManagedShortTermRetentionPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of ManagedShortTermRetentionPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedShortTermRetentionPolicyName() { + } + /** * Creates or finds a ManagedShortTermRetentionPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedShortTermRetentionPolicyName. */ - @JsonCreator public static ManagedShortTermRetentionPolicyName fromString(String name) { return fromString(name, ManagedShortTermRetentionPolicyName.class); } /** * Gets known ManagedShortTermRetentionPolicyName values. - * + * * @return known ManagedShortTermRetentionPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java index 26b11419edba2..a4df82b784db6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of managed transparent data encryptions. */ +/** + * A list of managed transparent data encryptions. + */ @Immutable -public final class ManagedTransparentDataEncryptionListResult { +public final class ManagedTransparentDataEncryptionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedTransparentDataEncryptionListResult class. */ + /** + * Creates an instance of ManagedTransparentDataEncryptionListResult class. + */ public ManagedTransparentDataEncryptionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedTransparentDataEncryptionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedTransparentDataEncryptionListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedTransparentDataEncryptionListResult. + */ + public static ManagedTransparentDataEncryptionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedTransparentDataEncryptionListResult deserializedManagedTransparentDataEncryptionListResult + = new ManagedTransparentDataEncryptionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedTransparentDataEncryptionInner.fromJson(reader1)); + deserializedManagedTransparentDataEncryptionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedTransparentDataEncryptionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedTransparentDataEncryptionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java index 6573f1fb037c4..4dd45766a9ab7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java @@ -5,43 +5,64 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The operation state. */ +/** + * The operation state. + */ public final class ManagementOperationState extends ExpandableStringEnum { - /** Static value Pending for ManagementOperationState. */ + /** + * Static value Pending for ManagementOperationState. + */ public static final ManagementOperationState PENDING = fromString("Pending"); - /** Static value InProgress for ManagementOperationState. */ + /** + * Static value InProgress for ManagementOperationState. + */ public static final ManagementOperationState IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for ManagementOperationState. */ + /** + * Static value Succeeded for ManagementOperationState. + */ public static final ManagementOperationState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ManagementOperationState. */ + /** + * Static value Failed for ManagementOperationState. + */ public static final ManagementOperationState FAILED = fromString("Failed"); - /** Static value CancelInProgress for ManagementOperationState. */ + /** + * Static value CancelInProgress for ManagementOperationState. + */ public static final ManagementOperationState CANCEL_IN_PROGRESS = fromString("CancelInProgress"); - /** Static value Cancelled for ManagementOperationState. */ + /** + * Static value Cancelled for ManagementOperationState. + */ public static final ManagementOperationState CANCELLED = fromString("Cancelled"); + /** + * Creates a new instance of ManagementOperationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagementOperationState() { + } + /** * Creates or finds a ManagementOperationState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagementOperationState. */ - @JsonCreator public static ManagementOperationState fromString(String name) { return fromString(name, ManagementOperationState.class); } /** * Gets known ManagementOperationState values. - * + * * @return known ManagementOperationState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java index 9fe7cdb73a713..318163d067306 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The maximum size capability. */ +/** + * The maximum size capability. + */ @Immutable -public final class MaxSizeCapability { +public final class MaxSizeCapability implements JsonSerializable { /* * The maximum size limit (see 'unit' for the units). */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Integer limit; /* * The units that the limit is expressed in. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeUnit unit; - /** Creates an instance of MaxSizeCapability class. */ + /** + * Creates an instance of MaxSizeCapability class. + */ public MaxSizeCapability() { } /** * Get the limit property: The maximum size limit (see 'unit' for the units). - * + * * @return the limit value. */ public Integer limit() { @@ -37,7 +43,7 @@ public Integer limit() { /** * Get the unit property: The units that the limit is expressed in. - * + * * @return the unit value. */ public MaxSizeUnit unit() { @@ -46,9 +52,46 @@ public MaxSizeUnit unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaxSizeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaxSizeCapability if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MaxSizeCapability. + */ + public static MaxSizeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaxSizeCapability deserializedMaxSizeCapability = new MaxSizeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("limit".equals(fieldName)) { + deserializedMaxSizeCapability.limit = reader.getNullable(JsonReader::getInt); + } else if ("unit".equals(fieldName)) { + deserializedMaxSizeCapability.unit = MaxSizeUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMaxSizeCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeRangeCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeRangeCapability.java index df9dfbba718e1..ccbe183d2a3c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeRangeCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeRangeCapability.java @@ -5,54 +5,56 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The maximum size range capability. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The maximum size range capability. + */ @Fluent -public final class MaxSizeRangeCapability { +public final class MaxSizeRangeCapability implements JsonSerializable { /* * Minimum value. */ - @JsonProperty(value = "minValue", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability minValue; /* * Maximum value. */ - @JsonProperty(value = "maxValue", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability maxValue; /* * Scale/step size for discrete values between the minimum value and the maximum value. */ - @JsonProperty(value = "scaleSize", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability scaleSize; /* * Size of transaction log. */ - @JsonProperty(value = "logSize", access = JsonProperty.Access.WRITE_ONLY) private LogSizeCapability logSize; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of MaxSizeRangeCapability class. */ + /** + * Creates an instance of MaxSizeRangeCapability class. + */ public MaxSizeRangeCapability() { } /** * Get the minValue property: Minimum value. - * + * * @return the minValue value. */ public MaxSizeCapability minValue() { @@ -61,7 +63,7 @@ public MaxSizeCapability minValue() { /** * Get the maxValue property: Maximum value. - * + * * @return the maxValue value. */ public MaxSizeCapability maxValue() { @@ -70,7 +72,7 @@ public MaxSizeCapability maxValue() { /** * Get the scaleSize property: Scale/step size for discrete values between the minimum value and the maximum value. - * + * * @return the scaleSize value. */ public MaxSizeCapability scaleSize() { @@ -79,7 +81,7 @@ public MaxSizeCapability scaleSize() { /** * Get the logSize property: Size of transaction log. - * + * * @return the logSize value. */ public LogSizeCapability logSize() { @@ -88,7 +90,7 @@ public LogSizeCapability logSize() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -97,7 +99,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -106,7 +108,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the MaxSizeRangeCapability object itself. */ @@ -117,7 +119,7 @@ public MaxSizeRangeCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -134,4 +136,50 @@ public void validate() { logSize().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaxSizeRangeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaxSizeRangeCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaxSizeRangeCapability. + */ + public static MaxSizeRangeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaxSizeRangeCapability deserializedMaxSizeRangeCapability = new MaxSizeRangeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minValue".equals(fieldName)) { + deserializedMaxSizeRangeCapability.minValue = MaxSizeCapability.fromJson(reader); + } else if ("maxValue".equals(fieldName)) { + deserializedMaxSizeRangeCapability.maxValue = MaxSizeCapability.fromJson(reader); + } else if ("scaleSize".equals(fieldName)) { + deserializedMaxSizeRangeCapability.scaleSize = MaxSizeCapability.fromJson(reader); + } else if ("logSize".equals(fieldName)) { + deserializedMaxSizeRangeCapability.logSize = LogSizeCapability.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedMaxSizeRangeCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedMaxSizeRangeCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMaxSizeRangeCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeUnit.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeUnit.java index 1eb1fb832d9cf..0fb7cd777bb4d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeUnit.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeUnit.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The units that the limit is expressed in. */ +/** + * The units that the limit is expressed in. + */ public final class MaxSizeUnit extends ExpandableStringEnum { - /** Static value Megabytes for MaxSizeUnit. */ + /** + * Static value Megabytes for MaxSizeUnit. + */ public static final MaxSizeUnit MEGABYTES = fromString("Megabytes"); - /** Static value Gigabytes for MaxSizeUnit. */ + /** + * Static value Gigabytes for MaxSizeUnit. + */ public static final MaxSizeUnit GIGABYTES = fromString("Gigabytes"); - /** Static value Terabytes for MaxSizeUnit. */ + /** + * Static value Terabytes for MaxSizeUnit. + */ public static final MaxSizeUnit TERABYTES = fromString("Terabytes"); - /** Static value Petabytes for MaxSizeUnit. */ + /** + * Static value Petabytes for MaxSizeUnit. + */ public static final MaxSizeUnit PETABYTES = fromString("Petabytes"); + /** + * Creates a new instance of MaxSizeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaxSizeUnit() { + } + /** * Creates or finds a MaxSizeUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding MaxSizeUnit. */ - @JsonCreator public static MaxSizeUnit fromString(String name) { return fromString(name, MaxSizeUnit.class); } /** * Gets known MaxSizeUnit values. - * + * * @return known MaxSizeUnit values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java index 1f1cfe12cb6f7..f11718189e0e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MetricType. */ +/** + * Defines values for MetricType. + */ public final class MetricType extends ExpandableStringEnum { - /** Static value cpu for MetricType. */ + /** + * Static value cpu for MetricType. + */ public static final MetricType CPU = fromString("cpu"); - /** Static value io for MetricType. */ + /** + * Static value io for MetricType. + */ public static final MetricType IO = fromString("io"); - /** Static value logIo for MetricType. */ + /** + * Static value logIo for MetricType. + */ public static final MetricType LOG_IO = fromString("logIo"); - /** Static value duration for MetricType. */ + /** + * Static value duration for MetricType. + */ public static final MetricType DURATION = fromString("duration"); - /** Static value dtu for MetricType. */ + /** + * Static value dtu for MetricType. + */ public static final MetricType DTU = fromString("dtu"); + /** + * Creates a new instance of MetricType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MetricType() { + } + /** * Creates or finds a MetricType from its string representation. - * + * * @param name a name to look for. * @return the corresponding MetricType. */ - @JsonCreator public static MetricType fromString(String name) { return fromString(name, MetricType.class); } /** * Gets known MetricType values. - * + * * @return known MetricType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java index bd3554f90c9f8..c542ee9d26e30 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The min capacity capability. */ +/** + * The min capacity capability. + */ @Fluent -public final class MinCapacityCapability { +public final class MinCapacityCapability implements JsonSerializable { /* * Min capacity value */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Double value; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of MinCapacityCapability class. */ + /** + * Creates an instance of MinCapacityCapability class. + */ public MinCapacityCapability() { } /** * Get the value property: Min capacity value. - * + * * @return the value value. */ public Double value() { @@ -43,7 +48,7 @@ public Double value() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -52,7 +57,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -61,7 +66,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the MinCapacityCapability object itself. */ @@ -72,9 +77,49 @@ public MinCapacityCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MinCapacityCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MinCapacityCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MinCapacityCapability. + */ + public static MinCapacityCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MinCapacityCapability deserializedMinCapacityCapability = new MinCapacityCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedMinCapacityCapability.value = reader.getNullable(JsonReader::getDouble); + } else if ("status".equals(fieldName)) { + deserializedMinCapacityCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedMinCapacityCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMinCapacityCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MoveOperationMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MoveOperationMode.java index 20f027802a5f4..147f40c080357 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MoveOperationMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MoveOperationMode.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The move operation mode. */ +/** + * The move operation mode. + */ public final class MoveOperationMode extends ExpandableStringEnum { - /** Static value Move for MoveOperationMode. */ + /** + * Static value Move for MoveOperationMode. + */ public static final MoveOperationMode MOVE = fromString("Move"); - /** Static value Copy for MoveOperationMode. */ + /** + * Static value Copy for MoveOperationMode. + */ public static final MoveOperationMode COPY = fromString("Copy"); + /** + * Creates a new instance of MoveOperationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MoveOperationMode() { + } + /** * Creates or finds a MoveOperationMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding MoveOperationMode. */ - @JsonCreator public static MoveOperationMode fromString(String name) { return fromString(name, MoveOperationMode.class); } /** * Gets known MoveOperationMode values. - * + * * @return known MoveOperationMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java index 9b7e65a4f41ae..bb053dc651fb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** ARM Usage Name. */ +/** + * ARM Usage Name. + */ @Fluent -public final class Name { +public final class Name implements JsonSerializable { /* * Usage name value */ - @JsonProperty(value = "value") private String value; /* * Usage name localized value. */ - @JsonProperty(value = "localizedValue") private String localizedValue; - /** Creates an instance of Name class. */ + /** + * Creates an instance of Name class. + */ public Name() { } /** * Get the value property: Usage name value. - * + * * @return the value value. */ public String value() { @@ -37,7 +43,7 @@ public String value() { /** * Set the value property: Usage name value. - * + * * @param value the value value to set. * @return the Name object itself. */ @@ -48,7 +54,7 @@ public Name withValue(String value) { /** * Get the localizedValue property: Usage name localized value. - * + * * @return the localizedValue value. */ public String localizedValue() { @@ -57,7 +63,7 @@ public String localizedValue() { /** * Set the localizedValue property: Usage name localized value. - * + * * @param localizedValue the localizedValue value to set. * @return the Name object itself. */ @@ -68,9 +74,48 @@ public Name withLocalizedValue(String localizedValue) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("localizedValue", this.localizedValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Name from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Name if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Name. + */ + public static Name fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Name deserializedName = new Name(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedName.value = reader.getString(); + } else if ("localizedValue".equals(fieldName)) { + deserializedName.localizedValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedName; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java index 285b1c8d584fc..a4befee92a1a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java @@ -5,26 +5,32 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the ARM resources for which to create private endpoint connection. */ +/** + * Contains the ARM resources for which to create private endpoint connection. + */ @Fluent -public final class NetworkIsolationSettings { +public final class NetworkIsolationSettings implements JsonSerializable { /* * The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be * created for the storage account. Must match storage account used for StorageUri parameter. */ - @JsonProperty(value = "storageAccountResourceId") private String storageAccountResourceId; /* * The resource id for the SQL server which is the target of this request. If set, private endpoint connection will * be created for the SQL server. Must match server which is target of the operation. */ - @JsonProperty(value = "sqlServerResourceId") private String sqlServerResourceId; - /** Creates an instance of NetworkIsolationSettings class. */ + /** + * Creates an instance of NetworkIsolationSettings class. + */ public NetworkIsolationSettings() { } @@ -32,7 +38,7 @@ public NetworkIsolationSettings() { * Get the storageAccountResourceId property: The resource id for the storage account used to store BACPAC file. If * set, private endpoint connection will be created for the storage account. Must match storage account used for * StorageUri parameter. - * + * * @return the storageAccountResourceId value. */ public String storageAccountResourceId() { @@ -43,7 +49,7 @@ public String storageAccountResourceId() { * Set the storageAccountResourceId property: The resource id for the storage account used to store BACPAC file. If * set, private endpoint connection will be created for the storage account. Must match storage account used for * StorageUri parameter. - * + * * @param storageAccountResourceId the storageAccountResourceId value to set. * @return the NetworkIsolationSettings object itself. */ @@ -56,7 +62,7 @@ public NetworkIsolationSettings withStorageAccountResourceId(String storageAccou * Get the sqlServerResourceId property: The resource id for the SQL server which is the target of this request. If * set, private endpoint connection will be created for the SQL server. Must match server which is target of the * operation. - * + * * @return the sqlServerResourceId value. */ public String sqlServerResourceId() { @@ -67,7 +73,7 @@ public String sqlServerResourceId() { * Set the sqlServerResourceId property: The resource id for the SQL server which is the target of this request. If * set, private endpoint connection will be created for the SQL server. Must match server which is target of the * operation. - * + * * @param sqlServerResourceId the sqlServerResourceId value to set. * @return the NetworkIsolationSettings object itself. */ @@ -78,9 +84,48 @@ public NetworkIsolationSettings withSqlServerResourceId(String sqlServerResource /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageAccountResourceId", this.storageAccountResourceId); + jsonWriter.writeStringField("sqlServerResourceId", this.sqlServerResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkIsolationSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkIsolationSettings if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkIsolationSettings. + */ + public static NetworkIsolationSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkIsolationSettings deserializedNetworkIsolationSettings = new NetworkIsolationSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountResourceId".equals(fieldName)) { + deserializedNetworkIsolationSettings.storageAccountResourceId = reader.getString(); + } else if ("sqlServerResourceId".equals(fieldName)) { + deserializedNetworkIsolationSettings.sqlServerResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkIsolationSettings; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java index e04b21985944f..80e33283a6cd2 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Display metadata associated with the operation. */ +/** + * Display metadata associated with the operation. + */ @Immutable -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* * The localized friendly form of the resource provider name. */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* * The localized friendly form of the resource type related to this action/operation. */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* * The localized friendly name for the operation. */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The localized friendly description for the operation. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Get the resource property: The localized friendly form of the resource type related to this action/operation. - * + * * @return the resource value. */ public String resource() { @@ -58,7 +62,7 @@ public String resource() { /** * Get the operation property: The localized friendly name for the operation. - * + * * @return the operation value. */ public String operation() { @@ -67,7 +71,7 @@ public String operation() { /** * Get the description property: The localized friendly description for the operation. - * + * * @return the description value. */ public String description() { @@ -76,9 +80,50 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationListResult.java index 876ee3090fc12..76c0d9cbba3c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Result of the request to list SQL operations. */ +/** + * Result of the request to list SQL operations. + */ @Immutable -public final class OperationListResult { +public final class OperationListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationMode.java index b6f9378f2e6be..2689aaf23a97d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationMode.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Operation mode of the operation: Import, Export, or PolybaseImport. */ +/** + * Operation mode of the operation: Import, Export, or PolybaseImport. + */ public final class OperationMode extends ExpandableStringEnum { - /** Static value PolybaseImport for OperationMode. */ + /** + * Static value PolybaseImport for OperationMode. + */ public static final OperationMode POLYBASE_IMPORT = fromString("PolybaseImport"); - /** Static value Import for OperationMode. */ + /** + * Static value Import for OperationMode. + */ public static final OperationMode IMPORT = fromString("Import"); - /** Static value Export for OperationMode. */ + /** + * Static value Export for OperationMode. + */ public static final OperationMode EXPORT = fromString("Export"); + /** + * Creates a new instance of OperationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperationMode() { + } + /** * Creates or finds a OperationMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationMode. */ - @JsonCreator public static OperationMode fromString(String name) { return fromString(name, OperationMode.class); } /** * Gets known OperationMode values. - * + * * @return known OperationMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java index 97f0197b1a54d..bf92360a32398 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The intended executor of the operation. */ +/** + * The intended executor of the operation. + */ public final class OperationOrigin extends ExpandableStringEnum { - /** Static value user for OperationOrigin. */ + /** + * Static value user for OperationOrigin. + */ public static final OperationOrigin USER = fromString("user"); - /** Static value system for OperationOrigin. */ + /** + * Static value system for OperationOrigin. + */ public static final OperationOrigin SYSTEM = fromString("system"); + /** + * Creates a new instance of OperationOrigin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperationOrigin() { + } + /** * Creates or finds a OperationOrigin from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationOrigin. */ - @JsonCreator public static OperationOrigin fromString(String name) { return fromString(name, OperationOrigin.class); } /** * Gets known OperationOrigin values. - * + * * @return known OperationOrigin values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java index 0a7d16a7fa179..68e3863bed553 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.OutboundEnvironmentEndpointInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A collection of endpoints that the managed instance service requires outbound network access to. */ +/** + * A collection of endpoints that the managed instance service requires outbound network access to. + */ @Immutable -public final class OutboundEnvironmentEndpointCollection { +public final class OutboundEnvironmentEndpointCollection + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OutboundEnvironmentEndpointCollection class. */ + /** + * Creates an instance of OutboundEnvironmentEndpointCollection class. + */ public OutboundEnvironmentEndpointCollection() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundEnvironmentEndpointCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundEnvironmentEndpointCollection if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OutboundEnvironmentEndpointCollection. + */ + public static OutboundEnvironmentEndpointCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundEnvironmentEndpointCollection deserializedOutboundEnvironmentEndpointCollection + = new OutboundEnvironmentEndpointCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OutboundEnvironmentEndpointInner.fromJson(reader1)); + deserializedOutboundEnvironmentEndpointCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOutboundEnvironmentEndpointCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundEnvironmentEndpointCollection; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java index 4221afead8aa2..7a0166390e8fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.OutboundFirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of outbound rules. */ +/** + * A list of outbound rules. + */ @Immutable -public final class OutboundFirewallRuleListResult { +public final class OutboundFirewallRuleListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OutboundFirewallRuleListResult class. */ + /** + * Creates an instance of OutboundFirewallRuleListResult class. + */ public OutboundFirewallRuleListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OutboundFirewallRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OutboundFirewallRuleListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OutboundFirewallRuleListResult. + */ + public static OutboundFirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OutboundFirewallRuleListResult deserializedOutboundFirewallRuleListResult + = new OutboundFirewallRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OutboundFirewallRuleInner.fromJson(reader1)); + deserializedOutboundFirewallRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOutboundFirewallRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOutboundFirewallRuleListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java index 6feab836cbc18..b46084a424a1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java @@ -6,36 +6,41 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Partner server information for the failover group. */ +/** + * Partner server information for the failover group. + */ @Fluent -public final class PartnerInfo { +public final class PartnerInfo implements JsonSerializable { /* * Resource identifier of the partner server. */ - @JsonProperty(value = "id", required = true) private String id; /* * Geo location of the partner server. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; /* * Replication role of the partner server. */ - @JsonProperty(value = "replicationRole", access = JsonProperty.Access.WRITE_ONLY) private FailoverGroupReplicationRole replicationRole; - /** Creates an instance of PartnerInfo class. */ + /** + * Creates an instance of PartnerInfo class. + */ public PartnerInfo() { } /** * Get the id property: Resource identifier of the partner server. - * + * * @return the id value. */ public String id() { @@ -44,7 +49,7 @@ public String id() { /** * Set the id property: Resource identifier of the partner server. - * + * * @param id the id value to set. * @return the PartnerInfo object itself. */ @@ -55,7 +60,7 @@ public PartnerInfo withId(String id) { /** * Get the location property: Geo location of the partner server. - * + * * @return the location value. */ public String location() { @@ -64,7 +69,7 @@ public String location() { /** * Get the replicationRole property: Replication role of the partner server. - * + * * @return the replicationRole value. */ public FailoverGroupReplicationRole replicationRole() { @@ -73,15 +78,57 @@ public FailoverGroupReplicationRole replicationRole() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property id in model PartnerInfo")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model PartnerInfo")); } } private static final ClientLogger LOGGER = new ClientLogger(PartnerInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PartnerInfo. + */ + public static PartnerInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerInfo deserializedPartnerInfo = new PartnerInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerInfo.id = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPartnerInfo.location = reader.getString(); + } else if ("replicationRole".equals(fieldName)) { + deserializedPartnerInfo.replicationRole + = FailoverGroupReplicationRole.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java index 1deb48f8200d1..7830c270d0675 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Partner region information for the failover group. */ +/** + * Partner region information for the failover group. + */ @Fluent -public final class PartnerRegionInfo { +public final class PartnerRegionInfo implements JsonSerializable { /* * Geo location of the partner managed instances. */ - @JsonProperty(value = "location") private String location; /* * Replication role of the partner managed instances. */ - @JsonProperty(value = "replicationRole", access = JsonProperty.Access.WRITE_ONLY) private InstanceFailoverGroupReplicationRole replicationRole; - /** Creates an instance of PartnerRegionInfo class. */ + /** + * Creates an instance of PartnerRegionInfo class. + */ public PartnerRegionInfo() { } /** * Get the location property: Geo location of the partner managed instances. - * + * * @return the location value. */ public String location() { @@ -37,7 +43,7 @@ public String location() { /** * Set the location property: Geo location of the partner managed instances. - * + * * @param location the location value to set. * @return the PartnerRegionInfo object itself. */ @@ -48,7 +54,7 @@ public PartnerRegionInfo withLocation(String location) { /** * Get the replicationRole property: Replication role of the partner managed instances. - * + * * @return the replicationRole value. */ public InstanceFailoverGroupReplicationRole replicationRole() { @@ -57,9 +63,48 @@ public InstanceFailoverGroupReplicationRole replicationRole() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerRegionInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerRegionInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PartnerRegionInfo. + */ + public static PartnerRegionInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerRegionInfo deserializedPartnerRegionInfo = new PartnerRegionInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedPartnerRegionInfo.location = reader.getString(); + } else if ("replicationRole".equals(fieldName)) { + deserializedPartnerRegionInfo.replicationRole + = InstanceFailoverGroupReplicationRole.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerRegionInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java index f21802a40c578..a6b80626200d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Unit of time that delay is expressed in. */ +/** + * Unit of time that delay is expressed in. + */ public final class PauseDelayTimeUnit extends ExpandableStringEnum { - /** Static value Minutes for PauseDelayTimeUnit. */ + /** + * Static value Minutes for PauseDelayTimeUnit. + */ public static final PauseDelayTimeUnit MINUTES = fromString("Minutes"); + /** + * Creates a new instance of PauseDelayTimeUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PauseDelayTimeUnit() { + } + /** * Creates or finds a PauseDelayTimeUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding PauseDelayTimeUnit. */ - @JsonCreator public static PauseDelayTimeUnit fromString(String name) { return fromString(name, PauseDelayTimeUnit.class); } /** * Gets known PauseDelayTimeUnit values. - * + * * @return known PauseDelayTimeUnit values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java index a3139f13893b1..5db6f3dbda2e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The performance level capability. */ +/** + * The performance level capability. + */ @Immutable -public final class PerformanceLevelCapability { +public final class PerformanceLevelCapability implements JsonSerializable { /* * Performance level value. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Double value; /* * Unit type used to measure performance level. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private PerformanceLevelUnit unit; - /** Creates an instance of PerformanceLevelCapability class. */ + /** + * Creates an instance of PerformanceLevelCapability class. + */ public PerformanceLevelCapability() { } /** * Get the value property: Performance level value. - * + * * @return the value value. */ public Double value() { @@ -37,7 +43,7 @@ public Double value() { /** * Get the unit property: Unit type used to measure performance level. - * + * * @return the unit value. */ public PerformanceLevelUnit unit() { @@ -46,9 +52,46 @@ public PerformanceLevelUnit unit() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PerformanceLevelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PerformanceLevelCapability if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PerformanceLevelCapability. + */ + public static PerformanceLevelCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PerformanceLevelCapability deserializedPerformanceLevelCapability = new PerformanceLevelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedPerformanceLevelCapability.value = reader.getNullable(JsonReader::getDouble); + } else if ("unit".equals(fieldName)) { + deserializedPerformanceLevelCapability.unit = PerformanceLevelUnit.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPerformanceLevelCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelUnit.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelUnit.java index c593dbcd133e9..55b07a424ccbb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelUnit.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelUnit.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Unit type used to measure performance level. */ +/** + * Unit type used to measure performance level. + */ public final class PerformanceLevelUnit extends ExpandableStringEnum { - /** Static value DTU for PerformanceLevelUnit. */ + /** + * Static value DTU for PerformanceLevelUnit. + */ public static final PerformanceLevelUnit DTU = fromString("DTU"); - /** Static value VCores for PerformanceLevelUnit. */ + /** + * Static value VCores for PerformanceLevelUnit. + */ public static final PerformanceLevelUnit VCORES = fromString("VCores"); + /** + * Creates a new instance of PerformanceLevelUnit value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PerformanceLevelUnit() { + } + /** * Creates or finds a PerformanceLevelUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding PerformanceLevelUnit. */ - @JsonCreator public static PerformanceLevelUnit fromString(String name) { return fromString(name, PerformanceLevelUnit.class); } /** * Gets known PerformanceLevelUnit values. - * + * * @return known PerformanceLevelUnit values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java index 71259633f9a43..dc707e2a058a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Principal Type of the sever administrator. */ +/** + * Principal Type of the sever administrator. + */ public final class PrincipalType extends ExpandableStringEnum { - /** Static value User for PrincipalType. */ + /** + * Static value User for PrincipalType. + */ public static final PrincipalType USER = fromString("User"); - /** Static value Group for PrincipalType. */ + /** + * Static value Group for PrincipalType. + */ public static final PrincipalType GROUP = fromString("Group"); - /** Static value Application for PrincipalType. */ + /** + * Static value Application for PrincipalType. + */ public static final PrincipalType APPLICATION = fromString("Application"); + /** + * Creates a new instance of PrincipalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrincipalType() { + } + /** * Creates or finds a PrincipalType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrincipalType. */ - @JsonCreator public static PrincipalType fromString(String name) { return fromString(name, PrincipalType.class); } /** * Gets known PrincipalType values. - * + * * @return known PrincipalType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java index 8837b4f27bb20..d98ba58173154 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of private endpoint connections. */ +/** + * A list of private endpoint connections. + */ @Immutable -public final class PrivateEndpointConnectionListResult { +public final class PrivateEndpointConnectionListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateEndpointConnectionListResult class. */ + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ public PrivateEndpointConnectionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + */ + public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult + = new PrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java index aa9f90fbc86d3..065f0f7530dd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java @@ -5,36 +5,42 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the private endpoint connection requests status. */ +/** + * Contains the private endpoint connection requests status. + */ @Immutable -public final class PrivateEndpointConnectionRequestStatus { +public final class PrivateEndpointConnectionRequestStatus + implements JsonSerializable { /* * Resource id for which the private endpoint is created. */ - @JsonProperty(value = "privateLinkServiceId", access = JsonProperty.Access.WRITE_ONLY) private String privateLinkServiceId; /* * The connection name for the private endpoint. */ - @JsonProperty(value = "privateEndpointConnectionName", access = JsonProperty.Access.WRITE_ONLY) private String privateEndpointConnectionName; /* * Status of this private endpoint connection. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; - /** Creates an instance of PrivateEndpointConnectionRequestStatus class. */ + /** + * Creates an instance of PrivateEndpointConnectionRequestStatus class. + */ public PrivateEndpointConnectionRequestStatus() { } /** * Get the privateLinkServiceId property: Resource id for which the private endpoint is created. - * + * * @return the privateLinkServiceId value. */ public String privateLinkServiceId() { @@ -43,7 +49,7 @@ public String privateLinkServiceId() { /** * Get the privateEndpointConnectionName property: The connection name for the private endpoint. - * + * * @return the privateEndpointConnectionName value. */ public String privateEndpointConnectionName() { @@ -52,7 +58,7 @@ public String privateEndpointConnectionName() { /** * Get the status property: Status of this private endpoint connection. - * + * * @return the status value. */ public String status() { @@ -61,9 +67,50 @@ public String status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionRequestStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionRequestStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionRequestStatus. + */ + public static PrivateEndpointConnectionRequestStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionRequestStatus deserializedPrivateEndpointConnectionRequestStatus + = new PrivateEndpointConnectionRequestStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateLinkServiceId".equals(fieldName)) { + deserializedPrivateEndpointConnectionRequestStatus.privateLinkServiceId = reader.getString(); + } else if ("privateEndpointConnectionName".equals(fieldName)) { + deserializedPrivateEndpointConnectionRequestStatus.privateEndpointConnectionName + = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedPrivateEndpointConnectionRequestStatus.status = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionRequestStatus; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java index b231803ea941d..819fcceed4496 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java @@ -5,24 +5,31 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The PrivateEndpointProperty model. */ +/** + * The PrivateEndpointProperty model. + */ @Fluent -public final class PrivateEndpointProperty { +public final class PrivateEndpointProperty implements JsonSerializable { /* * Resource id of the private endpoint. */ - @JsonProperty(value = "id") private String id; - /** Creates an instance of PrivateEndpointProperty class. */ + /** + * Creates an instance of PrivateEndpointProperty class. + */ public PrivateEndpointProperty() { } /** * Get the id property: Resource id of the private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +38,7 @@ public String id() { /** * Set the id property: Resource id of the private endpoint. - * + * * @param id the id value to set. * @return the PrivateEndpointProperty object itself. */ @@ -42,9 +49,45 @@ public PrivateEndpointProperty withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointProperty if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointProperty. + */ + public static PrivateEndpointProperty fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointProperty deserializedPrivateEndpointProperty = new PrivateEndpointProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointProperty.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointProperty; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java index dd441c033dd63..ff5793a33922e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of the private endpoint connection. */ +/** + * State of the private endpoint connection. + */ public final class PrivateEndpointProvisioningState extends ExpandableStringEnum { - /** Static value Approving for PrivateEndpointProvisioningState. */ + /** + * Static value Approving for PrivateEndpointProvisioningState. + */ public static final PrivateEndpointProvisioningState APPROVING = fromString("Approving"); - /** Static value Ready for PrivateEndpointProvisioningState. */ + /** + * Static value Ready for PrivateEndpointProvisioningState. + */ public static final PrivateEndpointProvisioningState READY = fromString("Ready"); - /** Static value Dropping for PrivateEndpointProvisioningState. */ + /** + * Static value Dropping for PrivateEndpointProvisioningState. + */ public static final PrivateEndpointProvisioningState DROPPING = fromString("Dropping"); - /** Static value Failed for PrivateEndpointProvisioningState. */ + /** + * Static value Failed for PrivateEndpointProvisioningState. + */ public static final PrivateEndpointProvisioningState FAILED = fromString("Failed"); - /** Static value Rejecting for PrivateEndpointProvisioningState. */ + /** + * Static value Rejecting for PrivateEndpointProvisioningState. + */ public static final PrivateEndpointProvisioningState REJECTING = fromString("Rejecting"); + /** + * Creates a new instance of PrivateEndpointProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointProvisioningState() { + } + /** * Creates or finds a PrivateEndpointProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointProvisioningState. */ - @JsonCreator public static PrivateEndpointProvisioningState fromString(String name) { return fromString(name, PrivateEndpointProvisioningState.class); } /** * Gets known PrivateEndpointProvisioningState values. - * + * * @return known PrivateEndpointProvisioningState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java index 74a53236f24e7..1a04c9af9bc4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.PrivateLinkResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of private link resources. */ +/** + * A list of private link resources. + */ @Immutable -public final class PrivateLinkResourceListResult { +public final class PrivateLinkResourceListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateLinkResourceListResult class. */ + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ public PrivateLinkResourceListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult. + */ + public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult + = new PrivateLinkResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java index 0b8873198708d..3d0b7a415e80b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java @@ -5,37 +5,42 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Immutable -public final class PrivateLinkResourceProperties { +public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) private String groupId; /* * The private link resource required member names. */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) private List requiredMembers; /* * The private link resource required zone names. */ - @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) private List requiredZoneNames; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -44,7 +49,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -53,7 +58,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource required zone names. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,9 +67,51 @@ public List requiredZoneNames() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateActionsRequire.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateActionsRequire.java index 4044e237f4059..e3fba85dc22a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateActionsRequire.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateActionsRequire.java @@ -5,29 +5,40 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The actions required for private link service connection. */ +/** + * The actions required for private link service connection. + */ public final class PrivateLinkServiceConnectionStateActionsRequire extends ExpandableStringEnum { - /** Static value None for PrivateLinkServiceConnectionStateActionsRequire. */ + /** + * Static value None for PrivateLinkServiceConnectionStateActionsRequire. + */ public static final PrivateLinkServiceConnectionStateActionsRequire NONE = fromString("None"); + /** + * Creates a new instance of PrivateLinkServiceConnectionStateActionsRequire value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateLinkServiceConnectionStateActionsRequire() { + } + /** * Creates or finds a PrivateLinkServiceConnectionStateActionsRequire from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateLinkServiceConnectionStateActionsRequire. */ - @JsonCreator public static PrivateLinkServiceConnectionStateActionsRequire fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStateActionsRequire.class); } /** * Gets known PrivateLinkServiceConnectionStateActionsRequire values. - * + * * @return known PrivateLinkServiceConnectionStateActionsRequire values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java index c93b9a06bd1e1..52c7df08f9088 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java @@ -6,36 +6,42 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The PrivateLinkServiceConnectionStateProperty model. */ +/** + * The PrivateLinkServiceConnectionStateProperty model. + */ @Fluent -public final class PrivateLinkServiceConnectionStateProperty { +public final class PrivateLinkServiceConnectionStateProperty + implements JsonSerializable { /* * The private link service connection status. */ - @JsonProperty(value = "status", required = true) private PrivateLinkServiceConnectionStateStatus status; /* * The private link service connection description. */ - @JsonProperty(value = "description", required = true) private String description; /* * The actions required for private link service connection. */ - @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY) private PrivateLinkServiceConnectionStateActionsRequire actionsRequired; - /** Creates an instance of PrivateLinkServiceConnectionStateProperty class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionStateProperty class. + */ public PrivateLinkServiceConnectionStateProperty() { } /** * Get the status property: The private link service connection status. - * + * * @return the status value. */ public PrivateLinkServiceConnectionStateStatus status() { @@ -44,7 +50,7 @@ public PrivateLinkServiceConnectionStateStatus status() { /** * Set the status property: The private link service connection status. - * + * * @param status the status value to set. * @return the PrivateLinkServiceConnectionStateProperty object itself. */ @@ -55,7 +61,7 @@ public PrivateLinkServiceConnectionStateProperty withStatus(PrivateLinkServiceCo /** * Get the description property: The private link service connection description. - * + * * @return the description value. */ public String description() { @@ -64,7 +70,7 @@ public String description() { /** * Set the description property: The private link service connection description. - * + * * @param description the description value to set. * @return the PrivateLinkServiceConnectionStateProperty object itself. */ @@ -75,7 +81,7 @@ public PrivateLinkServiceConnectionStateProperty withDescription(String descript /** * Get the actionsRequired property: The actions required for private link service connection. - * + * * @return the actionsRequired value. */ public PrivateLinkServiceConnectionStateActionsRequire actionsRequired() { @@ -84,23 +90,66 @@ public PrivateLinkServiceConnectionStateActionsRequire actionsRequired() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); } if (description() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); } } private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionStateProperty.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionStateProperty from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionStateProperty if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionStateProperty. + */ + public static PrivateLinkServiceConnectionStateProperty fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionStateProperty deserializedPrivateLinkServiceConnectionStateProperty + = new PrivateLinkServiceConnectionStateProperty(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionStateProperty.status + = PrivateLinkServiceConnectionStateStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionStateProperty.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionStateProperty.actionsRequired + = PrivateLinkServiceConnectionStateActionsRequire.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionStateProperty; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java index 70bf658bf4e90..c83ff231b3a2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java @@ -5,38 +5,55 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The private link service connection status. */ +/** + * The private link service connection status. + */ public final class PrivateLinkServiceConnectionStateStatus extends ExpandableStringEnum { - /** Static value Approved for PrivateLinkServiceConnectionStateStatus. */ + /** + * Static value Approved for PrivateLinkServiceConnectionStateStatus. + */ public static final PrivateLinkServiceConnectionStateStatus APPROVED = fromString("Approved"); - /** Static value Pending for PrivateLinkServiceConnectionStateStatus. */ + /** + * Static value Pending for PrivateLinkServiceConnectionStateStatus. + */ public static final PrivateLinkServiceConnectionStateStatus PENDING = fromString("Pending"); - /** Static value Rejected for PrivateLinkServiceConnectionStateStatus. */ + /** + * Static value Rejected for PrivateLinkServiceConnectionStateStatus. + */ public static final PrivateLinkServiceConnectionStateStatus REJECTED = fromString("Rejected"); - /** Static value Disconnected for PrivateLinkServiceConnectionStateStatus. */ + /** + * Static value Disconnected for PrivateLinkServiceConnectionStateStatus. + */ public static final PrivateLinkServiceConnectionStateStatus DISCONNECTED = fromString("Disconnected"); + /** + * Creates a new instance of PrivateLinkServiceConnectionStateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateLinkServiceConnectionStateStatus() { + } + /** * Creates or finds a PrivateLinkServiceConnectionStateStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateLinkServiceConnectionStateStatus. */ - @JsonCreator public static PrivateLinkServiceConnectionStateStatus fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStateStatus.class); } /** * Gets known PrivateLinkServiceConnectionStateStatus values. - * + * * @return known PrivateLinkServiceConnectionStateStatus values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java index e8725a453a2fd..b6b634f41caf9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The ARM provisioning state of the job execution. */ +/** + * The ARM provisioning state of the job execution. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Created for ProvisioningState. */ + /** + * Static value Created for ProvisioningState. + */ public static final ProvisioningState CREATED = fromString("Created"); - /** Static value InProgress for ProvisioningState. */ + /** + * Static value InProgress for ProvisioningState. + */ public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ - @JsonCreator public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java index 1bb6d69e03b23..b7fd9bfe38743 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java @@ -5,15 +5,55 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** ARM proxy resource. */ +/** + * ARM proxy resource. + */ @Fluent public class ProxyResourceWithWritableName extends ResourceWithWritableName { - /** Creates an instance of ProxyResourceWithWritableName class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ProxyResourceWithWritableName class. + */ public ProxyResourceWithWritableName() { } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public ProxyResourceWithWritableName withName(String name) { super.withName(name); @@ -22,11 +62,53 @@ public ProxyResourceWithWritableName withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyResourceWithWritableName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyResourceWithWritableName if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ProxyResourceWithWritableName. + */ + public static ProxyResourceWithWritableName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyResourceWithWritableName deserializedProxyResourceWithWritableName + = new ProxyResourceWithWritableName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProxyResourceWithWritableName.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProxyResourceWithWritableName.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedProxyResourceWithWritableName.withName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyResourceWithWritableName; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java index 359232ba9dea1..c71e71af8ae34 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java @@ -5,43 +5,47 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of a query metrics interval. */ +/** + * Properties of a query metrics interval. + */ @Fluent -public final class QueryMetricInterval { +public final class QueryMetricInterval implements JsonSerializable { /* * The start time for the metric interval (ISO-8601 format). */ - @JsonProperty(value = "intervalStartTime", access = JsonProperty.Access.WRITE_ONLY) private String intervalStartTime; /* * Interval type (length). */ - @JsonProperty(value = "intervalType", access = JsonProperty.Access.WRITE_ONLY) private QueryTimeGrainType intervalType; /* * Execution count of a query in this interval. */ - @JsonProperty(value = "executionCount", access = JsonProperty.Access.WRITE_ONLY) private Long executionCount; /* * List of metric objects for this interval */ - @JsonProperty(value = "metrics") private List metrics; - /** Creates an instance of QueryMetricInterval class. */ + /** + * Creates an instance of QueryMetricInterval class. + */ public QueryMetricInterval() { } /** * Get the intervalStartTime property: The start time for the metric interval (ISO-8601 format). - * + * * @return the intervalStartTime value. */ public String intervalStartTime() { @@ -50,7 +54,7 @@ public String intervalStartTime() { /** * Get the intervalType property: Interval type (length). - * + * * @return the intervalType value. */ public QueryTimeGrainType intervalType() { @@ -59,7 +63,7 @@ public QueryTimeGrainType intervalType() { /** * Get the executionCount property: Execution count of a query in this interval. - * + * * @return the executionCount value. */ public Long executionCount() { @@ -68,7 +72,7 @@ public Long executionCount() { /** * Get the metrics property: List of metric objects for this interval. - * + * * @return the metrics value. */ public List metrics() { @@ -77,7 +81,7 @@ public List metrics() { /** * Set the metrics property: List of metric objects for this interval. - * + * * @param metrics the metrics value to set. * @return the QueryMetricInterval object itself. */ @@ -88,7 +92,7 @@ public QueryMetricInterval withMetrics(List metrics) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -96,4 +100,48 @@ public void validate() { metrics().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("metrics", this.metrics, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryMetricInterval from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryMetricInterval if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the QueryMetricInterval. + */ + public static QueryMetricInterval fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryMetricInterval deserializedQueryMetricInterval = new QueryMetricInterval(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("intervalStartTime".equals(fieldName)) { + deserializedQueryMetricInterval.intervalStartTime = reader.getString(); + } else if ("intervalType".equals(fieldName)) { + deserializedQueryMetricInterval.intervalType = QueryTimeGrainType.fromString(reader.getString()); + } else if ("executionCount".equals(fieldName)) { + deserializedQueryMetricInterval.executionCount = reader.getNullable(JsonReader::getLong); + } else if ("metrics".equals(fieldName)) { + List metrics + = reader.readArray(reader1 -> QueryMetricProperties.fromJson(reader1)); + deserializedQueryMetricInterval.metrics = metrics; + } else { + reader.skipChildren(); + } + } + + return deserializedQueryMetricInterval; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java index 922a80597c830..3e3bcace4b705 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java @@ -5,72 +5,71 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a topquery metric in one interval. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of a topquery metric in one interval. + */ @Immutable -public final class QueryMetricProperties { +public final class QueryMetricProperties implements JsonSerializable { /* * The name information for the metric. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The UI appropriate name for the metric. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * The unit of the metric. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private QueryMetricUnitType unit; /* * The value of the metric. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Double value; /* * Metric value when min() aggregate function is used over the interval. */ - @JsonProperty(value = "min", access = JsonProperty.Access.WRITE_ONLY) private Double min; /* * Metric value when max() aggregate function is used over the interval. */ - @JsonProperty(value = "max", access = JsonProperty.Access.WRITE_ONLY) private Double max; /* * Metric value when avg() aggregate function is used over the interval. */ - @JsonProperty(value = "avg", access = JsonProperty.Access.WRITE_ONLY) private Double avg; /* * Metric value when sum() aggregate function is used over the interval. */ - @JsonProperty(value = "sum", access = JsonProperty.Access.WRITE_ONLY) private Double sum; /* * Metric value when stdev aggregate function is used over the interval. */ - @JsonProperty(value = "stdev", access = JsonProperty.Access.WRITE_ONLY) private Double stdev; - /** Creates an instance of QueryMetricProperties class. */ + /** + * Creates an instance of QueryMetricProperties class. + */ public QueryMetricProperties() { } /** * Get the name property: The name information for the metric. - * + * * @return the name value. */ public String name() { @@ -79,7 +78,7 @@ public String name() { /** * Get the displayName property: The UI appropriate name for the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -88,7 +87,7 @@ public String displayName() { /** * Get the unit property: The unit of the metric. - * + * * @return the unit value. */ public QueryMetricUnitType unit() { @@ -97,7 +96,7 @@ public QueryMetricUnitType unit() { /** * Get the value property: The value of the metric. - * + * * @return the value value. */ public Double value() { @@ -106,7 +105,7 @@ public Double value() { /** * Get the min property: Metric value when min() aggregate function is used over the interval. - * + * * @return the min value. */ public Double min() { @@ -115,7 +114,7 @@ public Double min() { /** * Get the max property: Metric value when max() aggregate function is used over the interval. - * + * * @return the max value. */ public Double max() { @@ -124,7 +123,7 @@ public Double max() { /** * Get the avg property: Metric value when avg() aggregate function is used over the interval. - * + * * @return the avg value. */ public Double avg() { @@ -133,7 +132,7 @@ public Double avg() { /** * Get the sum property: Metric value when sum() aggregate function is used over the interval. - * + * * @return the sum value. */ public Double sum() { @@ -142,7 +141,7 @@ public Double sum() { /** * Get the stdev property: Metric value when stdev aggregate function is used over the interval. - * + * * @return the stdev value. */ public Double stdev() { @@ -151,9 +150,60 @@ public Double stdev() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryMetricProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryMetricProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the QueryMetricProperties. + */ + public static QueryMetricProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryMetricProperties deserializedQueryMetricProperties = new QueryMetricProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedQueryMetricProperties.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedQueryMetricProperties.displayName = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedQueryMetricProperties.unit = QueryMetricUnitType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedQueryMetricProperties.value = reader.getNullable(JsonReader::getDouble); + } else if ("min".equals(fieldName)) { + deserializedQueryMetricProperties.min = reader.getNullable(JsonReader::getDouble); + } else if ("max".equals(fieldName)) { + deserializedQueryMetricProperties.max = reader.getNullable(JsonReader::getDouble); + } else if ("avg".equals(fieldName)) { + deserializedQueryMetricProperties.avg = reader.getNullable(JsonReader::getDouble); + } else if ("sum".equals(fieldName)) { + deserializedQueryMetricProperties.sum = reader.getNullable(JsonReader::getDouble); + } else if ("stdev".equals(fieldName)) { + deserializedQueryMetricProperties.stdev = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedQueryMetricProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricUnitType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricUnitType.java index 8fc0ab90caa0e..31065be8813b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricUnitType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricUnitType.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The unit of the metric. */ +/** + * The unit of the metric. + */ public final class QueryMetricUnitType extends ExpandableStringEnum { - /** Static value percentage for QueryMetricUnitType. */ + /** + * Static value percentage for QueryMetricUnitType. + */ public static final QueryMetricUnitType PERCENTAGE = fromString("percentage"); - /** Static value KB for QueryMetricUnitType. */ + /** + * Static value KB for QueryMetricUnitType. + */ public static final QueryMetricUnitType KB = fromString("KB"); - /** Static value microseconds for QueryMetricUnitType. */ + /** + * Static value microseconds for QueryMetricUnitType. + */ public static final QueryMetricUnitType MICROSECONDS = fromString("microseconds"); - /** Static value count for QueryMetricUnitType. */ + /** + * Static value count for QueryMetricUnitType. + */ public static final QueryMetricUnitType COUNT = fromString("count"); + /** + * Creates a new instance of QueryMetricUnitType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public QueryMetricUnitType() { + } + /** * Creates or finds a QueryMetricUnitType from its string representation. - * + * * @param name a name to look for. * @return the corresponding QueryMetricUnitType. */ - @JsonCreator public static QueryMetricUnitType fromString(String name) { return fromString(name, QueryMetricUnitType.class); } /** * Gets known QueryMetricUnitType values. - * + * * @return known QueryMetricUnitType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java index 8cb323cc984b6..5df962ddc3a83 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Interval type (length). */ +/** + * Interval type (length). + */ public final class QueryTimeGrainType extends ExpandableStringEnum { - /** Static value PT1H for QueryTimeGrainType. */ + /** + * Static value PT1H for QueryTimeGrainType. + */ public static final QueryTimeGrainType PT1H = fromString("PT1H"); - /** Static value P1D for QueryTimeGrainType. */ + /** + * Static value P1D for QueryTimeGrainType. + */ public static final QueryTimeGrainType P1D = fromString("P1D"); + /** + * Creates a new instance of QueryTimeGrainType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public QueryTimeGrainType() { + } + /** * Creates or finds a QueryTimeGrainType from its string representation. - * + * * @param name a name to look for. * @return the corresponding QueryTimeGrainType. */ - @JsonCreator public static QueryTimeGrainType fromString(String name) { return fromString(name, QueryTimeGrainType.class); } /** * Gets known QueryTimeGrainType values. - * + * * @return known QueryTimeGrainType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java index c09fbcdb76d93..eab3a8cf6c48a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Failover policy of the read-only endpoint for the failover group. */ +/** + * Failover policy of the read-only endpoint for the failover group. + */ public final class ReadOnlyEndpointFailoverPolicy extends ExpandableStringEnum { - /** Static value Disabled for ReadOnlyEndpointFailoverPolicy. */ + /** + * Static value Disabled for ReadOnlyEndpointFailoverPolicy. + */ public static final ReadOnlyEndpointFailoverPolicy DISABLED = fromString("Disabled"); - /** Static value Enabled for ReadOnlyEndpointFailoverPolicy. */ + /** + * Static value Enabled for ReadOnlyEndpointFailoverPolicy. + */ public static final ReadOnlyEndpointFailoverPolicy ENABLED = fromString("Enabled"); + /** + * Creates a new instance of ReadOnlyEndpointFailoverPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadOnlyEndpointFailoverPolicy() { + } + /** * Creates or finds a ReadOnlyEndpointFailoverPolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReadOnlyEndpointFailoverPolicy. */ - @JsonCreator public static ReadOnlyEndpointFailoverPolicy fromString(String name) { return fromString(name, ReadOnlyEndpointFailoverPolicy.class); } /** * Gets known ReadOnlyEndpointFailoverPolicy values. - * + * * @return known ReadOnlyEndpointFailoverPolicy values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java index 89db0f373c7c7..d2b4548041999 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The read scale capability. */ +/** + * The read scale capability. + */ @Fluent -public final class ReadScaleCapability { +public final class ReadScaleCapability implements JsonSerializable { /* * The maximum number of read scale replicas. */ - @JsonProperty(value = "maxNumberOfReplicas", access = JsonProperty.Access.WRITE_ONLY) private Integer maxNumberOfReplicas; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ReadScaleCapability class. */ + /** + * Creates an instance of ReadScaleCapability class. + */ public ReadScaleCapability() { } /** * Get the maxNumberOfReplicas property: The maximum number of read scale replicas. - * + * * @return the maxNumberOfReplicas value. */ public Integer maxNumberOfReplicas() { @@ -43,7 +48,7 @@ public Integer maxNumberOfReplicas() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -52,7 +57,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -61,7 +66,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ReadScaleCapability object itself. */ @@ -72,9 +77,49 @@ public ReadScaleCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReadScaleCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReadScaleCapability if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ReadScaleCapability. + */ + public static ReadScaleCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReadScaleCapability deserializedReadScaleCapability = new ReadScaleCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxNumberOfReplicas".equals(fieldName)) { + deserializedReadScaleCapability.maxNumberOfReplicas = reader.getNullable(JsonReader::getInt); + } else if ("status".equals(fieldName)) { + deserializedReadScaleCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedReadScaleCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReadScaleCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadWriteEndpointFailoverPolicy.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadWriteEndpointFailoverPolicy.java index 114cd78adcc4b..5fc0acf9fae90 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadWriteEndpointFailoverPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadWriteEndpointFailoverPolicy.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * failoverWithDataLossGracePeriodMinutes is required. */ public final class ReadWriteEndpointFailoverPolicy extends ExpandableStringEnum { - /** Static value Manual for ReadWriteEndpointFailoverPolicy. */ + /** + * Static value Manual for ReadWriteEndpointFailoverPolicy. + */ public static final ReadWriteEndpointFailoverPolicy MANUAL = fromString("Manual"); - /** Static value Automatic for ReadWriteEndpointFailoverPolicy. */ + /** + * Static value Automatic for ReadWriteEndpointFailoverPolicy. + */ public static final ReadWriteEndpointFailoverPolicy AUTOMATIC = fromString("Automatic"); + /** + * Creates a new instance of ReadWriteEndpointFailoverPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadWriteEndpointFailoverPolicy() { + } + /** * Creates or finds a ReadWriteEndpointFailoverPolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReadWriteEndpointFailoverPolicy. */ - @JsonCreator public static ReadWriteEndpointFailoverPolicy fromString(String name) { return fromString(name, ReadWriteEndpointFailoverPolicy.class); } /** * Gets known ReadWriteEndpointFailoverPolicy values. - * + * * @return known ReadWriteEndpointFailoverPolicy values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java index 0e60585dd772c..23e95504ad141 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -19,62 +18,98 @@ * recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. */ public final class RecommendedActionCurrentState extends ExpandableStringEnum { - /** Static value Active for RecommendedActionCurrentState. */ + /** + * Static value Active for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState ACTIVE = fromString("Active"); - /** Static value Pending for RecommendedActionCurrentState. */ + /** + * Static value Pending for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState PENDING = fromString("Pending"); - /** Static value Executing for RecommendedActionCurrentState. */ + /** + * Static value Executing for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState EXECUTING = fromString("Executing"); - /** Static value Verifying for RecommendedActionCurrentState. */ + /** + * Static value Verifying for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState VERIFYING = fromString("Verifying"); - /** Static value PendingRevert for RecommendedActionCurrentState. */ + /** + * Static value PendingRevert for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState PENDING_REVERT = fromString("PendingRevert"); - /** Static value RevertCancelled for RecommendedActionCurrentState. */ + /** + * Static value RevertCancelled for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState REVERT_CANCELLED = fromString("RevertCancelled"); - /** Static value Reverting for RecommendedActionCurrentState. */ + /** + * Static value Reverting for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState REVERTING = fromString("Reverting"); - /** Static value Reverted for RecommendedActionCurrentState. */ + /** + * Static value Reverted for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState REVERTED = fromString("Reverted"); - /** Static value Ignored for RecommendedActionCurrentState. */ + /** + * Static value Ignored for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState IGNORED = fromString("Ignored"); - /** Static value Expired for RecommendedActionCurrentState. */ + /** + * Static value Expired for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState EXPIRED = fromString("Expired"); - /** Static value Monitoring for RecommendedActionCurrentState. */ + /** + * Static value Monitoring for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState MONITORING = fromString("Monitoring"); - /** Static value Resolved for RecommendedActionCurrentState. */ + /** + * Static value Resolved for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState RESOLVED = fromString("Resolved"); - /** Static value Success for RecommendedActionCurrentState. */ + /** + * Static value Success for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState SUCCESS = fromString("Success"); - /** Static value Error for RecommendedActionCurrentState. */ + /** + * Static value Error for RecommendedActionCurrentState. + */ public static final RecommendedActionCurrentState ERROR = fromString("Error"); + /** + * Creates a new instance of RecommendedActionCurrentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecommendedActionCurrentState() { + } + /** * Creates or finds a RecommendedActionCurrentState from its string representation. - * + * * @param name a name to look for. * @return the corresponding RecommendedActionCurrentState. */ - @JsonCreator public static RecommendedActionCurrentState fromString(String name) { return fromString(name, RecommendedActionCurrentState.class); } /** * Gets known RecommendedActionCurrentState values. - * + * * @return known RecommendedActionCurrentState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java index 9bcd580dc0e74..ff18a865ffa3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action. */ +/** + * Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action. + */ @Immutable -public final class RecommendedActionErrorInfo { +public final class RecommendedActionErrorInfo implements JsonSerializable { /* * Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private String errorCode; /* * Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No */ - @JsonProperty(value = "isRetryable", access = JsonProperty.Access.WRITE_ONLY) private IsRetryable isRetryable; - /** Creates an instance of RecommendedActionErrorInfo class. */ + /** + * Creates an instance of RecommendedActionErrorInfo class. + */ public RecommendedActionErrorInfo() { } /** * Get the errorCode property: Gets the reason why the recommended action was put to error state. e.g., * DatabaseHasQdsOff, IndexAlreadyExists. - * + * * @return the errorCode value. */ public String errorCode() { @@ -39,7 +45,7 @@ public String errorCode() { /** * Get the isRetryable property: Gets whether the error could be ignored and recommended action could be retried. * Possible values are: Yes/No. - * + * * @return the isRetryable value. */ public IsRetryable isRetryable() { @@ -48,9 +54,46 @@ public IsRetryable isRetryable() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionErrorInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionErrorInfo if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecommendedActionErrorInfo. + */ + public static RecommendedActionErrorInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionErrorInfo deserializedRecommendedActionErrorInfo = new RecommendedActionErrorInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("errorCode".equals(fieldName)) { + deserializedRecommendedActionErrorInfo.errorCode = reader.getString(); + } else if ("isRetryable".equals(fieldName)) { + deserializedRecommendedActionErrorInfo.isRetryable = IsRetryable.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionErrorInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImpactRecord.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImpactRecord.java index 46704f84ce4c3..63836c88e8c17 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImpactRecord.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImpactRecord.java @@ -5,52 +5,53 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic * Pool Recommended Action. */ @Immutable -public final class RecommendedActionImpactRecord { +public final class RecommendedActionImpactRecord implements JsonSerializable { /* * Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. */ - @JsonProperty(value = "dimensionName", access = JsonProperty.Access.WRITE_ONLY) private String dimensionName; /* * Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; /* * Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected */ - @JsonProperty(value = "absoluteValue", access = JsonProperty.Access.WRITE_ONLY) private Double absoluteValue; /* * Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes */ - @JsonProperty(value = "changeValueAbsolute", access = JsonProperty.Access.WRITE_ONLY) private Double changeValueAbsolute; /* * Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage */ - @JsonProperty(value = "changeValueRelative", access = JsonProperty.Access.WRITE_ONLY) private Double changeValueRelative; - /** Creates an instance of RecommendedActionImpactRecord class. */ + /** + * Creates an instance of RecommendedActionImpactRecord class. + */ public RecommendedActionImpactRecord() { } /** * Get the dimensionName property: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, * NumberOfQueriesAffected. - * + * * @return the dimensionName value. */ public String dimensionName() { @@ -60,7 +61,7 @@ public String dimensionName() { /** * Get the unit property: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, * NumberOfQueriesAffected. - * + * * @return the unit value. */ public String unit() { @@ -70,7 +71,7 @@ public String unit() { /** * Get the absoluteValue property: Gets the absolute value of this dimension if applicable. e.g., Number of Queries * affected. - * + * * @return the absoluteValue value. */ public Double absoluteValue() { @@ -80,7 +81,7 @@ public Double absoluteValue() { /** * Get the changeValueAbsolute property: Gets the absolute change in the value of this dimension. e.g., Absolute * Disk space change in Megabytes. - * + * * @return the changeValueAbsolute value. */ public Double changeValueAbsolute() { @@ -90,7 +91,7 @@ public Double changeValueAbsolute() { /** * Get the changeValueRelative property: Gets the relative change in the value of this dimension. e.g., Relative * Disk space change in Percentage. - * + * * @return the changeValueRelative value. */ public Double changeValueRelative() { @@ -99,9 +100,55 @@ public Double changeValueRelative() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionImpactRecord from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionImpactRecord if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecommendedActionImpactRecord. + */ + public static RecommendedActionImpactRecord fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionImpactRecord deserializedRecommendedActionImpactRecord + = new RecommendedActionImpactRecord(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dimensionName".equals(fieldName)) { + deserializedRecommendedActionImpactRecord.dimensionName = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedRecommendedActionImpactRecord.unit = reader.getString(); + } else if ("absoluteValue".equals(fieldName)) { + deserializedRecommendedActionImpactRecord.absoluteValue = reader.getNullable(JsonReader::getDouble); + } else if ("changeValueAbsolute".equals(fieldName)) { + deserializedRecommendedActionImpactRecord.changeValueAbsolute + = reader.getNullable(JsonReader::getDouble); + } else if ("changeValueRelative".equals(fieldName)) { + deserializedRecommendedActionImpactRecord.changeValueRelative + = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionImpactRecord; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImplementationInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImplementationInfo.java index 99950a3f0dd73..ee835bdd1fa68 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImplementationInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImplementationInfo.java @@ -5,33 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action. */ @Immutable -public final class RecommendedActionImplementationInfo { +public final class RecommendedActionImplementationInfo + implements JsonSerializable { /* * Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. */ - @JsonProperty(value = "method", access = JsonProperty.Access.WRITE_ONLY) private ImplementationMethod method; /* * Gets the manual implementation script. e.g., T-SQL script that could be executed on the database. */ - @JsonProperty(value = "script", access = JsonProperty.Access.WRITE_ONLY) private String script; - /** Creates an instance of RecommendedActionImplementationInfo class. */ + /** + * Creates an instance of RecommendedActionImplementationInfo class. + */ public RecommendedActionImplementationInfo() { } /** * Get the method property: Gets the method in which this recommended action can be manually implemented. e.g., * TSql, AzurePowerShell. - * + * * @return the method value. */ public ImplementationMethod method() { @@ -41,7 +46,7 @@ public ImplementationMethod method() { /** * Get the script property: Gets the manual implementation script. e.g., T-SQL script that could be executed on the * database. - * + * * @return the script value. */ public String script() { @@ -50,9 +55,48 @@ public String script() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionImplementationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionImplementationInfo if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecommendedActionImplementationInfo. + */ + public static RecommendedActionImplementationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionImplementationInfo deserializedRecommendedActionImplementationInfo + = new RecommendedActionImplementationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("method".equals(fieldName)) { + deserializedRecommendedActionImplementationInfo.method + = ImplementationMethod.fromString(reader.getString()); + } else if ("script".equals(fieldName)) { + deserializedRecommendedActionImplementationInfo.script = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionImplementationInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionInitiatedBy.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionInitiatedBy.java index d1e808e77d140..25045db6847dc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionInitiatedBy.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionInitiatedBy.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets if approval for applying this recommended action was given by user/system. */ +/** + * Gets if approval for applying this recommended action was given by user/system. + */ public enum RecommendedActionInitiatedBy { - /** Enum value User. */ + /** + * Enum value User. + */ USER("User"), - /** Enum value System. */ + /** + * Enum value System. + */ SYSTEM("System"); - /** The actual serialized value for a RecommendedActionInitiatedBy instance. */ + /** + * The actual serialized value for a RecommendedActionInitiatedBy instance. + */ private final String value; RecommendedActionInitiatedBy(String value) { @@ -24,11 +29,10 @@ public enum RecommendedActionInitiatedBy { /** * Parses a serialized value to a RecommendedActionInitiatedBy instance. - * + * * @param value the serialized value to parse. * @return the parsed RecommendedActionInitiatedBy object, or null if unable to parse. */ - @JsonCreator public static RecommendedActionInitiatedBy fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static RecommendedActionInitiatedBy fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionMetricInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionMetricInfo.java index ba762b640b2e2..addde9a624667 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionMetricInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionMetricInfo.java @@ -5,7 +5,12 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** @@ -13,44 +18,41 @@ * Action. */ @Immutable -public final class RecommendedActionMetricInfo { +public final class RecommendedActionMetricInfo implements JsonSerializable { /* * Gets the name of the metric. e.g., CPU, Number of Queries. */ - @JsonProperty(value = "metricName", access = JsonProperty.Access.WRITE_ONLY) private String metricName; /* * Gets the unit in which metric is measured. e.g., DTU, Frequency */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private String unit; /* * Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour) */ - @JsonProperty(value = "timeGrain", access = JsonProperty.Access.WRITE_ONLY) private String timeGrain; /* * Gets the start time of time interval given by this MetricInfo. */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startTime; /* * Gets the value of the metric in the time interval given by this MetricInfo. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private Double value; - /** Creates an instance of RecommendedActionMetricInfo class. */ + /** + * Creates an instance of RecommendedActionMetricInfo class. + */ public RecommendedActionMetricInfo() { } /** * Get the metricName property: Gets the name of the metric. e.g., CPU, Number of Queries. - * + * * @return the metricName value. */ public String metricName() { @@ -59,7 +61,7 @@ public String metricName() { /** * Get the unit property: Gets the unit in which metric is measured. e.g., DTU, Frequency. - * + * * @return the unit value. */ public String unit() { @@ -69,7 +71,7 @@ public String unit() { /** * Get the timeGrain property: Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H * (1 hour). - * + * * @return the timeGrain value. */ public String timeGrain() { @@ -78,7 +80,7 @@ public String timeGrain() { /** * Get the startTime property: Gets the start time of time interval given by this MetricInfo. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -87,7 +89,7 @@ public OffsetDateTime startTime() { /** * Get the value property: Gets the value of the metric in the time interval given by this MetricInfo. - * + * * @return the value value. */ public Double value() { @@ -96,9 +98,53 @@ public Double value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionMetricInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionMetricInfo if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecommendedActionMetricInfo. + */ + public static RecommendedActionMetricInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionMetricInfo deserializedRecommendedActionMetricInfo = new RecommendedActionMetricInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("metricName".equals(fieldName)) { + deserializedRecommendedActionMetricInfo.metricName = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedRecommendedActionMetricInfo.unit = reader.getString(); + } else if ("timeGrain".equals(fieldName)) { + deserializedRecommendedActionMetricInfo.timeGrain = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedRecommendedActionMetricInfo.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("value".equals(fieldName)) { + deserializedRecommendedActionMetricInfo.value = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionMetricInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionStateInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionStateInfo.java index c6ba41be3bedb..7d76911182b9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionStateInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionStateInfo.java @@ -5,42 +5,47 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; -/** Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action. */ +/** + * Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action. + */ @Fluent -public final class RecommendedActionStateInfo { +public final class RecommendedActionStateInfo implements JsonSerializable { /* - * Current state the recommended action is in. Some commonly used states are: Active -> recommended action is - * active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting - * execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended - * action was applied and is being verified of its usefulness by the system. Success -> recommended action was - * applied and improvement found during verification. Pending Revert -> verification found little or no - * improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes - * made while applying recommended action are being reverted on the user database. Reverted -> successfully - * reverted the changes made by recommended action on user database. Ignored -> user explicitly - * ignored/discarded the recommended action. + * Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active + * and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. + * Executing -> recommended action is being applied on the user database. Verifying -> recommended action was + * applied and is being verified of its usefulness by the system. Success -> recommended action was applied and + * improvement found during verification. Pending Revert -> verification found little or no improvement so + * recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying + * recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by + * recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. */ - @JsonProperty(value = "currentValue", required = true) private RecommendedActionCurrentState currentValue; /* - * Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity - * notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to + * Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity + * notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to * 'Enabled', in which case the system applied it. */ - @JsonProperty(value = "actionInitiatedBy", access = JsonProperty.Access.WRITE_ONLY) private RecommendedActionInitiatedBy actionInitiatedBy; /* * Gets the time when the state was last modified */ - @JsonProperty(value = "lastModified", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModified; - /** Creates an instance of RecommendedActionStateInfo class. */ + /** + * Creates an instance of RecommendedActionStateInfo class. + */ public RecommendedActionStateInfo() { } @@ -54,7 +59,7 @@ public RecommendedActionStateInfo() { * Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted * -> successfully reverted the changes made by recommended action on user database. Ignored -> user * explicitly ignored/discarded the recommended action. - * + * * @return the currentValue value. */ public RecommendedActionCurrentState currentValue() { @@ -71,7 +76,7 @@ public RecommendedActionCurrentState currentValue() { * Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted * -> successfully reverted the changes made by recommended action on user database. Ignored -> user * explicitly ignored/discarded the recommended action. - * + * * @param currentValue the currentValue value to set. * @return the RecommendedActionStateInfo object itself. */ @@ -84,7 +89,7 @@ public RecommendedActionStateInfo withCurrentValue(RecommendedActionCurrentState * Get the actionInitiatedBy property: Gets who initiated the execution of this recommended action. Possible Value * are: User -> When user explicity notified system to apply the recommended action. System -> When * auto-execute status of this advisor was set to 'Enabled', in which case the system applied it. - * + * * @return the actionInitiatedBy value. */ public RecommendedActionInitiatedBy actionInitiatedBy() { @@ -93,7 +98,7 @@ public RecommendedActionInitiatedBy actionInitiatedBy() { /** * Get the lastModified property: Gets the time when the state was last modified. - * + * * @return the lastModified value. */ public OffsetDateTime lastModified() { @@ -102,17 +107,60 @@ public OffsetDateTime lastModified() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (currentValue() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property currentValue in model RecommendedActionStateInfo")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property currentValue in model RecommendedActionStateInfo")); } } private static final ClientLogger LOGGER = new ClientLogger(RecommendedActionStateInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("currentValue", this.currentValue == null ? null : this.currentValue.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedActionStateInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedActionStateInfo if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecommendedActionStateInfo. + */ + public static RecommendedActionStateInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedActionStateInfo deserializedRecommendedActionStateInfo = new RecommendedActionStateInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("currentValue".equals(fieldName)) { + deserializedRecommendedActionStateInfo.currentValue + = RecommendedActionCurrentState.fromString(reader.getString()); + } else if ("actionInitiatedBy".equals(fieldName)) { + deserializedRecommendedActionStateInfo.actionInitiatedBy + = RecommendedActionInitiatedBy.fromString(reader.getString()); + } else if ("lastModified".equals(fieldName)) { + deserializedRecommendedActionStateInfo.lastModified = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedActionStateInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdate.java index 0a2bebf11b750..a6ab78a17d755 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdate.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RecommendedSensitivityLabelUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A recommended sensitivity label update operation. */ +/** + * A recommended sensitivity label update operation. + */ @Fluent public final class RecommendedSensitivityLabelUpdate extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private RecommendedSensitivityLabelUpdateProperties innerProperties; - /** Creates an instance of RecommendedSensitivityLabelUpdate class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RecommendedSensitivityLabelUpdate class. + */ public RecommendedSensitivityLabelUpdate() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private RecommendedSensitivityLabelUpdateProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the op property: The op property. - * + * * @return the op value. */ public RecommendedSensitivityLabelUpdateKind op() { @@ -42,7 +93,7 @@ public RecommendedSensitivityLabelUpdateKind op() { /** * Set the op property: The op property. - * + * * @param op the op value to set. * @return the RecommendedSensitivityLabelUpdate object itself. */ @@ -56,7 +107,7 @@ public RecommendedSensitivityLabelUpdate withOp(RecommendedSensitivityLabelUpdat /** * Get the schema property: Schema name of the column to update. - * + * * @return the schema value. */ public String schema() { @@ -65,7 +116,7 @@ public String schema() { /** * Set the schema property: Schema name of the column to update. - * + * * @param schema the schema value to set. * @return the RecommendedSensitivityLabelUpdate object itself. */ @@ -79,7 +130,7 @@ public RecommendedSensitivityLabelUpdate withSchema(String schema) { /** * Get the table property: Table name of the column to update. - * + * * @return the table value. */ public String table() { @@ -88,7 +139,7 @@ public String table() { /** * Set the table property: Table name of the column to update. - * + * * @param table the table value to set. * @return the RecommendedSensitivityLabelUpdate object itself. */ @@ -102,7 +153,7 @@ public RecommendedSensitivityLabelUpdate withTable(String table) { /** * Get the column property: Column name to update. - * + * * @return the column value. */ public String column() { @@ -111,7 +162,7 @@ public String column() { /** * Set the column property: Column name to update. - * + * * @param column the column value to set. * @return the RecommendedSensitivityLabelUpdate object itself. */ @@ -125,7 +176,7 @@ public RecommendedSensitivityLabelUpdate withColumn(String column) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -133,4 +184,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedSensitivityLabelUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedSensitivityLabelUpdate if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecommendedSensitivityLabelUpdate. + */ + public static RecommendedSensitivityLabelUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedSensitivityLabelUpdate deserializedRecommendedSensitivityLabelUpdate + = new RecommendedSensitivityLabelUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdate.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRecommendedSensitivityLabelUpdate.innerProperties + = RecommendedSensitivityLabelUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedSensitivityLabelUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateKind.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateKind.java index 7062dc90ea931..07c0170f347b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateKind.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateKind.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for RecommendedSensitivityLabelUpdateKind. */ +/** + * Defines values for RecommendedSensitivityLabelUpdateKind. + */ public enum RecommendedSensitivityLabelUpdateKind { - /** Enum value enable. */ + /** + * Enum value enable. + */ ENABLE("enable"), - /** Enum value disable. */ + /** + * Enum value disable. + */ DISABLE("disable"); - /** The actual serialized value for a RecommendedSensitivityLabelUpdateKind instance. */ + /** + * The actual serialized value for a RecommendedSensitivityLabelUpdateKind instance. + */ private final String value; RecommendedSensitivityLabelUpdateKind(String value) { @@ -24,11 +29,10 @@ public enum RecommendedSensitivityLabelUpdateKind { /** * Parses a serialized value to a RecommendedSensitivityLabelUpdateKind instance. - * + * * @param value the serialized value to parse. * @return the parsed RecommendedSensitivityLabelUpdateKind object, or null if unable to parse. */ - @JsonCreator public static RecommendedSensitivityLabelUpdateKind fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static RecommendedSensitivityLabelUpdateKind fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateList.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateList.java index 2f9aaaa9807c7..195a5406a34c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateList.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateList.java @@ -5,25 +5,33 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** A list of recommended sensitivity label update operations. */ +/** + * A list of recommended sensitivity label update operations. + */ @Fluent -public final class RecommendedSensitivityLabelUpdateList { +public final class RecommendedSensitivityLabelUpdateList + implements JsonSerializable { /* * The operations property. */ - @JsonProperty(value = "operations") private List operations; - /** Creates an instance of RecommendedSensitivityLabelUpdateList class. */ + /** + * Creates an instance of RecommendedSensitivityLabelUpdateList class. + */ public RecommendedSensitivityLabelUpdateList() { } /** * Get the operations property: The operations property. - * + * * @return the operations value. */ public List operations() { @@ -32,7 +40,7 @@ public List operations() { /** * Set the operations property: The operations property. - * + * * @param operations the operations value to set. * @return the RecommendedSensitivityLabelUpdateList object itself. */ @@ -43,7 +51,7 @@ public RecommendedSensitivityLabelUpdateList withOperations(List e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecommendedSensitivityLabelUpdateList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecommendedSensitivityLabelUpdateList if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecommendedSensitivityLabelUpdateList. + */ + public static RecommendedSensitivityLabelUpdateList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecommendedSensitivityLabelUpdateList deserializedRecommendedSensitivityLabelUpdateList + = new RecommendedSensitivityLabelUpdateList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> RecommendedSensitivityLabelUpdate.fromJson(reader1)); + deserializedRecommendedSensitivityLabelUpdateList.operations = operations; + } else { + reader.skipChildren(); + } + } + + return deserializedRecommendedSensitivityLabelUpdateList; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableDatabaseListResult.java index acb3d6393bbf9..27ac04141bc02 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableDatabaseListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RecoverableDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of recoverable databases. */ +/** + * A list of recoverable databases. + */ @Immutable -public final class RecoverableDatabaseListResult { +public final class RecoverableDatabaseListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RecoverableDatabaseListResult class. */ + /** + * Creates an instance of RecoverableDatabaseListResult class. + */ public RecoverableDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableDatabaseListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecoverableDatabaseListResult. + */ + public static RecoverableDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableDatabaseListResult deserializedRecoverableDatabaseListResult + = new RecoverableDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RecoverableDatabaseInner.fromJson(reader1)); + deserializedRecoverableDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRecoverableDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java index 65c541c62ba90..a4f326b087f31 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RecoverableManagedDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of recoverable managed databases. */ +/** + * A list of recoverable managed databases. + */ @Immutable -public final class RecoverableManagedDatabaseListResult { +public final class RecoverableManagedDatabaseListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RecoverableManagedDatabaseListResult class. */ + /** + * Creates an instance of RecoverableManagedDatabaseListResult class. + */ public RecoverableManagedDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableManagedDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableManagedDatabaseListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecoverableManagedDatabaseListResult. + */ + public static RecoverableManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableManagedDatabaseListResult deserializedRecoverableManagedDatabaseListResult + = new RecoverableManagedDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RecoverableManagedDatabaseInner.fromJson(reader1)); + deserializedRecoverableManagedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRecoverableManagedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableManagedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java index 31816630a6f9e..32402d7383362 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReplicaType. */ +/** + * Defines values for ReplicaType. + */ public final class ReplicaType extends ExpandableStringEnum { - /** Static value Primary for ReplicaType. */ + /** + * Static value Primary for ReplicaType. + */ public static final ReplicaType PRIMARY = fromString("Primary"); - /** Static value ReadableSecondary for ReplicaType. */ + /** + * Static value ReadableSecondary for ReplicaType. + */ public static final ReplicaType READABLE_SECONDARY = fromString("ReadableSecondary"); + /** + * Creates a new instance of ReplicaType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReplicaType() { + } + /** * Creates or finds a ReplicaType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReplicaType. */ - @JsonCreator public static ReplicaType fromString(String name) { return fromString(name, ReplicaType.class); } /** * Gets known ReplicaType values. - * + * * @return known ReplicaType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java index 61275dce8d060..2d80e160ee369 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ReplicationLinkInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of replication links. */ +/** + * A list of replication links. + */ @Immutable -public final class ReplicationLinkListResult { +public final class ReplicationLinkListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ReplicationLinkListResult class. */ + /** + * Creates an instance of ReplicationLinkListResult class. + */ public ReplicationLinkListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationLinkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationLinkListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationLinkListResult. + */ + public static ReplicationLinkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationLinkListResult deserializedReplicationLinkListResult = new ReplicationLinkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ReplicationLinkInner.fromJson(reader1)); + deserializedReplicationLinkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedReplicationLinkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationLinkListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java index 72edc38ac9afd..848c5a6616cbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Link type (GEO, NAMED, STANDBY). */ +/** + * Link type (GEO, NAMED, STANDBY). + */ public final class ReplicationLinkType extends ExpandableStringEnum { - /** Static value GEO for ReplicationLinkType. */ + /** + * Static value GEO for ReplicationLinkType. + */ public static final ReplicationLinkType GEO = fromString("GEO"); - /** Static value NAMED for ReplicationLinkType. */ + /** + * Static value NAMED for ReplicationLinkType. + */ public static final ReplicationLinkType NAMED = fromString("NAMED"); - /** Static value STANDBY for ReplicationLinkType. */ + /** + * Static value STANDBY for ReplicationLinkType. + */ public static final ReplicationLinkType STANDBY = fromString("STANDBY"); + /** + * Creates a new instance of ReplicationLinkType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReplicationLinkType() { + } + /** * Creates or finds a ReplicationLinkType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReplicationLinkType. */ - @JsonCreator public static ReplicationLinkType fromString(String name) { return fromString(name, ReplicationLinkType.class); } /** * Gets known ReplicationLinkType values. - * + * * @return known ReplicationLinkType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java index a9b67deb6a81e..04e2e5184d00c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The replication mode of a distributed availability group. Parameter will be ignored during link creation. */ +/** + * The replication mode of a distributed availability group. Parameter will be ignored during link creation. + */ public final class ReplicationMode extends ExpandableStringEnum { - /** Static value Async for ReplicationMode. */ + /** + * Static value Async for ReplicationMode. + */ public static final ReplicationMode ASYNC = fromString("Async"); - /** Static value Sync for ReplicationMode. */ + /** + * Static value Sync for ReplicationMode. + */ public static final ReplicationMode SYNC = fromString("Sync"); + /** + * Creates a new instance of ReplicationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReplicationMode() { + } + /** * Creates or finds a ReplicationMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReplicationMode. */ - @JsonCreator public static ReplicationMode fromString(String name) { return fromString(name, ReplicationMode.class); } /** * Gets known ReplicationMode values. - * + * * @return known ReplicationMode values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java index 320c9e8844642..0161ba528e732 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java @@ -4,27 +4,38 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Local replication role. */ +/** + * Local replication role. + */ public enum ReplicationRole { - /** Enum value Primary. */ + /** + * Enum value Primary. + */ PRIMARY("Primary"), - /** Enum value Secondary. */ + /** + * Enum value Secondary. + */ SECONDARY("Secondary"), - /** Enum value NonReadableSecondary. */ + /** + * Enum value NonReadableSecondary. + */ NON_READABLE_SECONDARY("NonReadableSecondary"), - /** Enum value Source. */ + /** + * Enum value Source. + */ SOURCE("Source"), - /** Enum value Copy. */ + /** + * Enum value Copy. + */ COPY("Copy"); - /** The actual serialized value for a ReplicationRole instance. */ + /** + * The actual serialized value for a ReplicationRole instance. + */ private final String value; ReplicationRole(String value) { @@ -33,11 +44,10 @@ public enum ReplicationRole { /** * Parses a serialized value to a ReplicationRole instance. - * + * * @param value the serialized value to parse. * @return the parsed ReplicationRole object, or null if unable to parse. */ - @JsonCreator public static ReplicationRole fromString(String value) { if (value == null) { return null; @@ -51,8 +61,9 @@ public static ReplicationRole fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java index 8ce9724c99bef..9ddf5029e717f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). */ +/** + * Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + */ public final class ReplicationState extends ExpandableStringEnum { - /** Static value PENDING for ReplicationState. */ + /** + * Static value PENDING for ReplicationState. + */ public static final ReplicationState PENDING = fromString("PENDING"); - /** Static value SEEDING for ReplicationState. */ + /** + * Static value SEEDING for ReplicationState. + */ public static final ReplicationState SEEDING = fromString("SEEDING"); - /** Static value CATCH_UP for ReplicationState. */ + /** + * Static value CATCH_UP for ReplicationState. + */ public static final ReplicationState CATCH_UP = fromString("CATCH_UP"); - /** Static value SUSPENDED for ReplicationState. */ + /** + * Static value SUSPENDED for ReplicationState. + */ public static final ReplicationState SUSPENDED = fromString("SUSPENDED"); + /** + * Creates a new instance of ReplicationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReplicationState() { + } + /** * Creates or finds a ReplicationState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReplicationState. */ - @JsonCreator public static ReplicationState fromString(String name) { return fromString(name, ReplicationState.class); } /** * Gets known ReplicationState values. - * + * * @return known ReplicationState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java index 5ec91c6be397c..59110061e68d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java @@ -5,47 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; import java.util.UUID; -/** Azure Active Directory identity configuration for a resource. */ +/** + * Azure Active Directory identity configuration for a resource. + */ @Fluent -public class ResourceIdentity { +public final class ResourceIdentity implements JsonSerializable { /* * The resource ids of the user assigned identities to use */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /* * The Azure Active Directory principal id. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active * Directory principal for the resource. */ - @JsonProperty(value = "type") private IdentityType type; /* * The Azure Active Directory tenant id. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; - /** Creates an instance of ResourceIdentity class. */ + /** + * Creates an instance of ResourceIdentity class. + */ public ResourceIdentity() { } /** * Get the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -54,7 +56,7 @@ public Map userAssignedIdentities() { /** * Set the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ResourceIdentity object itself. */ @@ -65,7 +67,7 @@ public ResourceIdentity withUserAssignedIdentities(Map use /** * Get the principalId property: The Azure Active Directory principal id. - * + * * @return the principalId value. */ public UUID principalId() { @@ -75,7 +77,7 @@ public UUID principalId() { /** * Get the type property: The identity type. Set this to 'SystemAssigned' in order to automatically create and * assign an Azure Active Directory principal for the resource. - * + * * @return the type value. */ public IdentityType type() { @@ -85,7 +87,7 @@ public IdentityType type() { /** * Set the type property: The identity type. Set this to 'SystemAssigned' in order to automatically create and * assign an Azure Active Directory principal for the resource. - * + * * @param type the type value to set. * @return the ResourceIdentity object itself. */ @@ -96,7 +98,7 @@ public ResourceIdentity withType(IdentityType type) { /** * Get the tenantId property: The Azure Active Directory tenant id. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -105,19 +107,64 @@ public UUID tenantId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceIdentity. + */ + public static ResourceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceIdentity deserializedResourceIdentity = new ResourceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserIdentity.fromJson(reader1)); + deserializedResourceIdentity.userAssignedIdentities = userAssignedIdentities; + } else if ("principalId".equals(fieldName)) { + deserializedResourceIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("type".equals(fieldName)) { + deserializedResourceIdentity.type = IdentityType.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedResourceIdentity.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceIdentity; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java index 1a763b265142e..537552069d3fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java @@ -6,24 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Contains the information necessary to perform a resource move (rename). */ +/** + * Contains the information necessary to perform a resource move (rename). + */ @Fluent -public final class ResourceMoveDefinition { +public final class ResourceMoveDefinition implements JsonSerializable { /* * The target ID for the resource */ - @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of ResourceMoveDefinition class. */ + /** + * Creates an instance of ResourceMoveDefinition class. + */ public ResourceMoveDefinition() { } /** * Get the id property: The target ID for the resource. - * + * * @return the id value. */ public String id() { @@ -32,7 +39,7 @@ public String id() { /** * Set the id property: The target ID for the resource. - * + * * @param id the id value to set. * @return the ResourceMoveDefinition object itself. */ @@ -43,16 +50,52 @@ public ResourceMoveDefinition withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model ResourceMoveDefinition")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model ResourceMoveDefinition")); } } private static final ClientLogger LOGGER = new ClientLogger(ResourceMoveDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceMoveDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceMoveDefinition if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceMoveDefinition. + */ + public static ResourceMoveDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceMoveDefinition deserializedResourceMoveDefinition = new ResourceMoveDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceMoveDefinition.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceMoveDefinition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java index 73710380a1d2a..c4c03ec4671a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java @@ -6,24 +6,40 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** ARM resource. */ +/** + * ARM resource. + */ @Fluent public class ResourceWithWritableName extends ProxyResource { /* * Resource name. */ - @JsonProperty(value = "name") private String name; - /** Creates an instance of ResourceWithWritableName class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ResourceWithWritableName class. + */ public ResourceWithWritableName() { } /** * Get the name property: Resource name. - * + * * @return the name value. */ public String name() { @@ -32,7 +48,7 @@ public String name() { /** * Set the name property: Resource name. - * + * * @param name the name value to set. * @return the ResourceWithWritableName object itself. */ @@ -41,11 +57,72 @@ public ResourceWithWritableName withName(String name) { return this; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceWithWritableName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceWithWritableName if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceWithWritableName. + */ + public static ResourceWithWritableName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceWithWritableName deserializedResourceWithWritableName = new ResourceWithWritableName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedResourceWithWritableName.id = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourceWithWritableName.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceWithWritableName.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceWithWritableName; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java index b289e0328912c..126c7a3b0ae24 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RestorableDroppedDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of restorable dropped databases. */ +/** + * A list of restorable dropped databases. + */ @Immutable -public final class RestorableDroppedDatabaseListResult { +public final class RestorableDroppedDatabaseListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RestorableDroppedDatabaseListResult class. */ + /** + * Creates an instance of RestorableDroppedDatabaseListResult class. + */ public RestorableDroppedDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedDatabaseListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorableDroppedDatabaseListResult. + */ + public static RestorableDroppedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedDatabaseListResult deserializedRestorableDroppedDatabaseListResult + = new RestorableDroppedDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RestorableDroppedDatabaseInner.fromJson(reader1)); + deserializedRestorableDroppedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRestorableDroppedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java index 80cd9d8302306..2fe628b59e10d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RestorableDroppedManagedDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of restorable dropped managed databases. */ +/** + * A list of restorable dropped managed databases. + */ @Immutable -public final class RestorableDroppedManagedDatabaseListResult { +public final class RestorableDroppedManagedDatabaseListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RestorableDroppedManagedDatabaseListResult class. */ + /** + * Creates an instance of RestorableDroppedManagedDatabaseListResult class. + */ public RestorableDroppedManagedDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorableDroppedManagedDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorableDroppedManagedDatabaseListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorableDroppedManagedDatabaseListResult. + */ + public static RestorableDroppedManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorableDroppedManagedDatabaseListResult deserializedRestorableDroppedManagedDatabaseListResult + = new RestorableDroppedManagedDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RestorableDroppedManagedDatabaseInner.fromJson(reader1)); + deserializedRestorableDroppedManagedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRestorableDroppedManagedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorableDroppedManagedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java index c8351249b6650..0e14df247ffac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RestoreDetailsName. */ +/** + * Defines values for RestoreDetailsName. + */ public final class RestoreDetailsName extends ExpandableStringEnum { - /** Static value Default for RestoreDetailsName. */ + /** + * Static value Default for RestoreDetailsName. + */ public static final RestoreDetailsName DEFAULT = fromString("Default"); + /** + * Creates a new instance of RestoreDetailsName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RestoreDetailsName() { + } + /** * Creates or finds a RestoreDetailsName from its string representation. - * + * * @param name a name to look for. * @return the corresponding RestoreDetailsName. */ - @JsonCreator public static RestoreDetailsName fromString(String name) { return fromString(name, RestoreDetailsName.class); } /** * Gets known RestoreDetailsName values. - * + * * @return known RestoreDetailsName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java index 1945161814a81..eb69183dd9e7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.RestorePointInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of long term retention backups. */ +/** + * A list of long term retention backups. + */ @Immutable -public final class RestorePointListResult { +public final class RestorePointListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RestorePointListResult class. */ + /** + * Creates an instance of RestorePointListResult class. + */ public RestorePointListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestorePointListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestorePointListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RestorePointListResult. + */ + public static RestorePointListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestorePointListResult deserializedRestorePointListResult = new RestorePointListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> RestorePointInner.fromJson(reader1)); + deserializedRestorePointListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRestorePointListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestorePointListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java index 2696811aca773..dd2fa79a190d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The type of restore point. */ +/** + * The type of restore point. + */ public enum RestorePointType { - /** Enum value CONTINUOUS. */ + /** + * Enum value CONTINUOUS. + */ CONTINUOUS("CONTINUOUS"), - /** Enum value DISCRETE. */ + /** + * Enum value DISCRETE. + */ DISCRETE("DISCRETE"); - /** The actual serialized value for a RestorePointType instance. */ + /** + * The actual serialized value for a RestorePointType instance. + */ private final String value; RestorePointType(String value) { @@ -24,11 +29,10 @@ public enum RestorePointType { /** * Parses a serialized value to a RestorePointType instance. - * + * * @param value the serialized value to parse. * @return the parsed RestorePointType object, or null if unable to parse. */ - @JsonCreator public static RestorePointType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static RestorePointType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java index 8f8428b6d66e0..33d5f26f6f2d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The name of the sample schema to apply when creating this database. */ +/** + * The name of the sample schema to apply when creating this database. + */ public final class SampleName extends ExpandableStringEnum { - /** Static value AdventureWorksLT for SampleName. */ + /** + * Static value AdventureWorksLT for SampleName. + */ public static final SampleName ADVENTURE_WORKS_LT = fromString("AdventureWorksLT"); - /** Static value WideWorldImportersStd for SampleName. */ + /** + * Static value WideWorldImportersStd for SampleName. + */ public static final SampleName WIDE_WORLD_IMPORTERS_STD = fromString("WideWorldImportersStd"); - /** Static value WideWorldImportersFull for SampleName. */ + /** + * Static value WideWorldImportersFull for SampleName. + */ public static final SampleName WIDE_WORLD_IMPORTERS_FULL = fromString("WideWorldImportersFull"); + /** + * Creates a new instance of SampleName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SampleName() { + } + /** * Creates or finds a SampleName from its string representation. - * + * * @param name a name to look for. * @return the corresponding SampleName. */ - @JsonCreator public static SampleName fromString(String name) { return fromString(name, SampleName.class); } /** * Gets known SampleName values. - * + * * @return known SampleName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java index e65ebd3951765..4bb6a365410c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ +/** + * The secondary type of the database if it is a secondary. Valid values are Geo and Named. + */ public final class SecondaryType extends ExpandableStringEnum { - /** Static value Geo for SecondaryType. */ + /** + * Static value Geo for SecondaryType. + */ public static final SecondaryType GEO = fromString("Geo"); - /** Static value Named for SecondaryType. */ + /** + * Static value Named for SecondaryType. + */ public static final SecondaryType NAMED = fromString("Named"); + /** + * Creates a new instance of SecondaryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecondaryType() { + } + /** * Creates or finds a SecondaryType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecondaryType. */ - @JsonCreator public static SecondaryType fromString(String name) { return fromString(name, SecondaryType.class); } /** * Gets known SecondaryType values. - * + * * @return known SecondaryType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java index 54ad09f704d25..2c32a83e125b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SecurityAlertPolicyName. */ +/** + * Defines values for SecurityAlertPolicyName. + */ public final class SecurityAlertPolicyName extends ExpandableStringEnum { - /** Static value default for SecurityAlertPolicyName. */ + /** + * Static value default for SecurityAlertPolicyName. + */ public static final SecurityAlertPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of SecurityAlertPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityAlertPolicyName() { + } + /** * Creates or finds a SecurityAlertPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecurityAlertPolicyName. */ - @JsonCreator public static SecurityAlertPolicyName fromString(String name) { return fromString(name, SecurityAlertPolicyName.class); } /** * Gets known SecurityAlertPolicyName values. - * + * * @return known SecurityAlertPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java index c18a054c664db..ff190f7efb7a3 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java @@ -5,29 +5,40 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SecurityAlertPolicyNameAutoGenerated. */ +/** + * Defines values for SecurityAlertPolicyNameAutoGenerated. + */ public final class SecurityAlertPolicyNameAutoGenerated extends ExpandableStringEnum { - /** Static value Default for SecurityAlertPolicyNameAutoGenerated. */ + /** + * Static value Default for SecurityAlertPolicyNameAutoGenerated. + */ public static final SecurityAlertPolicyNameAutoGenerated DEFAULT = fromString("Default"); + /** + * Creates a new instance of SecurityAlertPolicyNameAutoGenerated value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityAlertPolicyNameAutoGenerated() { + } + /** * Creates or finds a SecurityAlertPolicyNameAutoGenerated from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecurityAlertPolicyNameAutoGenerated. */ - @JsonCreator public static SecurityAlertPolicyNameAutoGenerated fromString(String name) { return fromString(name, SecurityAlertPolicyNameAutoGenerated.class); } /** * Gets known SecurityAlertPolicyNameAutoGenerated values. - * + * * @return known SecurityAlertPolicyNameAutoGenerated values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java index 4e090745fdcea..12bdc8f78ae20 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java @@ -4,21 +4,24 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the * specific database. */ public enum SecurityAlertPolicyState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a SecurityAlertPolicyState instance. */ + /** + * The actual serialized value for a SecurityAlertPolicyState instance. + */ private final String value; SecurityAlertPolicyState(String value) { @@ -27,11 +30,10 @@ public enum SecurityAlertPolicyState { /** * Parses a serialized value to a SecurityAlertPolicyState instance. - * + * * @param value the serialized value to parse. * @return the parsed SecurityAlertPolicyState object, or null if unable to parse. */ - @JsonCreator public static SecurityAlertPolicyState fromString(String value) { if (value == null) { return null; @@ -45,8 +47,9 @@ public static SecurityAlertPolicyState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java index 2c72df58399eb..ce4ba82e2e25e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SecurityEventInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of security events. */ +/** + * A list of security events. + */ @Immutable -public final class SecurityEventCollection { +public final class SecurityEventCollection implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SecurityEventCollection class. */ + /** + * Creates an instance of SecurityEventCollection class. + */ public SecurityEventCollection() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityEventCollection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityEventCollection if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecurityEventCollection. + */ + public static SecurityEventCollection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityEventCollection deserializedSecurityEventCollection = new SecurityEventCollection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SecurityEventInner.fromJson(reader1)); + deserializedSecurityEventCollection.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSecurityEventCollection.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityEventCollection; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java index 3a0228bd87bc8..052d78cb1f0ff 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java @@ -5,60 +5,62 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a security event sql injection additional properties. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a security event sql injection additional properties. + */ @Immutable -public final class SecurityEventSqlInjectionAdditionalProperties { +public final class SecurityEventSqlInjectionAdditionalProperties + implements JsonSerializable { /* * The threat ID. */ - @JsonProperty(value = "threatId", access = JsonProperty.Access.WRITE_ONLY) private String threatId; /* * The statement */ - @JsonProperty(value = "statement", access = JsonProperty.Access.WRITE_ONLY) private String statement; /* * The statement highlight offset */ - @JsonProperty(value = "statementHighlightOffset", access = JsonProperty.Access.WRITE_ONLY) private Integer statementHighlightOffset; /* * The statement highlight length */ - @JsonProperty(value = "statementHighlightLength", access = JsonProperty.Access.WRITE_ONLY) private Integer statementHighlightLength; /* * The sql error code */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) private Integer errorCode; /* * The sql error severity */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) private Integer errorSeverity; /* * The sql error message */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; - /** Creates an instance of SecurityEventSqlInjectionAdditionalProperties class. */ + /** + * Creates an instance of SecurityEventSqlInjectionAdditionalProperties class. + */ public SecurityEventSqlInjectionAdditionalProperties() { } /** * Get the threatId property: The threat ID. - * + * * @return the threatId value. */ public String threatId() { @@ -67,7 +69,7 @@ public String threatId() { /** * Get the statement property: The statement. - * + * * @return the statement value. */ public String statement() { @@ -76,7 +78,7 @@ public String statement() { /** * Get the statementHighlightOffset property: The statement highlight offset. - * + * * @return the statementHighlightOffset value. */ public Integer statementHighlightOffset() { @@ -85,7 +87,7 @@ public Integer statementHighlightOffset() { /** * Get the statementHighlightLength property: The statement highlight length. - * + * * @return the statementHighlightLength value. */ public Integer statementHighlightLength() { @@ -94,7 +96,7 @@ public Integer statementHighlightLength() { /** * Get the errorCode property: The sql error code. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -103,7 +105,7 @@ public Integer errorCode() { /** * Get the errorSeverity property: The sql error severity. - * + * * @return the errorSeverity value. */ public Integer errorSeverity() { @@ -112,7 +114,7 @@ public Integer errorSeverity() { /** * Get the errorMessage property: The sql error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -121,9 +123,61 @@ public String errorMessage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityEventSqlInjectionAdditionalProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityEventSqlInjectionAdditionalProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecurityEventSqlInjectionAdditionalProperties. + */ + public static SecurityEventSqlInjectionAdditionalProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityEventSqlInjectionAdditionalProperties deserializedSecurityEventSqlInjectionAdditionalProperties + = new SecurityEventSqlInjectionAdditionalProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("threatId".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.threatId = reader.getString(); + } else if ("statement".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.statement = reader.getString(); + } else if ("statementHighlightOffset".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.statementHighlightOffset + = reader.getNullable(JsonReader::getInt); + } else if ("statementHighlightLength".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.statementHighlightLength + = reader.getNullable(JsonReader::getInt); + } else if ("errorCode".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.errorCode + = reader.getNullable(JsonReader::getInt); + } else if ("errorSeverity".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.errorSeverity + = reader.getNullable(JsonReader::getInt); + } else if ("errorMessage".equals(fieldName)) { + deserializedSecurityEventSqlInjectionAdditionalProperties.errorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityEventSqlInjectionAdditionalProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java index 9326a56f1cbc3..887fd2040ebd7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java @@ -4,21 +4,28 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The type of the security event. */ +/** + * The type of the security event. + */ public enum SecurityEventType { - /** Enum value Undefined. */ + /** + * Enum value Undefined. + */ UNDEFINED("Undefined"), - /** Enum value SqlInjectionVulnerability. */ + /** + * Enum value SqlInjectionVulnerability. + */ SQL_INJECTION_VULNERABILITY("SqlInjectionVulnerability"), - /** Enum value SqlInjectionExploit. */ + /** + * Enum value SqlInjectionExploit. + */ SQL_INJECTION_EXPLOIT("SqlInjectionExploit"); - /** The actual serialized value for a SecurityEventType instance. */ + /** + * The actual serialized value for a SecurityEventType instance. + */ private final String value; SecurityEventType(String value) { @@ -27,11 +34,10 @@ public enum SecurityEventType { /** * Parses a serialized value to a SecurityEventType instance. - * + * * @param value the serialized value to parse. * @return the parsed SecurityEventType object, or null if unable to parse. */ - @JsonCreator public static SecurityEventType fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static SecurityEventType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java index 63af3433d3931..3949a99dcf9fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sensitivity labels. */ +/** + * A list of sensitivity labels. + */ @Immutable -public final class SensitivityLabelListResult { +public final class SensitivityLabelListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SensitivityLabelListResult class. */ + /** + * Creates an instance of SensitivityLabelListResult class. + */ public SensitivityLabelListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SensitivityLabelListResult. + */ + public static SensitivityLabelListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelListResult deserializedSensitivityLabelListResult = new SensitivityLabelListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SensitivityLabelInner.fromJson(reader1)); + deserializedSensitivityLabelListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSensitivityLabelListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java index e1a36d73486b7..0a020f209ac7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java @@ -4,27 +4,38 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SensitivityLabelRank. */ +/** + * Defines values for SensitivityLabelRank. + */ public enum SensitivityLabelRank { - /** Enum value None. */ + /** + * Enum value None. + */ NONE("None"), - /** Enum value Low. */ + /** + * Enum value Low. + */ LOW("Low"), - /** Enum value Medium. */ + /** + * Enum value Medium. + */ MEDIUM("Medium"), - /** Enum value High. */ + /** + * Enum value High. + */ HIGH("High"), - /** Enum value Critical. */ + /** + * Enum value Critical. + */ CRITICAL("Critical"); - /** The actual serialized value for a SensitivityLabelRank instance. */ + /** + * The actual serialized value for a SensitivityLabelRank instance. + */ private final String value; SensitivityLabelRank(String value) { @@ -33,11 +44,10 @@ public enum SensitivityLabelRank { /** * Parses a serialized value to a SensitivityLabelRank instance. - * + * * @param value the serialized value to parse. * @return the parsed SensitivityLabelRank object, or null if unable to parse. */ - @JsonCreator public static SensitivityLabelRank fromString(String value) { if (value == null) { return null; @@ -51,8 +61,9 @@ public static SensitivityLabelRank fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java index 2dd152f4199e2..d80da1662f8f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SensitivityLabelSource. */ +/** + * Defines values for SensitivityLabelSource. + */ public enum SensitivityLabelSource { - /** Enum value current. */ + /** + * Enum value current. + */ CURRENT("current"), - /** Enum value recommended. */ + /** + * Enum value recommended. + */ RECOMMENDED("recommended"); - /** The actual serialized value for a SensitivityLabelSource instance. */ + /** + * The actual serialized value for a SensitivityLabelSource instance. + */ private final String value; SensitivityLabelSource(String value) { @@ -24,11 +29,10 @@ public enum SensitivityLabelSource { /** * Parses a serialized value to a SensitivityLabelSource instance. - * + * * @param value the serialized value to parse. * @return the parsed SensitivityLabelSource object, or null if unable to parse. */ - @JsonCreator public static SensitivityLabelSource fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static SensitivityLabelSource fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java index 915b0db52d990..1121cec89752e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SensitivityLabelUpdateKind. */ +/** + * Defines values for SensitivityLabelUpdateKind. + */ public enum SensitivityLabelUpdateKind { - /** Enum value set. */ + /** + * Enum value set. + */ SET("set"), - /** Enum value remove. */ + /** + * Enum value remove. + */ REMOVE("remove"); - /** The actual serialized value for a SensitivityLabelUpdateKind instance. */ + /** + * The actual serialized value for a SensitivityLabelUpdateKind instance. + */ private final String value; SensitivityLabelUpdateKind(String value) { @@ -24,11 +29,10 @@ public enum SensitivityLabelUpdateKind { /** * Parses a serialized value to a SensitivityLabelUpdateKind instance. - * + * * @param value the serialized value to parse. * @return the parsed SensitivityLabelUpdateKind object, or null if unable to parse. */ - @JsonCreator public static SensitivityLabelUpdateKind fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static SensitivityLabelUpdateKind fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java index bc53cbd0e36ac..8ad58bc20a585 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java @@ -5,26 +5,33 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sensitivity label update operations. */ +/** + * A list of sensitivity label update operations. + */ @Fluent -public final class SensitivityLabelUpdateList { +public final class SensitivityLabelUpdateList implements JsonSerializable { /* * The operations property. */ - @JsonProperty(value = "operations") private List operations; - /** Creates an instance of SensitivityLabelUpdateList class. */ + /** + * Creates an instance of SensitivityLabelUpdateList class. + */ public SensitivityLabelUpdateList() { } /** * Get the operations property: The operations property. - * + * * @return the operations value. */ public List operations() { @@ -33,7 +40,7 @@ public List operations() { /** * Set the operations property: The operations property. - * + * * @param operations the operations value to set. * @return the SensitivityLabelUpdateList object itself. */ @@ -44,7 +51,7 @@ public SensitivityLabelUpdateList withOperations(List e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SensitivityLabelUpdateList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SensitivityLabelUpdateList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SensitivityLabelUpdateList. + */ + public static SensitivityLabelUpdateList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SensitivityLabelUpdateList deserializedSensitivityLabelUpdateList = new SensitivityLabelUpdateList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> SensitivityLabelUpdateInner.fromJson(reader1)); + deserializedSensitivityLabelUpdateList.operations = operations; + } else { + reader.skipChildren(); + } + } + + return deserializedSensitivityLabelUpdateList; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java index 116c1dec63d9d..39bf268347ebb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server auditing settings. */ +/** + * A list of server auditing settings. + */ @Immutable -public final class ServerBlobAuditingPolicyListResult { +public final class ServerBlobAuditingPolicyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerBlobAuditingPolicyListResult class. */ + /** + * Creates an instance of ServerBlobAuditingPolicyListResult class. + */ public ServerBlobAuditingPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerBlobAuditingPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerBlobAuditingPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerBlobAuditingPolicyListResult. + */ + public static ServerBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerBlobAuditingPolicyListResult deserializedServerBlobAuditingPolicyListResult + = new ServerBlobAuditingPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerBlobAuditingPolicyInner.fromJson(reader1)); + deserializedServerBlobAuditingPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerBlobAuditingPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerBlobAuditingPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java index da04310101180..c8ae346d8a83a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server connection policy objects. */ +/** + * A list of server connection policy objects. + */ @Immutable -public final class ServerConnectionPolicyListResult { +public final class ServerConnectionPolicyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerConnectionPolicyListResult class. */ + /** + * Creates an instance of ServerConnectionPolicyListResult class. + */ public ServerConnectionPolicyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerConnectionPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerConnectionPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerConnectionPolicyListResult. + */ + public static ServerConnectionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerConnectionPolicyListResult deserializedServerConnectionPolicyListResult + = new ServerConnectionPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerConnectionPolicyInner.fromJson(reader1)); + deserializedServerConnectionPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerConnectionPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerConnectionPolicyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java index a7b77c85938c9..c2a15c5fa6292 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The server connection type. */ +/** + * The server connection type. + */ public final class ServerConnectionType extends ExpandableStringEnum { - /** Static value Default for ServerConnectionType. */ + /** + * Static value Default for ServerConnectionType. + */ public static final ServerConnectionType DEFAULT = fromString("Default"); - /** Static value Redirect for ServerConnectionType. */ + /** + * Static value Redirect for ServerConnectionType. + */ public static final ServerConnectionType REDIRECT = fromString("Redirect"); - /** Static value Proxy for ServerConnectionType. */ + /** + * Static value Proxy for ServerConnectionType. + */ public static final ServerConnectionType PROXY = fromString("Proxy"); + /** + * Creates a new instance of ServerConnectionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerConnectionType() { + } + /** * Creates or finds a ServerConnectionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerConnectionType. */ - @JsonCreator public static ServerConnectionType fromString(String name) { return fromString(name, ServerConnectionType.class); } /** * Gets known ServerConnectionType values. - * + * * @return known ServerConnectionType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java index 5ead70d1a9409..2b863dbe47370 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server DevOps audit settings. */ +/** + * A list of server DevOps audit settings. + */ @Immutable -public final class ServerDevOpsAuditSettingsListResult { +public final class ServerDevOpsAuditSettingsListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerDevOpsAuditSettingsListResult class. */ + /** + * Creates an instance of ServerDevOpsAuditSettingsListResult class. + */ public ServerDevOpsAuditSettingsListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDevOpsAuditSettingsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDevOpsAuditSettingsListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerDevOpsAuditSettingsListResult. + */ + public static ServerDevOpsAuditSettingsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDevOpsAuditSettingsListResult deserializedServerDevOpsAuditSettingsListResult + = new ServerDevOpsAuditSettingsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerDevOpsAuditingSettingsInner.fromJson(reader1)); + deserializedServerDevOpsAuditSettingsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerDevOpsAuditSettingsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDevOpsAuditSettingsListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java index 732e569ae84d1..daf49a1d1bd0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java @@ -6,25 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A server dns alias acquisition request. */ +/** + * A server dns alias acquisition request. + */ @Fluent -public final class ServerDnsAliasAcquisition { +public final class ServerDnsAliasAcquisition implements JsonSerializable { /* * The id of the server alias that will be acquired to point to this server instead. */ - @JsonProperty(value = "oldServerDnsAliasId", required = true) private String oldServerDnsAliasId; - /** Creates an instance of ServerDnsAliasAcquisition class. */ + /** + * Creates an instance of ServerDnsAliasAcquisition class. + */ public ServerDnsAliasAcquisition() { } /** * Get the oldServerDnsAliasId property: The id of the server alias that will be acquired to point to this server * instead. - * + * * @return the oldServerDnsAliasId value. */ public String oldServerDnsAliasId() { @@ -34,7 +41,7 @@ public String oldServerDnsAliasId() { /** * Set the oldServerDnsAliasId property: The id of the server alias that will be acquired to point to this server * instead. - * + * * @param oldServerDnsAliasId the oldServerDnsAliasId value to set. * @return the ServerDnsAliasAcquisition object itself. */ @@ -45,17 +52,53 @@ public ServerDnsAliasAcquisition withOldServerDnsAliasId(String oldServerDnsAlia /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (oldServerDnsAliasId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property oldServerDnsAliasId in model ServerDnsAliasAcquisition")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property oldServerDnsAliasId in model ServerDnsAliasAcquisition")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerDnsAliasAcquisition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("oldServerDnsAliasId", this.oldServerDnsAliasId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDnsAliasAcquisition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDnsAliasAcquisition if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerDnsAliasAcquisition. + */ + public static ServerDnsAliasAcquisition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDnsAliasAcquisition deserializedServerDnsAliasAcquisition = new ServerDnsAliasAcquisition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("oldServerDnsAliasId".equals(fieldName)) { + deserializedServerDnsAliasAcquisition.oldServerDnsAliasId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDnsAliasAcquisition; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java index 5c1e649d2a224..6c85aa0d816ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerDnsAliasInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server DNS aliases. */ +/** + * A list of server DNS aliases. + */ @Immutable -public final class ServerDnsAliasListResult { +public final class ServerDnsAliasListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerDnsAliasListResult class. */ + /** + * Creates an instance of ServerDnsAliasListResult class. + */ public ServerDnsAliasListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerDnsAliasListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerDnsAliasListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerDnsAliasListResult. + */ + public static ServerDnsAliasListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerDnsAliasListResult deserializedServerDnsAliasListResult = new ServerDnsAliasListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerDnsAliasInner.fromJson(reader1)); + deserializedServerDnsAliasListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerDnsAliasListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerDnsAliasListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java index 75797607b87a0..2f1f9e62261ae 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java @@ -5,55 +5,58 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Objects; import java.util.UUID; -/** Properties of a active directory administrator. */ +/** + * Properties of a active directory administrator. + */ @Fluent -public final class ServerExternalAdministrator { +public final class ServerExternalAdministrator implements JsonSerializable { /* * Type of the sever administrator. */ - @JsonProperty(value = "administratorType") private AdministratorType administratorType; /* * Principal Type of the sever administrator. */ - @JsonProperty(value = "principalType") private PrincipalType principalType; /* * Login name of the server administrator. */ - @JsonProperty(value = "login") private String login; /* * SID (object ID) of the server administrator. */ - @JsonProperty(value = "sid") private UUID sid; /* * Tenant ID of the administrator. */ - @JsonProperty(value = "tenantId") private UUID tenantId; /* * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "azureADOnlyAuthentication") private Boolean azureADOnlyAuthentication; - /** Creates an instance of ServerExternalAdministrator class. */ + /** + * Creates an instance of ServerExternalAdministrator class. + */ public ServerExternalAdministrator() { } /** * Get the administratorType property: Type of the sever administrator. - * + * * @return the administratorType value. */ public AdministratorType administratorType() { @@ -62,7 +65,7 @@ public AdministratorType administratorType() { /** * Set the administratorType property: Type of the sever administrator. - * + * * @param administratorType the administratorType value to set. * @return the ServerExternalAdministrator object itself. */ @@ -73,7 +76,7 @@ public ServerExternalAdministrator withAdministratorType(AdministratorType admin /** * Get the principalType property: Principal Type of the sever administrator. - * + * * @return the principalType value. */ public PrincipalType principalType() { @@ -82,7 +85,7 @@ public PrincipalType principalType() { /** * Set the principalType property: Principal Type of the sever administrator. - * + * * @param principalType the principalType value to set. * @return the ServerExternalAdministrator object itself. */ @@ -93,7 +96,7 @@ public ServerExternalAdministrator withPrincipalType(PrincipalType principalType /** * Get the login property: Login name of the server administrator. - * + * * @return the login value. */ public String login() { @@ -102,7 +105,7 @@ public String login() { /** * Set the login property: Login name of the server administrator. - * + * * @param login the login value to set. * @return the ServerExternalAdministrator object itself. */ @@ -113,7 +116,7 @@ public ServerExternalAdministrator withLogin(String login) { /** * Get the sid property: SID (object ID) of the server administrator. - * + * * @return the sid value. */ public UUID sid() { @@ -122,7 +125,7 @@ public UUID sid() { /** * Set the sid property: SID (object ID) of the server administrator. - * + * * @param sid the sid value to set. * @return the ServerExternalAdministrator object itself. */ @@ -133,7 +136,7 @@ public ServerExternalAdministrator withSid(UUID sid) { /** * Get the tenantId property: Tenant ID of the administrator. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -142,7 +145,7 @@ public UUID tenantId() { /** * Set the tenantId property: Tenant ID of the administrator. - * + * * @param tenantId the tenantId value to set. * @return the ServerExternalAdministrator object itself. */ @@ -153,7 +156,7 @@ public ServerExternalAdministrator withTenantId(UUID tenantId) { /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { @@ -162,7 +165,7 @@ public Boolean azureADOnlyAuthentication() { /** * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * + * * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. * @return the ServerExternalAdministrator object itself. */ @@ -173,9 +176,66 @@ public ServerExternalAdministrator withAzureADOnlyAuthentication(Boolean azureAD /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("administratorType", + this.administratorType == null ? null : this.administratorType.toString()); + jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); + jsonWriter.writeStringField("login", this.login); + jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + jsonWriter.writeBooleanField("azureADOnlyAuthentication", this.azureADOnlyAuthentication); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerExternalAdministrator from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerExternalAdministrator if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerExternalAdministrator. + */ + public static ServerExternalAdministrator fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerExternalAdministrator deserializedServerExternalAdministrator = new ServerExternalAdministrator(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("administratorType".equals(fieldName)) { + deserializedServerExternalAdministrator.administratorType + = AdministratorType.fromString(reader.getString()); + } else if ("principalType".equals(fieldName)) { + deserializedServerExternalAdministrator.principalType + = PrincipalType.fromString(reader.getString()); + } else if ("login".equals(fieldName)) { + deserializedServerExternalAdministrator.login = reader.getString(); + } else if ("sid".equals(fieldName)) { + deserializedServerExternalAdministrator.sid + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedServerExternalAdministrator.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("azureADOnlyAuthentication".equals(fieldName)) { + deserializedServerExternalAdministrator.azureADOnlyAuthentication + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedServerExternalAdministrator; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java index 34dc357a60724..467160dae3f72 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java @@ -6,24 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Server info for the server trust group. */ +/** + * Server info for the server trust group. + */ @Fluent -public final class ServerInfo { +public final class ServerInfo implements JsonSerializable { /* * Server Id. */ - @JsonProperty(value = "serverId", required = true) private String serverId; - /** Creates an instance of ServerInfo class. */ + /** + * Creates an instance of ServerInfo class. + */ public ServerInfo() { } /** * Get the serverId property: Server Id. - * + * * @return the serverId value. */ public String serverId() { @@ -32,7 +39,7 @@ public String serverId() { /** * Set the serverId property: Server Id. - * + * * @param serverId the serverId value to set. * @return the ServerInfo object itself. */ @@ -43,16 +50,52 @@ public ServerInfo withServerId(String serverId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serverId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property serverId in model ServerInfo")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serverId in model ServerInfo")); } } private static final ClientLogger LOGGER = new ClientLogger(ServerInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverId", this.serverId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerInfo if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerInfo. + */ + public static ServerInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerInfo deserializedServerInfo = new ServerInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverId".equals(fieldName)) { + deserializedServerInfo.serverId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerInfo; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java index bdb63c0607e05..173fb1a14ea11 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerKeyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server keys. */ +/** + * A list of server keys. + */ @Immutable -public final class ServerKeyListResult { +public final class ServerKeyListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerKeyListResult class. */ + /** + * Creates an instance of ServerKeyListResult class. + */ public ServerKeyListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerKeyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerKeyListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerKeyListResult. + */ + public static ServerKeyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerKeyListResult deserializedServerKeyListResult = new ServerKeyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ServerKeyInner.fromJson(reader1)); + deserializedServerKeyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerKeyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerKeyListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java index 64c8b3d7b9f18..1074004dbeefd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ +/** + * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. + */ public final class ServerKeyType extends ExpandableStringEnum { - /** Static value ServiceManaged for ServerKeyType. */ + /** + * Static value ServiceManaged for ServerKeyType. + */ public static final ServerKeyType SERVICE_MANAGED = fromString("ServiceManaged"); - /** Static value AzureKeyVault for ServerKeyType. */ + /** + * Static value AzureKeyVault for ServerKeyType. + */ public static final ServerKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault"); + /** + * Creates a new instance of ServerKeyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerKeyType() { + } + /** * Creates or finds a ServerKeyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerKeyType. */ - @JsonCreator public static ServerKeyType fromString(String name) { return fromString(name, ServerKeyType.class); } /** * Gets known ServerKeyType values. - * + * * @return known ServerKeyType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java index be602bc45c349..73f53cb0fd211 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of servers. */ +/** + * A list of servers. + */ @Immutable -public final class ServerListResult { +public final class ServerListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerListResult class. */ + /** + * Creates an instance of ServerListResult class. + */ public ServerListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerListResult. + */ + public static ServerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerListResult deserializedServerListResult = new ServerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ServerInner.fromJson(reader1)); + deserializedServerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java index a5ba15b0154e3..a154b25bd225b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,26 +12,38 @@ * 'Enabled' or 'Disabled'. */ public final class ServerNetworkAccessFlag extends ExpandableStringEnum { - /** Static value Enabled for ServerNetworkAccessFlag. */ + /** + * Static value Enabled for ServerNetworkAccessFlag. + */ public static final ServerNetworkAccessFlag ENABLED = fromString("Enabled"); - /** Static value Disabled for ServerNetworkAccessFlag. */ + /** + * Static value Disabled for ServerNetworkAccessFlag. + */ public static final ServerNetworkAccessFlag DISABLED = fromString("Disabled"); + /** + * Creates a new instance of ServerNetworkAccessFlag value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerNetworkAccessFlag() { + } + /** * Creates or finds a ServerNetworkAccessFlag from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerNetworkAccessFlag. */ - @JsonCreator public static ServerNetworkAccessFlag fromString(String name) { return fromString(name, ServerNetworkAccessFlag.class); } /** * Gets known ServerNetworkAccessFlag values. - * + * * @return known ServerNetworkAccessFlag values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java index 428b0a2cf9341..8bcb2e6b6c973 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response to a list server operations request. */ +/** + * The response to a list server operations request. + */ @Immutable -public final class ServerOperationListResult { +public final class ServerOperationListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerOperationListResult class. */ + /** + * Creates an instance of ServerOperationListResult class. + */ public ServerOperationListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerOperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerOperationListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerOperationListResult. + */ + public static ServerOperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerOperationListResult deserializedServerOperationListResult = new ServerOperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerOperationInner.fromJson(reader1)); + deserializedServerOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerOperationListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java index 6a9ba77cb08c6..9a3eceb1761c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A private endpoint connection under a server. */ +/** + * A private endpoint connection under a server. + */ @Immutable -public final class ServerPrivateEndpointConnection { +public final class ServerPrivateEndpointConnection implements JsonSerializable { /* * Resource ID. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Private endpoint connection properties */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProperties properties; - /** Creates an instance of ServerPrivateEndpointConnection class. */ + /** + * Creates an instance of ServerPrivateEndpointConnection class. + */ public ServerPrivateEndpointConnection() { } /** * Get the id property: Resource ID. - * + * * @return the id value. */ public String id() { @@ -38,7 +44,7 @@ public String id() { /** * Get the properties property: Private endpoint connection properties. - * + * * @return the properties value. */ public PrivateEndpointConnectionProperties properties() { @@ -47,7 +53,7 @@ public PrivateEndpointConnectionProperties properties() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -55,4 +61,43 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerPrivateEndpointConnection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerPrivateEndpointConnection if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerPrivateEndpointConnection. + */ + public static ServerPrivateEndpointConnection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerPrivateEndpointConnection deserializedServerPrivateEndpointConnection + = new ServerPrivateEndpointConnection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServerPrivateEndpointConnection.id = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedServerPrivateEndpointConnection.properties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerPrivateEndpointConnection; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustCertificatesListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustCertificatesListResult.java index fbe9b53bf681e..92b28ce8f3f4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustCertificatesListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustCertificatesListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server trust certificates in instance. */ +/** + * A list of server trust certificates in instance. + */ @Immutable -public final class ServerTrustCertificatesListResult { +public final class ServerTrustCertificatesListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerTrustCertificatesListResult class. */ + /** + * Creates an instance of ServerTrustCertificatesListResult class. + */ public ServerTrustCertificatesListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerTrustCertificatesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerTrustCertificatesListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerTrustCertificatesListResult. + */ + public static ServerTrustCertificatesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerTrustCertificatesListResult deserializedServerTrustCertificatesListResult + = new ServerTrustCertificatesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerTrustCertificateInner.fromJson(reader1)); + deserializedServerTrustCertificatesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerTrustCertificatesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustCertificatesListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupListResult.java index b539292d10859..5e0015a062a81 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server trust groups. */ +/** + * A list of server trust groups. + */ @Immutable -public final class ServerTrustGroupListResult { +public final class ServerTrustGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerTrustGroupListResult class. */ + /** + * Creates an instance of ServerTrustGroupListResult class. + */ public ServerTrustGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerTrustGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerTrustGroupListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerTrustGroupListResult. + */ + public static ServerTrustGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerTrustGroupListResult deserializedServerTrustGroupListResult = new ServerTrustGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerTrustGroupInner.fromJson(reader1)); + deserializedServerTrustGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerTrustGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerTrustGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java index 5956f45f726fa..a483c11498951 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java @@ -5,33 +5,46 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ServerTrustGroupPropertiesTrustScopesItem. */ +/** + * Defines values for ServerTrustGroupPropertiesTrustScopesItem. + */ public final class ServerTrustGroupPropertiesTrustScopesItem extends ExpandableStringEnum { - /** Static value GlobalTransactions for ServerTrustGroupPropertiesTrustScopesItem. */ - public static final ServerTrustGroupPropertiesTrustScopesItem GLOBAL_TRANSACTIONS = - fromString("GlobalTransactions"); + /** + * Static value GlobalTransactions for ServerTrustGroupPropertiesTrustScopesItem. + */ + public static final ServerTrustGroupPropertiesTrustScopesItem GLOBAL_TRANSACTIONS + = fromString("GlobalTransactions"); - /** Static value ServiceBroker for ServerTrustGroupPropertiesTrustScopesItem. */ + /** + * Static value ServiceBroker for ServerTrustGroupPropertiesTrustScopesItem. + */ public static final ServerTrustGroupPropertiesTrustScopesItem SERVICE_BROKER = fromString("ServiceBroker"); + /** + * Creates a new instance of ServerTrustGroupPropertiesTrustScopesItem value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerTrustGroupPropertiesTrustScopesItem() { + } + /** * Creates or finds a ServerTrustGroupPropertiesTrustScopesItem from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerTrustGroupPropertiesTrustScopesItem. */ - @JsonCreator public static ServerTrustGroupPropertiesTrustScopesItem fromString(String name) { return fromString(name, ServerTrustGroupPropertiesTrustScopesItem.class); } /** * Gets known ServerTrustGroupPropertiesTrustScopesItem values. - * + * * @return known ServerTrustGroupPropertiesTrustScopesItem values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java index dfa1cc0f4bac5..fcf43120ac90b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java @@ -5,42 +5,45 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; import java.util.UUID; -/** An update request for an Azure SQL Database server. */ +/** + * An update request for an Azure SQL Database server. + */ @Fluent -public final class ServerUpdate { +public final class ServerUpdate implements JsonSerializable { /* * Server identity */ - @JsonProperty(value = "identity") private ResourceIdentity identity; /* * Resource properties. */ - @JsonProperty(value = "properties") private ServerProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ServerUpdate class. */ + /** + * Creates an instance of ServerUpdate class. + */ public ServerUpdate() { } /** * Get the identity property: Server identity. - * + * * @return the identity value. */ public ResourceIdentity identity() { @@ -49,7 +52,7 @@ public ResourceIdentity identity() { /** * Set the identity property: Server identity. - * + * * @param identity the identity value to set. * @return the ServerUpdate object itself. */ @@ -60,7 +63,7 @@ public ServerUpdate withIdentity(ResourceIdentity identity) { /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private ServerProperties innerProperties() { @@ -69,7 +72,7 @@ private ServerProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -78,7 +81,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the ServerUpdate object itself. */ @@ -89,7 +92,7 @@ public ServerUpdate withTags(Map tags) { /** * Get the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @return the administratorLogin value. */ public String administratorLogin() { @@ -98,7 +101,7 @@ public String administratorLogin() { /** * Set the administratorLogin property: Administrator username for the server. Once created it cannot be changed. - * + * * @param administratorLogin the administratorLogin value to set. * @return the ServerUpdate object itself. */ @@ -112,7 +115,7 @@ public ServerUpdate withAdministratorLogin(String administratorLogin) { /** * Get the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { @@ -121,7 +124,7 @@ public String administratorLoginPassword() { /** * Set the administratorLoginPassword property: The administrator login password (required for server creation). - * + * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerUpdate object itself. */ @@ -135,7 +138,7 @@ public ServerUpdate withAdministratorLoginPassword(String administratorLoginPass /** * Get the version property: The version of the server. - * + * * @return the version value. */ public String version() { @@ -144,7 +147,7 @@ public String version() { /** * Set the version property: The version of the server. - * + * * @param version the version value to set. * @return the ServerUpdate object itself. */ @@ -158,7 +161,7 @@ public ServerUpdate withVersion(String version) { /** * Get the state property: The state of the server. - * + * * @return the state value. */ public String state() { @@ -167,7 +170,7 @@ public String state() { /** * Get the fullyQualifiedDomainName property: The fully qualified domain name of the server. - * + * * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { @@ -176,7 +179,7 @@ public String fullyQualifiedDomainName() { /** * Get the privateEndpointConnections property: List of private endpoint connections on a server. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -185,7 +188,7 @@ public List privateEndpointConnections() { /** * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @return the minimalTlsVersion value. */ public String minimalTlsVersion() { @@ -194,7 +197,7 @@ public String minimalTlsVersion() { /** * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. - * + * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerUpdate object itself. */ @@ -209,7 +212,7 @@ public ServerUpdate withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the publicNetworkAccess value. */ public ServerNetworkAccessFlag publicNetworkAccess() { @@ -219,7 +222,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is * optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerUpdate object itself. */ @@ -234,7 +237,7 @@ public ServerUpdate withPublicNetworkAccess(ServerNetworkAccessFlag publicNetwor /** * Get the workspaceFeature property: Whether or not existing server has a workspace created and if it allows * connection from workspace. - * + * * @return the workspaceFeature value. */ public ServerWorkspaceFeature workspaceFeature() { @@ -244,7 +247,7 @@ public ServerWorkspaceFeature workspaceFeature() { /** * Get the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @return the primaryUserAssignedIdentityId value. */ public String primaryUserAssignedIdentityId() { @@ -254,7 +257,7 @@ public String primaryUserAssignedIdentityId() { /** * Set the primaryUserAssignedIdentityId property: The resource id of a user assigned identity to be used by * default. - * + * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the ServerUpdate object itself. */ @@ -268,7 +271,7 @@ public ServerUpdate withPrimaryUserAssignedIdentityId(String primaryUserAssigned /** * Get the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @return the federatedClientId value. */ public UUID federatedClientId() { @@ -277,7 +280,7 @@ public UUID federatedClientId() { /** * Set the federatedClientId property: The Client id used for cross tenant CMK scenario. - * + * * @param federatedClientId the federatedClientId value to set. * @return the ServerUpdate object itself. */ @@ -291,7 +294,7 @@ public ServerUpdate withFederatedClientId(UUID federatedClientId) { /** * Get the keyId property: A CMK URI of the key to use for encryption. - * + * * @return the keyId value. */ public String keyId() { @@ -300,7 +303,7 @@ public String keyId() { /** * Set the keyId property: A CMK URI of the key to use for encryption. - * + * * @param keyId the keyId value to set. * @return the ServerUpdate object itself. */ @@ -314,7 +317,7 @@ public ServerUpdate withKeyId(String keyId) { /** * Get the administrators property: The Azure Active Directory administrator of the server. - * + * * @return the administrators value. */ public ServerExternalAdministrator administrators() { @@ -323,7 +326,7 @@ public ServerExternalAdministrator administrators() { /** * Set the administrators property: The Azure Active Directory administrator of the server. - * + * * @param administrators the administrators value to set. * @return the ServerUpdate object itself. */ @@ -338,7 +341,7 @@ public ServerUpdate withAdministrators(ServerExternalAdministrator administrator /** * Get the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @return the restrictOutboundNetworkAccess value. */ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { @@ -348,7 +351,7 @@ public ServerNetworkAccessFlag restrictOutboundNetworkAccess() { /** * Set the restrictOutboundNetworkAccess property: Whether or not to restrict outbound network access for this * server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. - * + * * @param restrictOutboundNetworkAccess the restrictOutboundNetworkAccess value to set. * @return the ServerUpdate object itself. */ @@ -362,7 +365,7 @@ public ServerUpdate withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag re /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -373,4 +376,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerUpdate. + */ + public static ServerUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerUpdate deserializedServerUpdate = new ServerUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedServerUpdate.identity = ResourceIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerUpdate.innerProperties = ServerProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedServerUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedServerUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java index c20c50a9af875..6e96223cd43da 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerUsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of server usage metrics. */ +/** + * A list of server usage metrics. + */ @Immutable -public final class ServerUsageListResult { +public final class ServerUsageListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerUsageListResult class. */ + /** + * Creates an instance of ServerUsageListResult class. + */ public ServerUsageListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerUsageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerUsageListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerUsageListResult. + */ + public static ServerUsageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerUsageListResult deserializedServerUsageListResult = new ServerUsageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ServerUsageInner.fromJson(reader1)); + deserializedServerUsageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerUsageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerUsageListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java index 669abc8be2924..a2dabbd7130de 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java @@ -5,49 +5,52 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** The server capability. */ +/** + * The server capability. + */ @Fluent -public final class ServerVersionCapability { +public final class ServerVersionCapability implements JsonSerializable { /* * The server version name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported database editions. */ - @JsonProperty(value = "supportedEditions", access = JsonProperty.Access.WRITE_ONLY) private List supportedEditions; /* * The list of supported elastic pool editions. */ - @JsonProperty(value = "supportedElasticPoolEditions", access = JsonProperty.Access.WRITE_ONLY) private List supportedElasticPoolEditions; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ServerVersionCapability class. */ + /** + * Creates an instance of ServerVersionCapability class. + */ public ServerVersionCapability() { } /** * Get the name property: The server version name. - * + * * @return the name value. */ public String name() { @@ -56,7 +59,7 @@ public String name() { /** * Get the supportedEditions property: The list of supported database editions. - * + * * @return the supportedEditions value. */ public List supportedEditions() { @@ -65,7 +68,7 @@ public List supportedEditions() { /** * Get the supportedElasticPoolEditions property: The list of supported elastic pool editions. - * + * * @return the supportedElasticPoolEditions value. */ public List supportedElasticPoolEditions() { @@ -74,7 +77,7 @@ public List supportedElasticPoolEditions() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -83,7 +86,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -92,7 +95,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ServerVersionCapability object itself. */ @@ -103,7 +106,7 @@ public ServerVersionCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -114,4 +117,52 @@ public void validate() { supportedElasticPoolEditions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerVersionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerVersionCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerVersionCapability. + */ + public static ServerVersionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerVersionCapability deserializedServerVersionCapability = new ServerVersionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedServerVersionCapability.name = reader.getString(); + } else if ("supportedEditions".equals(fieldName)) { + List supportedEditions + = reader.readArray(reader1 -> EditionCapability.fromJson(reader1)); + deserializedServerVersionCapability.supportedEditions = supportedEditions; + } else if ("supportedElasticPoolEditions".equals(fieldName)) { + List supportedElasticPoolEditions + = reader.readArray(reader1 -> ElasticPoolEditionCapability.fromJson(reader1)); + deserializedServerVersionCapability.supportedElasticPoolEditions = supportedElasticPoolEditions; + } else if ("status".equals(fieldName)) { + deserializedServerVersionCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedServerVersionCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerVersionCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVulnerabilityAssessmentListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVulnerabilityAssessmentListResult.java index 0b5ac03dced8b..46fe575e15859 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVulnerabilityAssessmentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVulnerabilityAssessmentListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of the server's vulnerability assessments. */ +/** + * A list of the server's vulnerability assessments. + */ @Immutable -public final class ServerVulnerabilityAssessmentListResult { +public final class ServerVulnerabilityAssessmentListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServerVulnerabilityAssessmentListResult class. */ + /** + * Creates an instance of ServerVulnerabilityAssessmentListResult class. + */ public ServerVulnerabilityAssessmentListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerVulnerabilityAssessmentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerVulnerabilityAssessmentListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerVulnerabilityAssessmentListResult. + */ + public static ServerVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerVulnerabilityAssessmentListResult deserializedServerVulnerabilityAssessmentListResult + = new ServerVulnerabilityAssessmentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ServerVulnerabilityAssessmentInner.fromJson(reader1)); + deserializedServerVulnerabilityAssessmentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedServerVulnerabilityAssessmentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerVulnerabilityAssessmentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java index 608f3b647ba49..1eca011520d86 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether or not existing server has a workspace created and if it allows connection from workspace. */ +/** + * Whether or not existing server has a workspace created and if it allows connection from workspace. + */ public final class ServerWorkspaceFeature extends ExpandableStringEnum { - /** Static value Connected for ServerWorkspaceFeature. */ + /** + * Static value Connected for ServerWorkspaceFeature. + */ public static final ServerWorkspaceFeature CONNECTED = fromString("Connected"); - /** Static value Disconnected for ServerWorkspaceFeature. */ + /** + * Static value Disconnected for ServerWorkspaceFeature. + */ public static final ServerWorkspaceFeature DISCONNECTED = fromString("Disconnected"); + /** + * Creates a new instance of ServerWorkspaceFeature value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerWorkspaceFeature() { + } + /** * Creates or finds a ServerWorkspaceFeature from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServerWorkspaceFeature. */ - @JsonCreator public static ServerWorkspaceFeature fromString(String name) { return fromString(name, ServerWorkspaceFeature.class); } /** * Gets known ServerWorkspaceFeature values. - * + * * @return known ServerWorkspaceFeature values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java index 8b973c2829ee3..960d67e6c96bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java @@ -5,104 +5,98 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; import java.util.UUID; -/** The service objectives capability. */ +/** + * The service objectives capability. + */ @Fluent -public final class ServiceObjectiveCapability { +public final class ServiceObjectiveCapability implements JsonSerializable { /* * The unique ID of the service objective. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private UUID id; /* * The service objective name. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * The list of supported maximum database sizes. */ - @JsonProperty(value = "supportedMaxSizes", access = JsonProperty.Access.WRITE_ONLY) private List supportedMaxSizes; /* * The performance level. */ - @JsonProperty(value = "performanceLevel", access = JsonProperty.Access.WRITE_ONLY) private PerformanceLevelCapability performanceLevel; /* * The sku. */ - @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) private Sku sku; /* * List of supported license types. */ - @JsonProperty(value = "supportedLicenseTypes", access = JsonProperty.Access.WRITE_ONLY) private List supportedLicenseTypes; /* * The included (free) max size. */ - @JsonProperty(value = "includedMaxSize", access = JsonProperty.Access.WRITE_ONLY) private MaxSizeCapability includedMaxSize; /* * Whether or not zone redundancy is supported for the service objective. */ - @JsonProperty(value = "zoneRedundant", access = JsonProperty.Access.WRITE_ONLY) private Boolean zoneRedundant; /* * Supported time range for auto pause delay */ - @JsonProperty(value = "supportedAutoPauseDelay", access = JsonProperty.Access.WRITE_ONLY) private AutoPauseDelayTimeRange supportedAutoPauseDelay; /* * List of supported min capacities */ - @JsonProperty(value = "supportedMinCapacities", access = JsonProperty.Access.WRITE_ONLY) private List supportedMinCapacities; /* * The compute model */ - @JsonProperty(value = "computeModel", access = JsonProperty.Access.WRITE_ONLY) private String computeModel; /* * List of supported maintenance configurations */ - @JsonProperty(value = "supportedMaintenanceConfigurations", access = JsonProperty.Access.WRITE_ONLY) private List supportedMaintenanceConfigurations; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of ServiceObjectiveCapability class. */ + /** + * Creates an instance of ServiceObjectiveCapability class. + */ public ServiceObjectiveCapability() { } /** * Get the id property: The unique ID of the service objective. - * + * * @return the id value. */ public UUID id() { @@ -111,7 +105,7 @@ public UUID id() { /** * Get the name property: The service objective name. - * + * * @return the name value. */ public String name() { @@ -120,7 +114,7 @@ public String name() { /** * Get the supportedMaxSizes property: The list of supported maximum database sizes. - * + * * @return the supportedMaxSizes value. */ public List supportedMaxSizes() { @@ -129,7 +123,7 @@ public List supportedMaxSizes() { /** * Get the performanceLevel property: The performance level. - * + * * @return the performanceLevel value. */ public PerformanceLevelCapability performanceLevel() { @@ -138,7 +132,7 @@ public PerformanceLevelCapability performanceLevel() { /** * Get the sku property: The sku. - * + * * @return the sku value. */ public Sku sku() { @@ -147,7 +141,7 @@ public Sku sku() { /** * Get the supportedLicenseTypes property: List of supported license types. - * + * * @return the supportedLicenseTypes value. */ public List supportedLicenseTypes() { @@ -156,7 +150,7 @@ public List supportedLicenseTypes() { /** * Get the includedMaxSize property: The included (free) max size. - * + * * @return the includedMaxSize value. */ public MaxSizeCapability includedMaxSize() { @@ -165,7 +159,7 @@ public MaxSizeCapability includedMaxSize() { /** * Get the zoneRedundant property: Whether or not zone redundancy is supported for the service objective. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -174,7 +168,7 @@ public Boolean zoneRedundant() { /** * Get the supportedAutoPauseDelay property: Supported time range for auto pause delay. - * + * * @return the supportedAutoPauseDelay value. */ public AutoPauseDelayTimeRange supportedAutoPauseDelay() { @@ -183,7 +177,7 @@ public AutoPauseDelayTimeRange supportedAutoPauseDelay() { /** * Get the supportedMinCapacities property: List of supported min capacities. - * + * * @return the supportedMinCapacities value. */ public List supportedMinCapacities() { @@ -192,7 +186,7 @@ public List supportedMinCapacities() { /** * Get the computeModel property: The compute model. - * + * * @return the computeModel value. */ public String computeModel() { @@ -201,7 +195,7 @@ public String computeModel() { /** * Get the supportedMaintenanceConfigurations property: List of supported maintenance configurations. - * + * * @return the supportedMaintenanceConfigurations value. */ public List supportedMaintenanceConfigurations() { @@ -210,7 +204,7 @@ public List supportedMaintenanceConfiguratio /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -219,7 +213,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -228,7 +222,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the ServiceObjectiveCapability object itself. */ @@ -239,7 +233,7 @@ public ServiceObjectiveCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -268,4 +262,78 @@ public void validate() { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceObjectiveCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceObjectiveCapability if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceObjectiveCapability. + */ + public static ServiceObjectiveCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceObjectiveCapability deserializedServiceObjectiveCapability = new ServiceObjectiveCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedServiceObjectiveCapability.id + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedServiceObjectiveCapability.name = reader.getString(); + } else if ("supportedMaxSizes".equals(fieldName)) { + List supportedMaxSizes + = reader.readArray(reader1 -> MaxSizeRangeCapability.fromJson(reader1)); + deserializedServiceObjectiveCapability.supportedMaxSizes = supportedMaxSizes; + } else if ("performanceLevel".equals(fieldName)) { + deserializedServiceObjectiveCapability.performanceLevel + = PerformanceLevelCapability.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedServiceObjectiveCapability.sku = Sku.fromJson(reader); + } else if ("supportedLicenseTypes".equals(fieldName)) { + List supportedLicenseTypes + = reader.readArray(reader1 -> LicenseTypeCapability.fromJson(reader1)); + deserializedServiceObjectiveCapability.supportedLicenseTypes = supportedLicenseTypes; + } else if ("includedMaxSize".equals(fieldName)) { + deserializedServiceObjectiveCapability.includedMaxSize = MaxSizeCapability.fromJson(reader); + } else if ("zoneRedundant".equals(fieldName)) { + deserializedServiceObjectiveCapability.zoneRedundant = reader.getNullable(JsonReader::getBoolean); + } else if ("supportedAutoPauseDelay".equals(fieldName)) { + deserializedServiceObjectiveCapability.supportedAutoPauseDelay + = AutoPauseDelayTimeRange.fromJson(reader); + } else if ("supportedMinCapacities".equals(fieldName)) { + List supportedMinCapacities + = reader.readArray(reader1 -> MinCapacityCapability.fromJson(reader1)); + deserializedServiceObjectiveCapability.supportedMinCapacities = supportedMinCapacities; + } else if ("computeModel".equals(fieldName)) { + deserializedServiceObjectiveCapability.computeModel = reader.getString(); + } else if ("supportedMaintenanceConfigurations".equals(fieldName)) { + List supportedMaintenanceConfigurations + = reader.readArray(reader1 -> MaintenanceConfigurationCapability.fromJson(reader1)); + deserializedServiceObjectiveCapability.supportedMaintenanceConfigurations + = supportedMaintenanceConfigurations; + } else if ("status".equals(fieldName)) { + deserializedServiceObjectiveCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedServiceObjectiveCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceObjectiveCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveName.java index 8d7df4340fc65..eb41d7a41473c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveName.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** Defines values for ServiceObjectiveName. */ @@ -210,7 +209,6 @@ public final class ServiceObjectiveName extends ExpandableStringEnum { /* * The Azure Active Directory application object id. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The Azure Active Directory application client id. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; /* * The Azure Active Directory tenant id. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * Service principal type. */ - @JsonProperty(value = "type") private ServicePrincipalType type; - /** Creates an instance of ServicePrincipal class. */ + /** + * Creates an instance of ServicePrincipal class. + */ public ServicePrincipal() { } /** * Get the principalId property: The Azure Active Directory application object id. - * + * * @return the principalId value. */ public String principalId() { @@ -49,7 +53,7 @@ public String principalId() { /** * Get the clientId property: The Azure Active Directory application client id. - * + * * @return the clientId value. */ public String clientId() { @@ -58,7 +62,7 @@ public String clientId() { /** * Get the tenantId property: The Azure Active Directory tenant id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -67,7 +71,7 @@ public String tenantId() { /** * Get the type property: Service principal type. - * + * * @return the type value. */ public ServicePrincipalType type() { @@ -76,7 +80,7 @@ public ServicePrincipalType type() { /** * Set the type property: Service principal type. - * + * * @param type the type value to set. * @return the ServicePrincipal object itself. */ @@ -87,9 +91,51 @@ public ServicePrincipal withType(ServicePrincipalType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServicePrincipal from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServicePrincipal if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ServicePrincipal. + */ + public static ServicePrincipal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServicePrincipal deserializedServicePrincipal = new ServicePrincipal(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedServicePrincipal.principalId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedServicePrincipal.clientId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedServicePrincipal.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedServicePrincipal.type = ServicePrincipalType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServicePrincipal; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java index b6bc1019a92c5..1c784d4e97918 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Service principal type. */ +/** + * Service principal type. + */ public final class ServicePrincipalType extends ExpandableStringEnum { - /** Static value None for ServicePrincipalType. */ + /** + * Static value None for ServicePrincipalType. + */ public static final ServicePrincipalType NONE = fromString("None"); - /** Static value SystemAssigned for ServicePrincipalType. */ + /** + * Static value SystemAssigned for ServicePrincipalType. + */ public static final ServicePrincipalType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + /** + * Creates a new instance of ServicePrincipalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServicePrincipalType() { + } + /** * Creates or finds a ServicePrincipalType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServicePrincipalType. */ - @JsonCreator public static ServicePrincipalType fromString(String name) { return fromString(name, ServicePrincipalType.class); } /** * Gets known ServicePrincipalType values. - * + * * @return known ServicePrincipalType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java index 4fcb6dbb11493..2f1341815256e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ShortTermRetentionPolicyName. */ +/** + * Defines values for ShortTermRetentionPolicyName. + */ public final class ShortTermRetentionPolicyName extends ExpandableStringEnum { - /** Static value default for ShortTermRetentionPolicyName. */ + /** + * Static value default for ShortTermRetentionPolicyName. + */ public static final ShortTermRetentionPolicyName DEFAULT = fromString("default"); + /** + * Creates a new instance of ShortTermRetentionPolicyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ShortTermRetentionPolicyName() { + } + /** * Creates or finds a ShortTermRetentionPolicyName from its string representation. - * + * * @param name a name to look for. * @return the corresponding ShortTermRetentionPolicyName. */ - @JsonCreator public static ShortTermRetentionPolicyName fromString(String name) { return fromString(name, ShortTermRetentionPolicyName.class); } /** * Gets known ShortTermRetentionPolicyName values. - * + * * @return known ShortTermRetentionPolicyName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java index 363198ede48f8..a7070ddd45425 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java @@ -6,48 +6,51 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An ARM Resource SKU. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * An ARM Resource SKU. + */ @Fluent -public final class Sku { +public final class Sku implements JsonSerializable { /* * The name of the SKU, typically, a letter + Number code, e.g. P3. */ - @JsonProperty(value = "name", required = true) private String name; /* * The tier or edition of the particular SKU, e.g. Basic, Premium. */ - @JsonProperty(value = "tier") private String tier; /* * Size of the particular SKU */ - @JsonProperty(value = "size") private String size; /* * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - @JsonProperty(value = "family") private String family; /* * Capacity of the particular SKU. */ - @JsonProperty(value = "capacity") private Integer capacity; - /** Creates an instance of Sku class. */ + /** + * Creates an instance of Sku class. + */ public Sku() { } /** * Get the name property: The name of the SKU, typically, a letter + Number code, e.g. P3. - * + * * @return the name value. */ public String name() { @@ -56,7 +59,7 @@ public String name() { /** * Set the name property: The name of the SKU, typically, a letter + Number code, e.g. P3. - * + * * @param name the name value to set. * @return the Sku object itself. */ @@ -67,7 +70,7 @@ public Sku withName(String name) { /** * Get the tier property: The tier or edition of the particular SKU, e.g. Basic, Premium. - * + * * @return the tier value. */ public String tier() { @@ -76,7 +79,7 @@ public String tier() { /** * Set the tier property: The tier or edition of the particular SKU, e.g. Basic, Premium. - * + * * @param tier the tier value to set. * @return the Sku object itself. */ @@ -87,7 +90,7 @@ public Sku withTier(String tier) { /** * Get the size property: Size of the particular SKU. - * + * * @return the size value. */ public String size() { @@ -96,7 +99,7 @@ public String size() { /** * Set the size property: Size of the particular SKU. - * + * * @param size the size value to set. * @return the Sku object itself. */ @@ -108,7 +111,7 @@ public Sku withSize(String size) { /** * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @return the family value. */ public String family() { @@ -118,7 +121,7 @@ public String family() { /** * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @param family the family value to set. * @return the Sku object itself. */ @@ -129,7 +132,7 @@ public Sku withFamily(String family) { /** * Get the capacity property: Capacity of the particular SKU. - * + * * @return the capacity value. */ public Integer capacity() { @@ -138,7 +141,7 @@ public Integer capacity() { /** * Set the capacity property: Capacity of the particular SKU. - * + * * @param capacity the capacity value to set. * @return the Sku object itself. */ @@ -149,15 +152,63 @@ public Sku withCapacity(Integer capacity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); } } private static final ClientLogger LOGGER = new ClientLogger(Sku.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeNumberField("capacity", this.capacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Sku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Sku if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Sku. + */ + public static Sku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Sku deserializedSku = new Sku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSku.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedSku.tier = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedSku.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedSku.family = reader.getString(); + } else if ("capacity".equals(fieldName)) { + deserializedSku.capacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSku; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java index 7b3f6055007b1..bd179f834d252 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java @@ -5,32 +5,45 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of Sql Agent. */ +/** + * The state of Sql Agent. + */ public final class SqlAgentConfigurationPropertiesState extends ExpandableStringEnum { - /** Static value Enabled for SqlAgentConfigurationPropertiesState. */ + /** + * Static value Enabled for SqlAgentConfigurationPropertiesState. + */ public static final SqlAgentConfigurationPropertiesState ENABLED = fromString("Enabled"); - /** Static value Disabled for SqlAgentConfigurationPropertiesState. */ + /** + * Static value Disabled for SqlAgentConfigurationPropertiesState. + */ public static final SqlAgentConfigurationPropertiesState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of SqlAgentConfigurationPropertiesState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SqlAgentConfigurationPropertiesState() { + } + /** * Creates or finds a SqlAgentConfigurationPropertiesState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SqlAgentConfigurationPropertiesState. */ - @JsonCreator public static SqlAgentConfigurationPropertiesState fromString(String name) { return fromString(name, SqlAgentConfigurationPropertiesState.class); } /** * Gets known SqlAgentConfigurationPropertiesState values. - * + * * @return known SqlAgentConfigurationPropertiesState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java index 2902c55c4d51c..59a681ff9e3eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java @@ -5,43 +5,64 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Status. */ +/** + * Defines values for Status. + */ public final class Status extends ExpandableStringEnum { - /** Static value NotStarted for Status. */ + /** + * Static value NotStarted for Status. + */ public static final Status NOT_STARTED = fromString("NotStarted"); - /** Static value InProgress for Status. */ + /** + * Static value InProgress for Status. + */ public static final Status IN_PROGRESS = fromString("InProgress"); - /** Static value SlowedDown for Status. */ + /** + * Static value SlowedDown for Status. + */ public static final Status SLOWED_DOWN = fromString("SlowedDown"); - /** Static value Completed for Status. */ + /** + * Static value Completed for Status. + */ public static final Status COMPLETED = fromString("Completed"); - /** Static value Failed for Status. */ + /** + * Static value Failed for Status. + */ public static final Status FAILED = fromString("Failed"); - /** Static value Canceled for Status. */ + /** + * Static value Canceled for Status. + */ public static final Status CANCELED = fromString("Canceled"); + /** + * Creates a new instance of Status value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Status() { + } + /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ - @JsonCreator public static Status fromString(String name) { return fromString(name, Status.class); } /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java index 2b85c0c8797eb..a03cf6dde0942 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** The storage account type capability. */ +/** + * The storage account type capability. + */ @Fluent -public final class StorageCapability { +public final class StorageCapability implements JsonSerializable { /* * The storage account type for the database's backups. */ - @JsonProperty(value = "storageAccountType", access = JsonProperty.Access.WRITE_ONLY) private StorageCapabilityStorageAccountType storageAccountType; /* * The status of the capability. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CapabilityStatus status; /* * The reason for the capability not being available. */ - @JsonProperty(value = "reason") private String reason; - /** Creates an instance of StorageCapability class. */ + /** + * Creates an instance of StorageCapability class. + */ public StorageCapability() { } /** * Get the storageAccountType property: The storage account type for the database's backups. - * + * * @return the storageAccountType value. */ public StorageCapabilityStorageAccountType storageAccountType() { @@ -43,7 +48,7 @@ public StorageCapabilityStorageAccountType storageAccountType() { /** * Get the status property: The status of the capability. - * + * * @return the status value. */ public CapabilityStatus status() { @@ -52,7 +57,7 @@ public CapabilityStatus status() { /** * Get the reason property: The reason for the capability not being available. - * + * * @return the reason value. */ public String reason() { @@ -61,7 +66,7 @@ public String reason() { /** * Set the reason property: The reason for the capability not being available. - * + * * @param reason the reason value to set. * @return the StorageCapability object itself. */ @@ -72,9 +77,50 @@ public StorageCapability withReason(String reason) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("reason", this.reason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageCapability if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageCapability. + */ + public static StorageCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageCapability deserializedStorageCapability = new StorageCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageAccountType".equals(fieldName)) { + deserializedStorageCapability.storageAccountType + = StorageCapabilityStorageAccountType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedStorageCapability.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedStorageCapability.reason = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStorageCapability; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapabilityStorageAccountType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapabilityStorageAccountType.java index 22634130edae1..0a8db83c31a95 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapabilityStorageAccountType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapabilityStorageAccountType.java @@ -5,38 +5,55 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The storage account type for the database's backups. */ +/** + * The storage account type for the database's backups. + */ public final class StorageCapabilityStorageAccountType extends ExpandableStringEnum { - /** Static value GRS for StorageCapabilityStorageAccountType. */ + /** + * Static value GRS for StorageCapabilityStorageAccountType. + */ public static final StorageCapabilityStorageAccountType GRS = fromString("GRS"); - /** Static value LRS for StorageCapabilityStorageAccountType. */ + /** + * Static value LRS for StorageCapabilityStorageAccountType. + */ public static final StorageCapabilityStorageAccountType LRS = fromString("LRS"); - /** Static value ZRS for StorageCapabilityStorageAccountType. */ + /** + * Static value ZRS for StorageCapabilityStorageAccountType. + */ public static final StorageCapabilityStorageAccountType ZRS = fromString("ZRS"); - /** Static value GZRS for StorageCapabilityStorageAccountType. */ + /** + * Static value GZRS for StorageCapabilityStorageAccountType. + */ public static final StorageCapabilityStorageAccountType GZRS = fromString("GZRS"); + /** + * Creates a new instance of StorageCapabilityStorageAccountType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageCapabilityStorageAccountType() { + } + /** * Creates or finds a StorageCapabilityStorageAccountType from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageCapabilityStorageAccountType. */ - @JsonCreator public static StorageCapabilityStorageAccountType fromString(String name) { return fromString(name, StorageCapabilityStorageAccountType.class); } /** * Gets known StorageCapabilityStorageAccountType values. - * + * * @return known StorageCapabilityStorageAccountType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java index a0308fce159c7..54ca2acefd739 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Storage key type: StorageAccessKey or SharedAccessKey. */ +/** + * Storage key type: StorageAccessKey or SharedAccessKey. + */ public final class StorageKeyType extends ExpandableStringEnum { - /** Static value SharedAccessKey for StorageKeyType. */ + /** + * Static value SharedAccessKey for StorageKeyType. + */ public static final StorageKeyType SHARED_ACCESS_KEY = fromString("SharedAccessKey"); - /** Static value StorageAccessKey for StorageKeyType. */ + /** + * Static value StorageAccessKey for StorageKeyType. + */ public static final StorageKeyType STORAGE_ACCESS_KEY = fromString("StorageAccessKey"); + /** + * Creates a new instance of StorageKeyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageKeyType() { + } + /** * Creates or finds a StorageKeyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageKeyType. */ - @JsonCreator public static StorageKeyType fromString(String name) { return fromString(name, StorageKeyType.class); } /** * Gets known StorageKeyType values. - * + * * @return known StorageKeyType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java index 945bd47bfbc59..e79e2886bb125 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SubscriptionUsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of subscription usage metrics in a location. */ +/** + * A list of subscription usage metrics in a location. + */ @Immutable -public final class SubscriptionUsageListResult { +public final class SubscriptionUsageListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SubscriptionUsageListResult class. */ + /** + * Creates an instance of SubscriptionUsageListResult class. + */ public SubscriptionUsageListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionUsageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionUsageListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubscriptionUsageListResult. + */ + public static SubscriptionUsageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionUsageListResult deserializedSubscriptionUsageListResult = new SubscriptionUsageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SubscriptionUsageInner.fromJson(reader1)); + deserializedSubscriptionUsageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSubscriptionUsageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionUsageListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java index cdfa73ab8d8e7..cb63e07e99f1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncAgentLinkedDatabaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync agent linked databases. */ +/** + * A list of sync agent linked databases. + */ @Immutable -public final class SyncAgentLinkedDatabaseListResult { +public final class SyncAgentLinkedDatabaseListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncAgentLinkedDatabaseListResult class. */ + /** + * Creates an instance of SyncAgentLinkedDatabaseListResult class. + */ public SyncAgentLinkedDatabaseListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentLinkedDatabaseListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentLinkedDatabaseListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncAgentLinkedDatabaseListResult. + */ + public static SyncAgentLinkedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentLinkedDatabaseListResult deserializedSyncAgentLinkedDatabaseListResult + = new SyncAgentLinkedDatabaseListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SyncAgentLinkedDatabaseInner.fromJson(reader1)); + deserializedSyncAgentLinkedDatabaseListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncAgentLinkedDatabaseListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentLinkedDatabaseListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java index 654b3e5c5d5cc..82077a7598fac 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncAgentInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync agents. */ +/** + * A list of sync agents. + */ @Immutable -public final class SyncAgentListResult { +public final class SyncAgentListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncAgentListResult class. */ + /** + * Creates an instance of SyncAgentListResult class. + */ public SyncAgentListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncAgentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncAgentListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncAgentListResult. + */ + public static SyncAgentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncAgentListResult deserializedSyncAgentListResult = new SyncAgentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SyncAgentInner.fromJson(reader1)); + deserializedSyncAgentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncAgentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncAgentListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java index dd6b376e327ef..089bd9740d6d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of the sync agent. */ +/** + * State of the sync agent. + */ public final class SyncAgentState extends ExpandableStringEnum { - /** Static value Online for SyncAgentState. */ + /** + * Static value Online for SyncAgentState. + */ public static final SyncAgentState ONLINE = fromString("Online"); - /** Static value Offline for SyncAgentState. */ + /** + * Static value Offline for SyncAgentState. + */ public static final SyncAgentState OFFLINE = fromString("Offline"); - /** Static value NeverConnected for SyncAgentState. */ + /** + * Static value NeverConnected for SyncAgentState. + */ public static final SyncAgentState NEVER_CONNECTED = fromString("NeverConnected"); + /** + * Creates a new instance of SyncAgentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncAgentState() { + } + /** * Creates or finds a SyncAgentState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncAgentState. */ - @JsonCreator public static SyncAgentState fromString(String name) { return fromString(name, SyncAgentState.class); } /** * Gets known SyncAgentState values. - * + * * @return known SyncAgentState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java index fa60f2ecfb32f..d54982a168f7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Conflict resolution policy of the sync group. */ +/** + * Conflict resolution policy of the sync group. + */ public final class SyncConflictResolutionPolicy extends ExpandableStringEnum { - /** Static value HubWin for SyncConflictResolutionPolicy. */ + /** + * Static value HubWin for SyncConflictResolutionPolicy. + */ public static final SyncConflictResolutionPolicy HUB_WIN = fromString("HubWin"); - /** Static value MemberWin for SyncConflictResolutionPolicy. */ + /** + * Static value MemberWin for SyncConflictResolutionPolicy. + */ public static final SyncConflictResolutionPolicy MEMBER_WIN = fromString("MemberWin"); + /** + * Creates a new instance of SyncConflictResolutionPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncConflictResolutionPolicy() { + } + /** * Creates or finds a SyncConflictResolutionPolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncConflictResolutionPolicy. */ - @JsonCreator public static SyncConflictResolutionPolicy fromString(String name) { return fromString(name, SyncConflictResolutionPolicy.class); } /** * Gets known SyncConflictResolutionPolicy values. - * + * * @return known SyncConflictResolutionPolicy values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java index 43e6e3ba1ef78..529ad8be85423 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncDatabaseIdPropertiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync database ID properties. */ +/** + * A list of sync database ID properties. + */ @Immutable -public final class SyncDatabaseIdListResult { +public final class SyncDatabaseIdListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncDatabaseIdListResult class. */ + /** + * Creates an instance of SyncDatabaseIdListResult class. + */ public SyncDatabaseIdListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncDatabaseIdListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncDatabaseIdListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncDatabaseIdListResult. + */ + public static SyncDatabaseIdListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncDatabaseIdListResult deserializedSyncDatabaseIdListResult = new SyncDatabaseIdListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SyncDatabaseIdPropertiesInner.fromJson(reader1)); + deserializedSyncDatabaseIdListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncDatabaseIdListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncDatabaseIdListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java index fe97fa5c099ce..db60ef61d689c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sync direction of the sync member. */ +/** + * Sync direction of the sync member. + */ public final class SyncDirection extends ExpandableStringEnum { - /** Static value Bidirectional for SyncDirection. */ + /** + * Static value Bidirectional for SyncDirection. + */ public static final SyncDirection BIDIRECTIONAL = fromString("Bidirectional"); - /** Static value OneWayMemberToHub for SyncDirection. */ + /** + * Static value OneWayMemberToHub for SyncDirection. + */ public static final SyncDirection ONE_WAY_MEMBER_TO_HUB = fromString("OneWayMemberToHub"); - /** Static value OneWayHubToMember for SyncDirection. */ + /** + * Static value OneWayHubToMember for SyncDirection. + */ public static final SyncDirection ONE_WAY_HUB_TO_MEMBER = fromString("OneWayHubToMember"); + /** + * Creates a new instance of SyncDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncDirection() { + } + /** * Creates or finds a SyncDirection from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncDirection. */ - @JsonCreator public static SyncDirection fromString(String name) { return fromString(name, SyncDirection.class); } /** * Gets known SyncDirection values. - * + * * @return known SyncDirection values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java index 6ef1795a4c998..07f54117e5601 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncFullSchemaPropertiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync schema properties. */ +/** + * A list of sync schema properties. + */ @Immutable -public final class SyncFullSchemaPropertiesListResult { +public final class SyncFullSchemaPropertiesListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncFullSchemaPropertiesListResult class. */ + /** + * Creates an instance of SyncFullSchemaPropertiesListResult class. + */ public SyncFullSchemaPropertiesListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncFullSchemaPropertiesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncFullSchemaPropertiesListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncFullSchemaPropertiesListResult. + */ + public static SyncFullSchemaPropertiesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncFullSchemaPropertiesListResult deserializedSyncFullSchemaPropertiesListResult + = new SyncFullSchemaPropertiesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SyncFullSchemaPropertiesInner.fromJson(reader1)); + deserializedSyncFullSchemaPropertiesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncFullSchemaPropertiesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncFullSchemaPropertiesListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java index cc237d539306c..c4f2909472db5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java @@ -5,49 +5,52 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of the table in the database full schema. */ +/** + * Properties of the table in the database full schema. + */ @Immutable -public final class SyncFullSchemaTable { +public final class SyncFullSchemaTable implements JsonSerializable { /* * List of columns in the table of database full schema. */ - @JsonProperty(value = "columns", access = JsonProperty.Access.WRITE_ONLY) private List columns; /* * Error id of the table. */ - @JsonProperty(value = "errorId", access = JsonProperty.Access.WRITE_ONLY) private String errorId; /* * If there is error in the table. */ - @JsonProperty(value = "hasError", access = JsonProperty.Access.WRITE_ONLY) private Boolean hasError; /* * Name of the table. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Quoted name of the table. */ - @JsonProperty(value = "quotedName", access = JsonProperty.Access.WRITE_ONLY) private String quotedName; - /** Creates an instance of SyncFullSchemaTable class. */ + /** + * Creates an instance of SyncFullSchemaTable class. + */ public SyncFullSchemaTable() { } /** * Get the columns property: List of columns in the table of database full schema. - * + * * @return the columns value. */ public List columns() { @@ -56,7 +59,7 @@ public List columns() { /** * Get the errorId property: Error id of the table. - * + * * @return the errorId value. */ public String errorId() { @@ -65,7 +68,7 @@ public String errorId() { /** * Get the hasError property: If there is error in the table. - * + * * @return the hasError value. */ public Boolean hasError() { @@ -74,7 +77,7 @@ public Boolean hasError() { /** * Get the name property: Name of the table. - * + * * @return the name value. */ public String name() { @@ -83,7 +86,7 @@ public String name() { /** * Get the quotedName property: Quoted name of the table. - * + * * @return the quotedName value. */ public String quotedName() { @@ -92,7 +95,7 @@ public String quotedName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -100,4 +103,49 @@ public void validate() { columns().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncFullSchemaTable from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncFullSchemaTable if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncFullSchemaTable. + */ + public static SyncFullSchemaTable fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncFullSchemaTable deserializedSyncFullSchemaTable = new SyncFullSchemaTable(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("columns".equals(fieldName)) { + List columns + = reader.readArray(reader1 -> SyncFullSchemaTableColumn.fromJson(reader1)); + deserializedSyncFullSchemaTable.columns = columns; + } else if ("errorId".equals(fieldName)) { + deserializedSyncFullSchemaTable.errorId = reader.getString(); + } else if ("hasError".equals(fieldName)) { + deserializedSyncFullSchemaTable.hasError = reader.getNullable(JsonReader::getBoolean); + } else if ("name".equals(fieldName)) { + deserializedSyncFullSchemaTable.name = reader.getString(); + } else if ("quotedName".equals(fieldName)) { + deserializedSyncFullSchemaTable.quotedName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncFullSchemaTable; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTableColumn.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTableColumn.java index ad84951e98995..6008bd1c7a988 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTableColumn.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTableColumn.java @@ -5,60 +5,61 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the column in the table of database full schema. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of the column in the table of database full schema. + */ @Immutable -public final class SyncFullSchemaTableColumn { +public final class SyncFullSchemaTableColumn implements JsonSerializable { /* * Data size of the column. */ - @JsonProperty(value = "dataSize", access = JsonProperty.Access.WRITE_ONLY) private String dataSize; /* * Data type of the column. */ - @JsonProperty(value = "dataType", access = JsonProperty.Access.WRITE_ONLY) private String dataType; /* * Error id of the column. */ - @JsonProperty(value = "errorId", access = JsonProperty.Access.WRITE_ONLY) private String errorId; /* * If there is error in the table. */ - @JsonProperty(value = "hasError", access = JsonProperty.Access.WRITE_ONLY) private Boolean hasError; /* * If it is the primary key of the table. */ - @JsonProperty(value = "isPrimaryKey", access = JsonProperty.Access.WRITE_ONLY) private Boolean isPrimaryKey; /* * Name of the column. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Quoted name of the column. */ - @JsonProperty(value = "quotedName", access = JsonProperty.Access.WRITE_ONLY) private String quotedName; - /** Creates an instance of SyncFullSchemaTableColumn class. */ + /** + * Creates an instance of SyncFullSchemaTableColumn class. + */ public SyncFullSchemaTableColumn() { } /** * Get the dataSize property: Data size of the column. - * + * * @return the dataSize value. */ public String dataSize() { @@ -67,7 +68,7 @@ public String dataSize() { /** * Get the dataType property: Data type of the column. - * + * * @return the dataType value. */ public String dataType() { @@ -76,7 +77,7 @@ public String dataType() { /** * Get the errorId property: Error id of the column. - * + * * @return the errorId value. */ public String errorId() { @@ -85,7 +86,7 @@ public String errorId() { /** * Get the hasError property: If there is error in the table. - * + * * @return the hasError value. */ public Boolean hasError() { @@ -94,7 +95,7 @@ public Boolean hasError() { /** * Get the isPrimaryKey property: If it is the primary key of the table. - * + * * @return the isPrimaryKey value. */ public Boolean isPrimaryKey() { @@ -103,7 +104,7 @@ public Boolean isPrimaryKey() { /** * Get the name property: Name of the column. - * + * * @return the name value. */ public String name() { @@ -112,7 +113,7 @@ public String name() { /** * Get the quotedName property: Quoted name of the column. - * + * * @return the quotedName value. */ public String quotedName() { @@ -121,9 +122,56 @@ public String quotedName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncFullSchemaTableColumn from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncFullSchemaTableColumn if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncFullSchemaTableColumn. + */ + public static SyncFullSchemaTableColumn fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncFullSchemaTableColumn deserializedSyncFullSchemaTableColumn = new SyncFullSchemaTableColumn(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dataSize".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.dataSize = reader.getString(); + } else if ("dataType".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.dataType = reader.getString(); + } else if ("errorId".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.errorId = reader.getString(); + } else if ("hasError".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.hasError = reader.getNullable(JsonReader::getBoolean); + } else if ("isPrimaryKey".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.isPrimaryKey = reader.getNullable(JsonReader::getBoolean); + } else if ("name".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.name = reader.getString(); + } else if ("quotedName".equals(fieldName)) { + deserializedSyncFullSchemaTableColumn.quotedName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncFullSchemaTableColumn; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupListResult.java index 529d0d7194c29..28b5a21e018af 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync groups. */ +/** + * A list of sync groups. + */ @Immutable -public final class SyncGroupListResult { +public final class SyncGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncGroupListResult class. */ + /** + * Creates an instance of SyncGroupListResult class. + */ public SyncGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupListResult. + */ + public static SyncGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupListResult deserializedSyncGroupListResult = new SyncGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SyncGroupInner.fromJson(reader1)); + deserializedSyncGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java index bf0fdad3cd316..b30904836af4e 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncGroupLogPropertiesInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of sync group log properties. */ +/** + * A list of sync group log properties. + */ @Immutable -public final class SyncGroupLogListResult { +public final class SyncGroupLogListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncGroupLogListResult class. */ + /** + * Creates an instance of SyncGroupLogListResult class. + */ public SyncGroupLogListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupLogListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupLogListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupLogListResult. + */ + public static SyncGroupLogListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupLogListResult deserializedSyncGroupLogListResult = new SyncGroupLogListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SyncGroupLogPropertiesInner.fromJson(reader1)); + deserializedSyncGroupLogListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncGroupLogListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupLogListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java index a5bbeefce7675..9e60e11c892bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of the sync group log. */ +/** + * Type of the sync group log. + */ public final class SyncGroupLogType extends ExpandableStringEnum { - /** Static value All for SyncGroupLogType. */ + /** + * Static value All for SyncGroupLogType. + */ public static final SyncGroupLogType ALL = fromString("All"); - /** Static value Error for SyncGroupLogType. */ + /** + * Static value Error for SyncGroupLogType. + */ public static final SyncGroupLogType ERROR = fromString("Error"); - /** Static value Warning for SyncGroupLogType. */ + /** + * Static value Warning for SyncGroupLogType. + */ public static final SyncGroupLogType WARNING = fromString("Warning"); - /** Static value Success for SyncGroupLogType. */ + /** + * Static value Success for SyncGroupLogType. + */ public static final SyncGroupLogType SUCCESS = fromString("Success"); + /** + * Creates a new instance of SyncGroupLogType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncGroupLogType() { + } + /** * Creates or finds a SyncGroupLogType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncGroupLogType. */ - @JsonCreator public static SyncGroupLogType fromString(String name) { return fromString(name, SyncGroupLogType.class); } /** * Gets known SyncGroupLogType values. - * + * * @return known SyncGroupLogType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java index ac3d2a814ccad..f24507878a4a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of sync group schema. */ +/** + * Properties of sync group schema. + */ @Fluent -public final class SyncGroupSchema { +public final class SyncGroupSchema implements JsonSerializable { /* * List of tables in sync group schema. */ - @JsonProperty(value = "tables") private List tables; /* * Name of master sync member where the schema is from. */ - @JsonProperty(value = "masterSyncMemberName") private String masterSyncMemberName; - /** Creates an instance of SyncGroupSchema class. */ + /** + * Creates an instance of SyncGroupSchema class. + */ public SyncGroupSchema() { } /** * Get the tables property: List of tables in sync group schema. - * + * * @return the tables value. */ public List tables() { @@ -38,7 +44,7 @@ public List tables() { /** * Set the tables property: List of tables in sync group schema. - * + * * @param tables the tables value to set. * @return the SyncGroupSchema object itself. */ @@ -49,7 +55,7 @@ public SyncGroupSchema withTables(List tables) { /** * Get the masterSyncMemberName property: Name of master sync member where the schema is from. - * + * * @return the masterSyncMemberName value. */ public String masterSyncMemberName() { @@ -58,7 +64,7 @@ public String masterSyncMemberName() { /** * Set the masterSyncMemberName property: Name of master sync member where the schema is from. - * + * * @param masterSyncMemberName the masterSyncMemberName value to set. * @return the SyncGroupSchema object itself. */ @@ -69,7 +75,7 @@ public SyncGroupSchema withMasterSyncMemberName(String masterSyncMemberName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -77,4 +83,45 @@ public void validate() { tables().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("tables", this.tables, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("masterSyncMemberName", this.masterSyncMemberName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupSchema from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupSchema if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupSchema. + */ + public static SyncGroupSchema fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupSchema deserializedSyncGroupSchema = new SyncGroupSchema(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tables".equals(fieldName)) { + List tables + = reader.readArray(reader1 -> SyncGroupSchemaTable.fromJson(reader1)); + deserializedSyncGroupSchema.tables = tables; + } else if ("masterSyncMemberName".equals(fieldName)) { + deserializedSyncGroupSchema.masterSyncMemberName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupSchema; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java index 8ff39059984fa..3bed16eb5cf5d 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of table in sync group schema. */ +/** + * Properties of table in sync group schema. + */ @Fluent -public final class SyncGroupSchemaTable { +public final class SyncGroupSchemaTable implements JsonSerializable { /* * List of columns in sync group schema. */ - @JsonProperty(value = "columns") private List columns; /* * Quoted name of sync group schema table. */ - @JsonProperty(value = "quotedName") private String quotedName; - /** Creates an instance of SyncGroupSchemaTable class. */ + /** + * Creates an instance of SyncGroupSchemaTable class. + */ public SyncGroupSchemaTable() { } /** * Get the columns property: List of columns in sync group schema. - * + * * @return the columns value. */ public List columns() { @@ -38,7 +44,7 @@ public List columns() { /** * Set the columns property: List of columns in sync group schema. - * + * * @param columns the columns value to set. * @return the SyncGroupSchemaTable object itself. */ @@ -49,7 +55,7 @@ public SyncGroupSchemaTable withColumns(List columns /** * Get the quotedName property: Quoted name of sync group schema table. - * + * * @return the quotedName value. */ public String quotedName() { @@ -58,7 +64,7 @@ public String quotedName() { /** * Set the quotedName property: Quoted name of sync group schema table. - * + * * @param quotedName the quotedName value to set. * @return the SyncGroupSchemaTable object itself. */ @@ -69,7 +75,7 @@ public SyncGroupSchemaTable withQuotedName(String quotedName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -77,4 +83,45 @@ public void validate() { columns().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("columns", this.columns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("quotedName", this.quotedName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupSchemaTable from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupSchemaTable if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupSchemaTable. + */ + public static SyncGroupSchemaTable fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupSchemaTable deserializedSyncGroupSchemaTable = new SyncGroupSchemaTable(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("columns".equals(fieldName)) { + List columns + = reader.readArray(reader1 -> SyncGroupSchemaTableColumn.fromJson(reader1)); + deserializedSyncGroupSchemaTable.columns = columns; + } else if ("quotedName".equals(fieldName)) { + deserializedSyncGroupSchemaTable.quotedName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupSchemaTable; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java index f734bc1f498cd..da43d79c12fd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java @@ -5,36 +5,41 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of column in sync group table. */ +/** + * Properties of column in sync group table. + */ @Fluent -public final class SyncGroupSchemaTableColumn { +public final class SyncGroupSchemaTableColumn implements JsonSerializable { /* * Quoted name of sync group table column. */ - @JsonProperty(value = "quotedName") private String quotedName; /* * Data size of the column. */ - @JsonProperty(value = "dataSize") private String dataSize; /* * Data type of the column. */ - @JsonProperty(value = "dataType") private String dataType; - /** Creates an instance of SyncGroupSchemaTableColumn class. */ + /** + * Creates an instance of SyncGroupSchemaTableColumn class. + */ public SyncGroupSchemaTableColumn() { } /** * Get the quotedName property: Quoted name of sync group table column. - * + * * @return the quotedName value. */ public String quotedName() { @@ -43,7 +48,7 @@ public String quotedName() { /** * Set the quotedName property: Quoted name of sync group table column. - * + * * @param quotedName the quotedName value to set. * @return the SyncGroupSchemaTableColumn object itself. */ @@ -54,7 +59,7 @@ public SyncGroupSchemaTableColumn withQuotedName(String quotedName) { /** * Get the dataSize property: Data size of the column. - * + * * @return the dataSize value. */ public String dataSize() { @@ -63,7 +68,7 @@ public String dataSize() { /** * Set the dataSize property: Data size of the column. - * + * * @param dataSize the dataSize value to set. * @return the SyncGroupSchemaTableColumn object itself. */ @@ -74,7 +79,7 @@ public SyncGroupSchemaTableColumn withDataSize(String dataSize) { /** * Get the dataType property: Data type of the column. - * + * * @return the dataType value. */ public String dataType() { @@ -83,7 +88,7 @@ public String dataType() { /** * Set the dataType property: Data type of the column. - * + * * @param dataType the dataType value to set. * @return the SyncGroupSchemaTableColumn object itself. */ @@ -94,9 +99,51 @@ public SyncGroupSchemaTableColumn withDataType(String dataType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("quotedName", this.quotedName); + jsonWriter.writeStringField("dataSize", this.dataSize); + jsonWriter.writeStringField("dataType", this.dataType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncGroupSchemaTableColumn from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncGroupSchemaTableColumn if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncGroupSchemaTableColumn. + */ + public static SyncGroupSchemaTableColumn fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncGroupSchemaTableColumn deserializedSyncGroupSchemaTableColumn = new SyncGroupSchemaTableColumn(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("quotedName".equals(fieldName)) { + deserializedSyncGroupSchemaTableColumn.quotedName = reader.getString(); + } else if ("dataSize".equals(fieldName)) { + deserializedSyncGroupSchemaTableColumn.dataSize = reader.getString(); + } else if ("dataType".equals(fieldName)) { + deserializedSyncGroupSchemaTableColumn.dataType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncGroupSchemaTableColumn; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java index bf685def1e68e..7957dd1425cdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java @@ -5,40 +5,59 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sync state of the sync group. */ +/** + * Sync state of the sync group. + */ public final class SyncGroupState extends ExpandableStringEnum { - /** Static value NotReady for SyncGroupState. */ + /** + * Static value NotReady for SyncGroupState. + */ public static final SyncGroupState NOT_READY = fromString("NotReady"); - /** Static value Error for SyncGroupState. */ + /** + * Static value Error for SyncGroupState. + */ public static final SyncGroupState ERROR = fromString("Error"); - /** Static value Warning for SyncGroupState. */ + /** + * Static value Warning for SyncGroupState. + */ public static final SyncGroupState WARNING = fromString("Warning"); - /** Static value Progressing for SyncGroupState. */ + /** + * Static value Progressing for SyncGroupState. + */ public static final SyncGroupState PROGRESSING = fromString("Progressing"); - /** Static value Good for SyncGroupState. */ + /** + * Static value Good for SyncGroupState. + */ public static final SyncGroupState GOOD = fromString("Good"); + /** + * Creates a new instance of SyncGroupState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncGroupState() { + } + /** * Creates or finds a SyncGroupState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncGroupState. */ - @JsonCreator public static SyncGroupState fromString(String name) { return fromString(name, SyncGroupState.class); } /** * Gets known SyncGroupState values. - * + * * @return known SyncGroupState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java index 3ce36e57b5c2e..caf97f0f0f35c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SyncGroupsType. */ +/** + * Defines values for SyncGroupsType. + */ public final class SyncGroupsType extends ExpandableStringEnum { - /** Static value All for SyncGroupsType. */ + /** + * Static value All for SyncGroupsType. + */ public static final SyncGroupsType ALL = fromString("All"); - /** Static value Error for SyncGroupsType. */ + /** + * Static value Error for SyncGroupsType. + */ public static final SyncGroupsType ERROR = fromString("Error"); - /** Static value Warning for SyncGroupsType. */ + /** + * Static value Warning for SyncGroupsType. + */ public static final SyncGroupsType WARNING = fromString("Warning"); - /** Static value Success for SyncGroupsType. */ + /** + * Static value Success for SyncGroupsType. + */ public static final SyncGroupsType SUCCESS = fromString("Success"); + /** + * Creates a new instance of SyncGroupsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncGroupsType() { + } + /** * Creates or finds a SyncGroupsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncGroupsType. */ - @JsonCreator public static SyncGroupsType fromString(String name) { return fromString(name, SyncGroupsType.class); } /** * Gets known SyncGroupsType values. - * + * * @return known SyncGroupsType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java index cf20705d2777d..1e05844090dfc 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java @@ -5,31 +5,44 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of the sync agent linked database. */ +/** + * Type of the sync agent linked database. + */ public final class SyncMemberDbType extends ExpandableStringEnum { - /** Static value AzureSqlDatabase for SyncMemberDbType. */ + /** + * Static value AzureSqlDatabase for SyncMemberDbType. + */ public static final SyncMemberDbType AZURE_SQL_DATABASE = fromString("AzureSqlDatabase"); - /** Static value SqlServerDatabase for SyncMemberDbType. */ + /** + * Static value SqlServerDatabase for SyncMemberDbType. + */ public static final SyncMemberDbType SQL_SERVER_DATABASE = fromString("SqlServerDatabase"); + /** + * Creates a new instance of SyncMemberDbType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncMemberDbType() { + } + /** * Creates or finds a SyncMemberDbType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncMemberDbType. */ - @JsonCreator public static SyncMemberDbType fromString(String name) { return fromString(name, SyncMemberDbType.class); } /** * Gets known SyncMemberDbType values. - * + * * @return known SyncMemberDbType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java index 2e5d8be1ebe39..1d2248fa40f57 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of Azure SQL Database sync members. */ +/** + * A list of Azure SQL Database sync members. + */ @Immutable -public final class SyncMemberListResult { +public final class SyncMemberListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SyncMemberListResult class. */ + /** + * Creates an instance of SyncMemberListResult class. + */ public SyncMemberListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SyncMemberListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SyncMemberListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SyncMemberListResult. + */ + public static SyncMemberListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SyncMemberListResult deserializedSyncMemberListResult = new SyncMemberListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SyncMemberInner.fromJson(reader1)); + deserializedSyncMemberListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSyncMemberListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSyncMemberListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java index a52f1e48ce8c3..744ed1505125c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java @@ -5,79 +5,124 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sync state of the sync member. */ +/** + * Sync state of the sync member. + */ public final class SyncMemberState extends ExpandableStringEnum { - /** Static value SyncInProgress for SyncMemberState. */ + /** + * Static value SyncInProgress for SyncMemberState. + */ public static final SyncMemberState SYNC_IN_PROGRESS = fromString("SyncInProgress"); - /** Static value SyncSucceeded for SyncMemberState. */ + /** + * Static value SyncSucceeded for SyncMemberState. + */ public static final SyncMemberState SYNC_SUCCEEDED = fromString("SyncSucceeded"); - /** Static value SyncFailed for SyncMemberState. */ + /** + * Static value SyncFailed for SyncMemberState. + */ public static final SyncMemberState SYNC_FAILED = fromString("SyncFailed"); - /** Static value DisabledTombstoneCleanup for SyncMemberState. */ + /** + * Static value DisabledTombstoneCleanup for SyncMemberState. + */ public static final SyncMemberState DISABLED_TOMBSTONE_CLEANUP = fromString("DisabledTombstoneCleanup"); - /** Static value DisabledBackupRestore for SyncMemberState. */ + /** + * Static value DisabledBackupRestore for SyncMemberState. + */ public static final SyncMemberState DISABLED_BACKUP_RESTORE = fromString("DisabledBackupRestore"); - /** Static value SyncSucceededWithWarnings for SyncMemberState. */ + /** + * Static value SyncSucceededWithWarnings for SyncMemberState. + */ public static final SyncMemberState SYNC_SUCCEEDED_WITH_WARNINGS = fromString("SyncSucceededWithWarnings"); - /** Static value SyncCancelling for SyncMemberState. */ + /** + * Static value SyncCancelling for SyncMemberState. + */ public static final SyncMemberState SYNC_CANCELLING = fromString("SyncCancelling"); - /** Static value SyncCancelled for SyncMemberState. */ + /** + * Static value SyncCancelled for SyncMemberState. + */ public static final SyncMemberState SYNC_CANCELLED = fromString("SyncCancelled"); - /** Static value UnProvisioned for SyncMemberState. */ + /** + * Static value UnProvisioned for SyncMemberState. + */ public static final SyncMemberState UN_PROVISIONED = fromString("UnProvisioned"); - /** Static value Provisioning for SyncMemberState. */ + /** + * Static value Provisioning for SyncMemberState. + */ public static final SyncMemberState PROVISIONING = fromString("Provisioning"); - /** Static value Provisioned for SyncMemberState. */ + /** + * Static value Provisioned for SyncMemberState. + */ public static final SyncMemberState PROVISIONED = fromString("Provisioned"); - /** Static value ProvisionFailed for SyncMemberState. */ + /** + * Static value ProvisionFailed for SyncMemberState. + */ public static final SyncMemberState PROVISION_FAILED = fromString("ProvisionFailed"); - /** Static value DeProvisioning for SyncMemberState. */ + /** + * Static value DeProvisioning for SyncMemberState. + */ public static final SyncMemberState DE_PROVISIONING = fromString("DeProvisioning"); - /** Static value DeProvisioned for SyncMemberState. */ + /** + * Static value DeProvisioned for SyncMemberState. + */ public static final SyncMemberState DE_PROVISIONED = fromString("DeProvisioned"); - /** Static value DeProvisionFailed for SyncMemberState. */ + /** + * Static value DeProvisionFailed for SyncMemberState. + */ public static final SyncMemberState DE_PROVISION_FAILED = fromString("DeProvisionFailed"); - /** Static value Reprovisioning for SyncMemberState. */ + /** + * Static value Reprovisioning for SyncMemberState. + */ public static final SyncMemberState REPROVISIONING = fromString("Reprovisioning"); - /** Static value ReprovisionFailed for SyncMemberState. */ + /** + * Static value ReprovisionFailed for SyncMemberState. + */ public static final SyncMemberState REPROVISION_FAILED = fromString("ReprovisionFailed"); - /** Static value UnReprovisioned for SyncMemberState. */ + /** + * Static value UnReprovisioned for SyncMemberState. + */ public static final SyncMemberState UN_REPROVISIONED = fromString("UnReprovisioned"); + /** + * Creates a new instance of SyncMemberState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyncMemberState() { + } + /** * Creates or finds a SyncMemberState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncMemberState. */ - @JsonCreator public static SyncMemberState fromString(String name) { return fromString(name, SyncMemberState.class); } /** * Gets known SyncMemberState values. - * + * * @return known SyncMemberState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java index 92871a7e3a81b..dbaef53de9882 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java @@ -5,34 +5,49 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The table temporal type. */ +/** + * The table temporal type. + */ public final class TableTemporalType extends ExpandableStringEnum { - /** Static value NonTemporalTable for TableTemporalType. */ + /** + * Static value NonTemporalTable for TableTemporalType. + */ public static final TableTemporalType NON_TEMPORAL_TABLE = fromString("NonTemporalTable"); - /** Static value HistoryTable for TableTemporalType. */ + /** + * Static value HistoryTable for TableTemporalType. + */ public static final TableTemporalType HISTORY_TABLE = fromString("HistoryTable"); - /** Static value SystemVersionedTemporalTable for TableTemporalType. */ + /** + * Static value SystemVersionedTemporalTable for TableTemporalType. + */ public static final TableTemporalType SYSTEM_VERSIONED_TEMPORAL_TABLE = fromString("SystemVersionedTemporalTable"); + /** + * Creates a new instance of TableTemporalType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TableTemporalType() { + } + /** * Creates or finds a TableTemporalType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TableTemporalType. */ - @JsonCreator public static TableTemporalType fromString(String name) { return fromString(name, TableTemporalType.class); } /** * Gets known TableTemporalType values. - * + * * @return known TableTemporalType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java index e60151822f9aa..ad8c69cd47a1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java @@ -6,34 +6,85 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.TdeCertificateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** A TDE certificate that can be uploaded into a server. */ +/** + * A TDE certificate that can be uploaded into a server. + */ @Fluent public final class TdeCertificate extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") private TdeCertificateProperties innerProperties; - /** Creates an instance of TdeCertificate class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TdeCertificate class. + */ public TdeCertificate() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private TdeCertificateProperties innerProperties() { return this.innerProperties; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the privateBlob property: The base64 encoded certificate private blob. - * + * * @return the privateBlob value. */ public String privateBlob() { @@ -42,7 +93,7 @@ public String privateBlob() { /** * Set the privateBlob property: The base64 encoded certificate private blob. - * + * * @param privateBlob the privateBlob value to set. * @return the TdeCertificate object itself. */ @@ -56,7 +107,7 @@ public TdeCertificate withPrivateBlob(String privateBlob) { /** * Get the certPassword property: The certificate password. - * + * * @return the certPassword value. */ public String certPassword() { @@ -65,7 +116,7 @@ public String certPassword() { /** * Set the certPassword property: The certificate password. - * + * * @param certPassword the certPassword value to set. * @return the TdeCertificate object itself. */ @@ -79,7 +130,7 @@ public TdeCertificate withCertPassword(String certPassword) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -87,4 +138,47 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TdeCertificate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TdeCertificate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TdeCertificate. + */ + public static TdeCertificate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TdeCertificate deserializedTdeCertificate = new TdeCertificate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTdeCertificate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTdeCertificate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTdeCertificate.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTdeCertificate.innerProperties = TdeCertificateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTdeCertificate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java index a8d1450ca8028..3bd8da1e2c7a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.TimeZoneInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of time zones. */ +/** + * A list of time zones. + */ @Immutable -public final class TimeZoneListResult { +public final class TimeZoneListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of TimeZoneListResult class. */ + /** + * Creates an instance of TimeZoneListResult class. + */ public TimeZoneListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TimeZoneListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TimeZoneListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TimeZoneListResult. + */ + public static TimeZoneListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TimeZoneListResult deserializedTimeZoneListResult = new TimeZoneListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TimeZoneInner.fromJson(reader1)); + deserializedTimeZoneListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTimeZoneListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTimeZoneListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java index 441aa313ff7e4..b9e94c82f3b3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.TopQueriesInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of top resource consuming queries on managed instance. */ +/** + * A list of top resource consuming queries on managed instance. + */ @Immutable -public final class TopQueriesListResult { +public final class TopQueriesListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of TopQueriesListResult class. */ + /** + * Creates an instance of TopQueriesListResult class. + */ public TopQueriesListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TopQueriesListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TopQueriesListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TopQueriesListResult. + */ + public static TopQueriesListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TopQueriesListResult deserializedTopQueriesListResult = new TopQueriesListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TopQueriesInner.fromJson(reader1)); + deserializedTopQueriesListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTopQueriesListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTopQueriesListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java index 6aada2df54283..afd5dcdfdfbfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TransparentDataEncryptionName. */ +/** + * Defines values for TransparentDataEncryptionName. + */ public final class TransparentDataEncryptionName extends ExpandableStringEnum { - /** Static value current for TransparentDataEncryptionName. */ + /** + * Static value current for TransparentDataEncryptionName. + */ public static final TransparentDataEncryptionName CURRENT = fromString("current"); + /** + * Creates a new instance of TransparentDataEncryptionName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TransparentDataEncryptionName() { + } + /** * Creates or finds a TransparentDataEncryptionName from its string representation. - * + * * @param name a name to look for. * @return the corresponding TransparentDataEncryptionName. */ - @JsonCreator public static TransparentDataEncryptionName fromString(String name) { return fromString(name, TransparentDataEncryptionName.class); } /** * Gets known TransparentDataEncryptionName values. - * + * * @return known TransparentDataEncryptionName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java index 91369b78adde4..fb0fc3d6ca6fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Specifies the state of the transparent data encryption. */ +/** + * Specifies the state of the transparent data encryption. + */ public enum TransparentDataEncryptionState { - /** Enum value Enabled. */ + /** + * Enum value Enabled. + */ ENABLED("Enabled"), - /** Enum value Disabled. */ + /** + * Enum value Disabled. + */ DISABLED("Disabled"); - /** The actual serialized value for a TransparentDataEncryptionState instance. */ + /** + * The actual serialized value for a TransparentDataEncryptionState instance. + */ private final String value; TransparentDataEncryptionState(String value) { @@ -24,11 +29,10 @@ public enum TransparentDataEncryptionState { /** * Parses a serialized value to a TransparentDataEncryptionState instance. - * + * * @param value the serialized value to parse. * @return the parsed TransparentDataEncryptionState object, or null if unable to parse. */ - @JsonCreator public static TransparentDataEncryptionState fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static TransparentDataEncryptionState fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UnitType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UnitType.java index 64a91c41bf7a9..58dc642f6aeaa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UnitType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UnitType.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** Defines values for UnitType. */ @@ -33,7 +32,6 @@ public final class UnitType extends ExpandableStringEnum { * @param name a name to look for. * @return the corresponding UnitType. */ - @JsonCreator public static UnitType fromString(String name) { return fromString(name, UnitType.class); } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java index aebce6a8a9021..69bd5d33f9eb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java @@ -5,25 +5,33 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.UpdateLongTermRetentionBackupParametersProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Contains the information necessary to perform long term retention backup update operation. */ +/** + * Contains the information necessary to perform long term retention backup update operation. + */ @Fluent -public final class UpdateLongTermRetentionBackupParameters { +public final class UpdateLongTermRetentionBackupParameters + implements JsonSerializable { /* * Resource properties. */ - @JsonProperty(value = "properties") private UpdateLongTermRetentionBackupParametersProperties innerProperties; - /** Creates an instance of UpdateLongTermRetentionBackupParameters class. */ + /** + * Creates an instance of UpdateLongTermRetentionBackupParameters class. + */ public UpdateLongTermRetentionBackupParameters() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private UpdateLongTermRetentionBackupParametersProperties innerProperties() { @@ -32,7 +40,7 @@ private UpdateLongTermRetentionBackupParametersProperties innerProperties() { /** * Get the requestedBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @return the requestedBackupStorageRedundancy value. */ public BackupStorageRedundancy requestedBackupStorageRedundancy() { @@ -41,12 +49,12 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { /** * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the copied backup. - * + * * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. * @return the UpdateLongTermRetentionBackupParameters object itself. */ - public UpdateLongTermRetentionBackupParameters withRequestedBackupStorageRedundancy( - BackupStorageRedundancy requestedBackupStorageRedundancy) { + public UpdateLongTermRetentionBackupParameters + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { if (this.innerProperties() == null) { this.innerProperties = new UpdateLongTermRetentionBackupParametersProperties(); } @@ -56,7 +64,7 @@ public UpdateLongTermRetentionBackupParameters withRequestedBackupStorageRedunda /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -64,4 +72,42 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateLongTermRetentionBackupParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateLongTermRetentionBackupParameters if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UpdateLongTermRetentionBackupParameters. + */ + public static UpdateLongTermRetentionBackupParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateLongTermRetentionBackupParameters deserializedUpdateLongTermRetentionBackupParameters + = new UpdateLongTermRetentionBackupParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedUpdateLongTermRetentionBackupParameters.innerProperties + = UpdateLongTermRetentionBackupParametersProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateLongTermRetentionBackupParameters; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java index 19d773f823df0..64566cf5ec307 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java @@ -5,42 +5,47 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The UpsertManagedServerOperationParameters model. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The UpsertManagedServerOperationParameters model. + */ @Fluent -public final class UpsertManagedServerOperationParameters { +public final class UpsertManagedServerOperationParameters + implements JsonSerializable { /* * The family property. */ - @JsonProperty(value = "family") private String family; /* * The tier property. */ - @JsonProperty(value = "tier") private String tier; /* * The vCores property. */ - @JsonProperty(value = "vCores") private Integer vCores; /* * The storageSizeInGB property. */ - @JsonProperty(value = "storageSizeInGB") private Integer storageSizeInGB; - /** Creates an instance of UpsertManagedServerOperationParameters class. */ + /** + * Creates an instance of UpsertManagedServerOperationParameters class. + */ public UpsertManagedServerOperationParameters() { } /** * Get the family property: The family property. - * + * * @return the family value. */ public String family() { @@ -49,7 +54,7 @@ public String family() { /** * Set the family property: The family property. - * + * * @param family the family value to set. * @return the UpsertManagedServerOperationParameters object itself. */ @@ -60,7 +65,7 @@ public UpsertManagedServerOperationParameters withFamily(String family) { /** * Get the tier property: The tier property. - * + * * @return the tier value. */ public String tier() { @@ -69,7 +74,7 @@ public String tier() { /** * Set the tier property: The tier property. - * + * * @param tier the tier value to set. * @return the UpsertManagedServerOperationParameters object itself. */ @@ -80,7 +85,7 @@ public UpsertManagedServerOperationParameters withTier(String tier) { /** * Get the vCores property: The vCores property. - * + * * @return the vCores value. */ public Integer vCores() { @@ -89,7 +94,7 @@ public Integer vCores() { /** * Set the vCores property: The vCores property. - * + * * @param vCores the vCores value to set. * @return the UpsertManagedServerOperationParameters object itself. */ @@ -100,7 +105,7 @@ public UpsertManagedServerOperationParameters withVCores(Integer vCores) { /** * Get the storageSizeInGB property: The storageSizeInGB property. - * + * * @return the storageSizeInGB value. */ public Integer storageSizeInGB() { @@ -109,7 +114,7 @@ public Integer storageSizeInGB() { /** * Set the storageSizeInGB property: The storageSizeInGB property. - * + * * @param storageSizeInGB the storageSizeInGB value to set. * @return the UpsertManagedServerOperationParameters object itself. */ @@ -120,9 +125,56 @@ public UpsertManagedServerOperationParameters withStorageSizeInGB(Integer storag /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeNumberField("vCores", this.vCores); + jsonWriter.writeNumberField("storageSizeInGB", this.storageSizeInGB); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpsertManagedServerOperationParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpsertManagedServerOperationParameters if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UpsertManagedServerOperationParameters. + */ + public static UpsertManagedServerOperationParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpsertManagedServerOperationParameters deserializedUpsertManagedServerOperationParameters + = new UpsertManagedServerOperationParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("family".equals(fieldName)) { + deserializedUpsertManagedServerOperationParameters.family = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedUpsertManagedServerOperationParameters.tier = reader.getString(); + } else if ("vCores".equals(fieldName)) { + deserializedUpsertManagedServerOperationParameters.vCores = reader.getNullable(JsonReader::getInt); + } else if ("storageSizeInGB".equals(fieldName)) { + deserializedUpsertManagedServerOperationParameters.storageSizeInGB + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedUpsertManagedServerOperationParameters; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java index 93e8af77b8241..9b244f10ea41c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java @@ -5,55 +5,60 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; -/** The UpsertManagedServerOperationStepWithEstimatesAndDuration model. */ +/** + * The UpsertManagedServerOperationStepWithEstimatesAndDuration model. + */ @Fluent -public final class UpsertManagedServerOperationStepWithEstimatesAndDuration { +public final class UpsertManagedServerOperationStepWithEstimatesAndDuration + implements JsonSerializable { /* * The stepStartTime property. */ - @JsonProperty(value = "stepStartTime") private OffsetDateTime stepStartTime; /* * The stepEndTime property. */ - @JsonProperty(value = "stepEndTime") private OffsetDateTime stepEndTime; /* * The timeElapsed property. */ - @JsonProperty(value = "timeElapsed") private String timeElapsed; /* * The order property. */ - @JsonProperty(value = "order") private Integer order; /* * The name property. */ - @JsonProperty(value = "name") private String name; /* * The status property. */ - @JsonProperty(value = "status") private Status status; - /** Creates an instance of UpsertManagedServerOperationStepWithEstimatesAndDuration class. */ + /** + * Creates an instance of UpsertManagedServerOperationStepWithEstimatesAndDuration class. + */ public UpsertManagedServerOperationStepWithEstimatesAndDuration() { } /** * Get the stepStartTime property: The stepStartTime property. - * + * * @return the stepStartTime value. */ public OffsetDateTime stepStartTime() { @@ -62,7 +67,7 @@ public OffsetDateTime stepStartTime() { /** * Set the stepStartTime property: The stepStartTime property. - * + * * @param stepStartTime the stepStartTime value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -73,7 +78,7 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withStepStartTim /** * Get the stepEndTime property: The stepEndTime property. - * + * * @return the stepEndTime value. */ public OffsetDateTime stepEndTime() { @@ -82,7 +87,7 @@ public OffsetDateTime stepEndTime() { /** * Set the stepEndTime property: The stepEndTime property. - * + * * @param stepEndTime the stepEndTime value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -93,7 +98,7 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withStepEndTime( /** * Get the timeElapsed property: The timeElapsed property. - * + * * @return the timeElapsed value. */ public String timeElapsed() { @@ -102,7 +107,7 @@ public String timeElapsed() { /** * Set the timeElapsed property: The timeElapsed property. - * + * * @param timeElapsed the timeElapsed value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -113,7 +118,7 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withTimeElapsed( /** * Get the order property: The order property. - * + * * @return the order value. */ public Integer order() { @@ -122,7 +127,7 @@ public Integer order() { /** * Set the order property: The order property. - * + * * @param order the order value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -133,7 +138,7 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withOrder(Intege /** * Get the name property: The name property. - * + * * @return the name value. */ public String name() { @@ -142,7 +147,7 @@ public String name() { /** * Set the name property: The name property. - * + * * @param name the name value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -153,7 +158,7 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withName(String /** * Get the status property: The status property. - * + * * @return the status value. */ public Status status() { @@ -162,7 +167,7 @@ public Status status() { /** * Set the status property: The status property. - * + * * @param status the status value to set. * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. */ @@ -173,9 +178,70 @@ public UpsertManagedServerOperationStepWithEstimatesAndDuration withStatus(Statu /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("stepStartTime", + this.stepStartTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.stepStartTime)); + jsonWriter.writeStringField("stepEndTime", + this.stepEndTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.stepEndTime)); + jsonWriter.writeStringField("timeElapsed", this.timeElapsed); + jsonWriter.writeNumberField("order", this.order); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpsertManagedServerOperationStepWithEstimatesAndDuration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpsertManagedServerOperationStepWithEstimatesAndDuration if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * UpsertManagedServerOperationStepWithEstimatesAndDuration. + */ + public static UpsertManagedServerOperationStepWithEstimatesAndDuration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + UpsertManagedServerOperationStepWithEstimatesAndDuration deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration + = new UpsertManagedServerOperationStepWithEstimatesAndDuration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("stepStartTime".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.stepStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("stepEndTime".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.stepEndTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("timeElapsed".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.timeElapsed + = reader.getString(); + } else if ("order".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.order + = reader.getNullable(JsonReader::getInt); + } else if ("name".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration.status + = Status.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUpsertManagedServerOperationStepWithEstimatesAndDuration; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java index 68ea861570bee..c27483c821818 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of usages. */ +/** + * A list of usages. + */ @Immutable -public final class UsageListResult { +public final class UsageListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of UsageListResult class. */ + /** + * Creates an instance of UsageListResult class. + */ public UsageListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UsageListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the UsageListResult. + */ + public static UsageListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageListResult deserializedUsageListResult = new UsageListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> UsageInner.fromJson(reader1)); + deserializedUsageListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedUsageListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUsageListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java index 0db9b53b29178..3e59b628ec8eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java @@ -5,31 +5,37 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.UUID; -/** Azure Active Directory identity configuration for a resource. */ +/** + * Azure Active Directory identity configuration for a resource. + */ @Immutable -public class UserIdentity { +public final class UserIdentity implements JsonSerializable { /* * The Azure Active Directory principal id. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* * The Azure Active Directory client id. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserIdentity class. */ + /** + * Creates an instance of UserIdentity class. + */ public UserIdentity() { } /** * Get the principalId property: The Azure Active Directory principal id. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +44,7 @@ public UUID principalId() { /** * Get the clientId property: The Azure Active Directory client id. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,9 +53,48 @@ public UUID clientId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the UserIdentity. + */ + public static UserIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserIdentity deserializedUserIdentity = new UserIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("clientId".equals(fieldName)) { + deserializedUserIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUserIdentity; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java index 9c8177da16089..be4a5e404dc02 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.VirtualClusterInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of virtual clusters. */ +/** + * A list of virtual clusters. + */ @Immutable -public final class VirtualClusterListResult { +public final class VirtualClusterListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of VirtualClusterListResult class. */ + /** + * Creates an instance of VirtualClusterListResult class. + */ public VirtualClusterListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualClusterListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualClusterListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualClusterListResult. + */ + public static VirtualClusterListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualClusterListResult deserializedVirtualClusterListResult = new VirtualClusterListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VirtualClusterInner.fromJson(reader1)); + deserializedVirtualClusterListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualClusterListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualClusterListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java index 808605f3f4056..3abbab58535f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java @@ -5,35 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.VirtualClusterProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; -/** An update request for an Azure SQL Database virtual cluster. */ +/** + * An update request for an Azure SQL Database virtual cluster. + */ @Fluent -public final class VirtualClusterUpdate { +public final class VirtualClusterUpdate implements JsonSerializable { /* * Resource properties. */ - @JsonProperty(value = "properties") private VirtualClusterProperties innerProperties; /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of VirtualClusterUpdate class. */ + /** + * Creates an instance of VirtualClusterUpdate class. + */ public VirtualClusterUpdate() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private VirtualClusterProperties innerProperties() { @@ -42,7 +46,7 @@ private VirtualClusterProperties innerProperties() { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -51,7 +55,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the VirtualClusterUpdate object itself. */ @@ -62,7 +66,7 @@ public VirtualClusterUpdate withTags(Map tags) { /** * Get the subnetId property: Subnet resource ID for the virtual cluster. - * + * * @return the subnetId value. */ public String subnetId() { @@ -72,7 +76,7 @@ public String subnetId() { /** * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @return the family value. */ public String family() { @@ -82,7 +86,7 @@ public String family() { /** * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @param family the family value to set. * @return the VirtualClusterUpdate object itself. */ @@ -96,7 +100,7 @@ public VirtualClusterUpdate withFamily(String family) { /** * Get the childResources property: List of resources in this virtual cluster. - * + * * @return the childResources value. */ public List childResources() { @@ -106,7 +110,7 @@ public List childResources() { /** * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @return the maintenanceConfigurationId value. */ public String maintenanceConfigurationId() { @@ -116,7 +120,7 @@ public String maintenanceConfigurationId() { /** * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual * cluster. - * + * * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. * @return the VirtualClusterUpdate object itself. */ @@ -130,7 +134,7 @@ public VirtualClusterUpdate withMaintenanceConfigurationId(String maintenanceCon /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -138,4 +142,44 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualClusterUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualClusterUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualClusterUpdate. + */ + public static VirtualClusterUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualClusterUpdate deserializedVirtualClusterUpdate = new VirtualClusterUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedVirtualClusterUpdate.innerProperties = VirtualClusterProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVirtualClusterUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualClusterUpdate; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java index 6f26536966bbb..2d5d4cec41aa5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of virtual network rules. */ +/** + * A list of virtual network rules. + */ @Immutable -public final class VirtualNetworkRuleListResult { +public final class VirtualNetworkRuleListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of VirtualNetworkRuleListResult class. */ + /** + * Creates an instance of VirtualNetworkRuleListResult class. + */ public VirtualNetworkRuleListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualNetworkRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualNetworkRuleListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualNetworkRuleListResult. + */ + public static VirtualNetworkRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualNetworkRuleListResult deserializedVirtualNetworkRuleListResult = new VirtualNetworkRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VirtualNetworkRuleInner.fromJson(reader1)); + deserializedVirtualNetworkRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualNetworkRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualNetworkRuleListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java index c4be161ff31a5..22e79a6126b7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java @@ -5,43 +5,64 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Virtual Network Rule State. */ +/** + * Virtual Network Rule State. + */ public final class VirtualNetworkRuleState extends ExpandableStringEnum { - /** Static value Initializing for VirtualNetworkRuleState. */ + /** + * Static value Initializing for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState INITIALIZING = fromString("Initializing"); - /** Static value InProgress for VirtualNetworkRuleState. */ + /** + * Static value InProgress for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState IN_PROGRESS = fromString("InProgress"); - /** Static value Ready for VirtualNetworkRuleState. */ + /** + * Static value Ready for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState READY = fromString("Ready"); - /** Static value Failed for VirtualNetworkRuleState. */ + /** + * Static value Failed for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState FAILED = fromString("Failed"); - /** Static value Deleting for VirtualNetworkRuleState. */ + /** + * Static value Deleting for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState DELETING = fromString("Deleting"); - /** Static value Unknown for VirtualNetworkRuleState. */ + /** + * Static value Unknown for VirtualNetworkRuleState. + */ public static final VirtualNetworkRuleState UNKNOWN = fromString("Unknown"); + /** + * Creates a new instance of VirtualNetworkRuleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VirtualNetworkRuleState() { + } + /** * Creates or finds a VirtualNetworkRuleState from its string representation. - * + * * @param name a name to look for. * @return the corresponding VirtualNetworkRuleState. */ - @JsonCreator public static VirtualNetworkRuleState fromString(String name) { return fromString(name, VirtualNetworkRuleState.class); } /** * Gets known VirtualNetworkRuleState values. - * + * * @return known VirtualNetworkRuleState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java index 357dc84087c78..1a091ec2ccb16 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java @@ -5,28 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VulnerabilityAssessmentName. */ +/** + * Defines values for VulnerabilityAssessmentName. + */ public final class VulnerabilityAssessmentName extends ExpandableStringEnum { - /** Static value default for VulnerabilityAssessmentName. */ + /** + * Static value default for VulnerabilityAssessmentName. + */ public static final VulnerabilityAssessmentName DEFAULT = fromString("default"); + /** + * Creates a new instance of VulnerabilityAssessmentName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VulnerabilityAssessmentName() { + } + /** * Creates or finds a VulnerabilityAssessmentName from its string representation. - * + * * @param name a name to look for. * @return the corresponding VulnerabilityAssessmentName. */ - @JsonCreator public static VulnerabilityAssessmentName fromString(String name) { return fromString(name, VulnerabilityAssessmentName.class); } /** * Gets known VulnerabilityAssessmentName values. - * + * * @return known VulnerabilityAssessmentName values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java index 53ea70278e1c2..c3a9135af66b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.sql.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for VulnerabilityAssessmentPolicyBaselineName. */ +/** + * Defines values for VulnerabilityAssessmentPolicyBaselineName. + */ public enum VulnerabilityAssessmentPolicyBaselineName { - /** Enum value master. */ + /** + * Enum value master. + */ MASTER("master"), - /** Enum value default. */ + /** + * Enum value default. + */ DEFAULT("default"); - /** The actual serialized value for a VulnerabilityAssessmentPolicyBaselineName instance. */ + /** + * The actual serialized value for a VulnerabilityAssessmentPolicyBaselineName instance. + */ private final String value; VulnerabilityAssessmentPolicyBaselineName(String value) { @@ -24,11 +29,10 @@ public enum VulnerabilityAssessmentPolicyBaselineName { /** * Parses a serialized value to a VulnerabilityAssessmentPolicyBaselineName instance. - * + * * @param value the serialized value to parse. * @return the parsed VulnerabilityAssessmentPolicyBaselineName object, or null if unable to parse. */ - @JsonCreator public static VulnerabilityAssessmentPolicyBaselineName fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static VulnerabilityAssessmentPolicyBaselineName fromString(String value) return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java index 9d74a1e51abdb..7a5491955496f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java @@ -5,37 +5,43 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Properties of a Vulnerability Assessment recurring scans. */ +/** + * Properties of a Vulnerability Assessment recurring scans. + */ @Fluent -public final class VulnerabilityAssessmentRecurringScansProperties { +public final class VulnerabilityAssessmentRecurringScansProperties + implements JsonSerializable { /* * Recurring scans state. */ - @JsonProperty(value = "isEnabled") private Boolean isEnabled; /* * Specifies that the schedule scan notification will be is sent to the subscription administrators. */ - @JsonProperty(value = "emailSubscriptionAdmins") private Boolean emailSubscriptionAdmins; /* * Specifies an array of e-mail addresses to which the scan notification is sent. */ - @JsonProperty(value = "emails") private List emails; - /** Creates an instance of VulnerabilityAssessmentRecurringScansProperties class. */ + /** + * Creates an instance of VulnerabilityAssessmentRecurringScansProperties class. + */ public VulnerabilityAssessmentRecurringScansProperties() { } /** * Get the isEnabled property: Recurring scans state. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -44,7 +50,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Recurring scans state. - * + * * @param isEnabled the isEnabled value to set. * @return the VulnerabilityAssessmentRecurringScansProperties object itself. */ @@ -56,7 +62,7 @@ public VulnerabilityAssessmentRecurringScansProperties withIsEnabled(Boolean isE /** * Get the emailSubscriptionAdmins property: Specifies that the schedule scan notification will be is sent to the * subscription administrators. - * + * * @return the emailSubscriptionAdmins value. */ public Boolean emailSubscriptionAdmins() { @@ -66,19 +72,19 @@ public Boolean emailSubscriptionAdmins() { /** * Set the emailSubscriptionAdmins property: Specifies that the schedule scan notification will be is sent to the * subscription administrators. - * + * * @param emailSubscriptionAdmins the emailSubscriptionAdmins value to set. * @return the VulnerabilityAssessmentRecurringScansProperties object itself. */ - public VulnerabilityAssessmentRecurringScansProperties withEmailSubscriptionAdmins( - Boolean emailSubscriptionAdmins) { + public VulnerabilityAssessmentRecurringScansProperties + withEmailSubscriptionAdmins(Boolean emailSubscriptionAdmins) { this.emailSubscriptionAdmins = emailSubscriptionAdmins; return this; } /** * Get the emails property: Specifies an array of e-mail addresses to which the scan notification is sent. - * + * * @return the emails value. */ public List emails() { @@ -87,7 +93,7 @@ public List emails() { /** * Set the emails property: Specifies an array of e-mail addresses to which the scan notification is sent. - * + * * @param emails the emails value to set. * @return the VulnerabilityAssessmentRecurringScansProperties object itself. */ @@ -98,9 +104,55 @@ public VulnerabilityAssessmentRecurringScansProperties withEmails(List e /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isEnabled", this.isEnabled); + jsonWriter.writeBooleanField("emailSubscriptionAdmins", this.emailSubscriptionAdmins); + jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityAssessmentRecurringScansProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityAssessmentRecurringScansProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityAssessmentRecurringScansProperties. + */ + public static VulnerabilityAssessmentRecurringScansProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityAssessmentRecurringScansProperties deserializedVulnerabilityAssessmentRecurringScansProperties + = new VulnerabilityAssessmentRecurringScansProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isEnabled".equals(fieldName)) { + deserializedVulnerabilityAssessmentRecurringScansProperties.isEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("emailSubscriptionAdmins".equals(fieldName)) { + deserializedVulnerabilityAssessmentRecurringScansProperties.emailSubscriptionAdmins + = reader.getNullable(JsonReader::getBoolean); + } else if ("emails".equals(fieldName)) { + List emails = reader.readArray(reader1 -> reader1.getString()); + deserializedVulnerabilityAssessmentRecurringScansProperties.emails = emails; + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityAssessmentRecurringScansProperties; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java index 5debb0a0266bf..22ae7fd3150e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Properties of a vulnerability assessment scan error. */ +/** + * Properties of a vulnerability assessment scan error. + */ @Immutable -public final class VulnerabilityAssessmentScanError { +public final class VulnerabilityAssessmentScanError implements JsonSerializable { /* * The error code. */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) private String code; /* * The error message. */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of VulnerabilityAssessmentScanError class. */ + /** + * Creates an instance of VulnerabilityAssessmentScanError class. + */ public VulnerabilityAssessmentScanError() { } /** * Get the code property: The error code. - * + * * @return the code value. */ public String code() { @@ -37,7 +43,7 @@ public String code() { /** * Get the message property: The error message. - * + * * @return the message value. */ public String message() { @@ -46,9 +52,47 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityAssessmentScanError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityAssessmentScanError if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityAssessmentScanError. + */ + public static VulnerabilityAssessmentScanError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityAssessmentScanError deserializedVulnerabilityAssessmentScanError + = new VulnerabilityAssessmentScanError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanError.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanError.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityAssessmentScanError; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java index 3a29b116edff6..9918bb9bdadab 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java @@ -5,32 +5,39 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.VulnerabilityAssessmentScanRecordInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of vulnerability assessment scan records. */ +/** + * A list of vulnerability assessment scan records. + */ @Immutable -public final class VulnerabilityAssessmentScanRecordListResult { +public final class VulnerabilityAssessmentScanRecordListResult + implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of VulnerabilityAssessmentScanRecordListResult class. */ + /** + * Creates an instance of VulnerabilityAssessmentScanRecordListResult class. + */ public VulnerabilityAssessmentScanRecordListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +46,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +63,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityAssessmentScanRecordListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityAssessmentScanRecordListResult if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityAssessmentScanRecordListResult. + */ + public static VulnerabilityAssessmentScanRecordListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityAssessmentScanRecordListResult deserializedVulnerabilityAssessmentScanRecordListResult + = new VulnerabilityAssessmentScanRecordListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VulnerabilityAssessmentScanRecordInner.fromJson(reader1)); + deserializedVulnerabilityAssessmentScanRecordListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVulnerabilityAssessmentScanRecordListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityAssessmentScanRecordListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java index 550ba0c3cd620..9e9dc0fc52908 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java @@ -5,37 +5,54 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The scan status. */ +/** + * The scan status. + */ public final class VulnerabilityAssessmentScanState extends ExpandableStringEnum { - /** Static value Passed for VulnerabilityAssessmentScanState. */ + /** + * Static value Passed for VulnerabilityAssessmentScanState. + */ public static final VulnerabilityAssessmentScanState PASSED = fromString("Passed"); - /** Static value Failed for VulnerabilityAssessmentScanState. */ + /** + * Static value Failed for VulnerabilityAssessmentScanState. + */ public static final VulnerabilityAssessmentScanState FAILED = fromString("Failed"); - /** Static value FailedToRun for VulnerabilityAssessmentScanState. */ + /** + * Static value FailedToRun for VulnerabilityAssessmentScanState. + */ public static final VulnerabilityAssessmentScanState FAILED_TO_RUN = fromString("FailedToRun"); - /** Static value InProgress for VulnerabilityAssessmentScanState. */ + /** + * Static value InProgress for VulnerabilityAssessmentScanState. + */ public static final VulnerabilityAssessmentScanState IN_PROGRESS = fromString("InProgress"); + /** + * Creates a new instance of VulnerabilityAssessmentScanState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VulnerabilityAssessmentScanState() { + } + /** * Creates or finds a VulnerabilityAssessmentScanState from its string representation. - * + * * @param name a name to look for. * @return the corresponding VulnerabilityAssessmentScanState. */ - @JsonCreator public static VulnerabilityAssessmentScanState fromString(String name) { return fromString(name, VulnerabilityAssessmentScanState.class); } /** * Gets known VulnerabilityAssessmentScanState values. - * + * * @return known VulnerabilityAssessmentScanState values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java index 621a570187aac..e89fd6d505a64 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java @@ -5,32 +5,45 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The scan trigger type. */ +/** + * The scan trigger type. + */ public final class VulnerabilityAssessmentScanTriggerType extends ExpandableStringEnum { - /** Static value OnDemand for VulnerabilityAssessmentScanTriggerType. */ + /** + * Static value OnDemand for VulnerabilityAssessmentScanTriggerType. + */ public static final VulnerabilityAssessmentScanTriggerType ON_DEMAND = fromString("OnDemand"); - /** Static value Recurring for VulnerabilityAssessmentScanTriggerType. */ + /** + * Static value Recurring for VulnerabilityAssessmentScanTriggerType. + */ public static final VulnerabilityAssessmentScanTriggerType RECURRING = fromString("Recurring"); + /** + * Creates a new instance of VulnerabilityAssessmentScanTriggerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VulnerabilityAssessmentScanTriggerType() { + } + /** * Creates or finds a VulnerabilityAssessmentScanTriggerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding VulnerabilityAssessmentScanTriggerType. */ - @JsonCreator public static VulnerabilityAssessmentScanTriggerType fromString(String name) { return fromString(name, VulnerabilityAssessmentScanTriggerType.class); } /** * Gets known VulnerabilityAssessmentScanTriggerType values. - * + * * @return known VulnerabilityAssessmentScanTriggerType values. */ public static Collection values() { diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java index cbc9f3f3acfbd..36ca29e98ec16 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of workload classifiers for a workload group. */ +/** + * A list of workload classifiers for a workload group. + */ @Immutable -public final class WorkloadClassifierListResult { +public final class WorkloadClassifierListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of WorkloadClassifierListResult class. */ + /** + * Creates an instance of WorkloadClassifierListResult class. + */ public WorkloadClassifierListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,43 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadClassifierListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadClassifierListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkloadClassifierListResult. + */ + public static WorkloadClassifierListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadClassifierListResult deserializedWorkloadClassifierListResult = new WorkloadClassifierListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadClassifierInner.fromJson(reader1)); + deserializedWorkloadClassifierListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadClassifierListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadClassifierListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java index 353d1fae6bf27..80e92dd534dc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.fluent.models.WorkloadGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** A list of workload groups. */ +/** + * A list of workload groups. + */ @Immutable -public final class WorkloadGroupListResult { +public final class WorkloadGroupListResult implements JsonSerializable { /* * Array of results. */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * Link to retrieve next page of results. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of WorkloadGroupListResult class. */ + /** + * Creates an instance of WorkloadGroupListResult class. + */ public WorkloadGroupListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +54,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -56,4 +62,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadGroupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkloadGroupListResult. + */ + public static WorkloadGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadGroupListResult deserializedWorkloadGroupListResult = new WorkloadGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> WorkloadGroupInner.fromJson(reader1)); + deserializedWorkloadGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadGroupListResult; + }); + } } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java index 02beaab4fb68e..46edc41b0cab7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java @@ -3,8 +3,8 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for SqlManagementClient. The Azure SQL Database management API provides a RESTful - * set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to - * create, retrieve, update, and delete databases. + * Package containing the data models for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.models; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java index 87e527f9e267d..bbfe86a17c041 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java @@ -3,8 +3,8 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for SqlManagementClient. The Azure SQL Database management API provides a RESTful set - * of web services that interact with Azure SQL Database services to manage your databases. The API enables you to - * create, retrieve, update, and delete databases. + * Package containing the classes for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql; diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/module-info.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/module-info.java index 77fef21e116a2..24208566b7625 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/module-info.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/module-info.java @@ -11,11 +11,7 @@ exports com.azure.resourcemanager.sql.fluent.models; exports com.azure.resourcemanager.sql.models; - // open packages specifically for azure core and jackson - opens com.azure.resourcemanager.sql.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.sql.models to - com.azure.core, - com.fasterxml.jackson.databind; + // open packages specifically for azure core + opens com.azure.resourcemanager.sql.fluent.models to com.azure.core; + opens com.azure.resourcemanager.sql.models to com.azure.core; } diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json index 041c9b3933c48..49208400deb05 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.sql.implementation.BackupShortTermRetentionPoliciesClientImpl$BackupShortTermRetentionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerBlobAuditingPoliciesClientImpl$ServerBlobAuditingPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseBlobAuditingPoliciesClientImpl$DatabaseBlobAuditingPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ExtendedDatabaseBlobAuditingPoliciesClientImpl$ExtendedDatabaseBlobAuditingPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ExtendedServerBlobAuditingPoliciesClientImpl$ExtendedServerBlobAuditingPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseAdvancedThreatProtectionSettingsClientImpl$DatabaseAdvancedThreatProtectionSettingsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseAdvisorsClientImpl$DatabaseAdvisorsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseAutomaticTuningsClientImpl$DatabaseAutomaticTuningsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseColumnsClientImpl$DatabaseColumnsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseExtensionsOperationsClientImpl$DatabaseExtensionsOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseOperationsClientImpl$DatabaseOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseRecommendedActionsClientImpl$DatabaseRecommendedActionsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabasesClientImpl$DatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseSchemasClientImpl$DatabaseSchemasService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseSecurityAlertPoliciesClientImpl$DatabaseSecurityAlertPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseTablesClientImpl$DatabaseTablesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseUsagesClientImpl$DatabaseUsagesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$DatabaseVulnerabilityAssessmentRuleBaselinesService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentsClientImpl$DatabaseVulnerabilityAssessmentsService" ], [ "com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentScansClientImpl$DatabaseVulnerabilityAssessmentScansService" ], [ "com.azure.resourcemanager.sql.implementation.DataMaskingPoliciesClientImpl$DataMaskingPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.DataMaskingRulesClientImpl$DataMaskingRulesService" ], [ "com.azure.resourcemanager.sql.implementation.DataWarehouseUserActivitiesOperationsClientImpl$DataWarehouseUserActivitiesOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.DeletedServersClientImpl$DeletedServersService" ], [ "com.azure.resourcemanager.sql.implementation.DistributedAvailabilityGroupsClientImpl$DistributedAvailabilityGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.ElasticPoolOperationsClientImpl$ElasticPoolOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.ElasticPoolsClientImpl$ElasticPoolsService" ], [ "com.azure.resourcemanager.sql.implementation.EncryptionProtectorsClientImpl$EncryptionProtectorsService" ], [ "com.azure.resourcemanager.sql.implementation.EndpointCertificatesClientImpl$EndpointCertificatesService" ], [ "com.azure.resourcemanager.sql.implementation.FailoverGroupsClientImpl$FailoverGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.FirewallRulesClientImpl$FirewallRulesService" ], [ "com.azure.resourcemanager.sql.implementation.GeoBackupPoliciesClientImpl$GeoBackupPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.InstanceFailoverGroupsClientImpl$InstanceFailoverGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.InstancePoolsClientImpl$InstancePoolsService" ], [ "com.azure.resourcemanager.sql.implementation.IPv6FirewallRulesClientImpl$IPv6FirewallRulesService" ], [ "com.azure.resourcemanager.sql.implementation.JobAgentsClientImpl$JobAgentsService" ], [ "com.azure.resourcemanager.sql.implementation.JobCredentialsClientImpl$JobCredentialsService" ], [ "com.azure.resourcemanager.sql.implementation.JobExecutionsClientImpl$JobExecutionsService" ], [ "com.azure.resourcemanager.sql.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.sql.implementation.JobStepExecutionsClientImpl$JobStepExecutionsService" ], [ "com.azure.resourcemanager.sql.implementation.JobStepsClientImpl$JobStepsService" ], [ "com.azure.resourcemanager.sql.implementation.JobTargetExecutionsClientImpl$JobTargetExecutionsService" ], [ "com.azure.resourcemanager.sql.implementation.JobTargetGroupsClientImpl$JobTargetGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.JobVersionsClientImpl$JobVersionsService" ], [ "com.azure.resourcemanager.sql.implementation.LedgerDigestUploadsOperationsClientImpl$LedgerDigestUploadsOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.CapabilitiesClientImpl$CapabilitiesService" ], [ "com.azure.resourcemanager.sql.implementation.LongTermRetentionBackupsClientImpl$LongTermRetentionBackupsService" ], [ "com.azure.resourcemanager.sql.implementation.LongTermRetentionManagedInstanceBackupsClientImpl$LongTermRetentionManagedInstanceBackupsService" ], [ "com.azure.resourcemanager.sql.implementation.LongTermRetentionPoliciesClientImpl$LongTermRetentionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.MaintenanceWindowOptionsOperationsClientImpl$MaintenanceWindowOptionsOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.MaintenanceWindowsOperationsClientImpl$MaintenanceWindowsOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedBackupShortTermRetentionPoliciesClientImpl$ManagedBackupShortTermRetentionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseColumnsClientImpl$ManagedDatabaseColumnsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseQueriesClientImpl$ManagedDatabaseQueriesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseRestoreDetailsClientImpl$ManagedDatabaseRestoreDetailsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabasesClientImpl$ManagedDatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseSchemasClientImpl$ManagedDatabaseSchemasService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityAlertPoliciesClientImpl$ManagedDatabaseSecurityAlertPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityEventsClientImpl$ManagedDatabaseSecurityEventsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseSensitivityLabelsClientImpl$ManagedDatabaseSensitivityLabelsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseRecommendedSensitivityLabelsClientImpl$ManagedDatabaseRecommendedSensitivityLabelsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseTablesClientImpl$ManagedDatabaseTablesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseTransparentDataEncryptionsClientImpl$ManagedDatabaseTransparentDataEncryptionsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentsClientImpl$ManagedDatabaseVulnerabilityAssessmentsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentScansClientImpl$ManagedDatabaseVulnerabilityAssessmentScansService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceAdministratorsClientImpl$ManagedInstanceAdministratorsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceAzureADOnlyAuthenticationsClientImpl$ManagedInstanceAzureADOnlyAuthenticationsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceEncryptionProtectorsClientImpl$ManagedInstanceEncryptionProtectorsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceKeysClientImpl$ManagedInstanceKeysService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceLongTermRetentionPoliciesClientImpl$ManagedInstanceLongTermRetentionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceOperationsClientImpl$ManagedInstanceOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateEndpointConnectionsClientImpl$ManagedInstancePrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateLinkResourcesClientImpl$ManagedInstancePrivateLinkResourcesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstancesClientImpl$ManagedInstancesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceTdeCertificatesClientImpl$ManagedInstanceTdeCertificatesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedInstanceVulnerabilityAssessmentsClientImpl$ManagedInstanceVulnerabilityAssessmentsService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl$ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedServerDnsAliasesClientImpl$ManagedServerDnsAliasesService" ], [ "com.azure.resourcemanager.sql.implementation.ManagedServerSecurityAlertPoliciesClientImpl$ManagedServerSecurityAlertPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.sql.implementation.OutboundFirewallRulesClientImpl$OutboundFirewallRulesService" ], [ "com.azure.resourcemanager.sql.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.sql.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.sql.implementation.RecoverableDatabasesClientImpl$RecoverableDatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.RecoverableManagedDatabasesClientImpl$RecoverableManagedDatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.ReplicationLinksClientImpl$ReplicationLinksService" ], [ "com.azure.resourcemanager.sql.implementation.RestorableDroppedDatabasesClientImpl$RestorableDroppedDatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.RestorableDroppedManagedDatabasesClientImpl$RestorableDroppedManagedDatabasesService" ], [ "com.azure.resourcemanager.sql.implementation.RestorePointsClientImpl$RestorePointsService" ], [ "com.azure.resourcemanager.sql.implementation.SensitivityLabelsClientImpl$SensitivityLabelsService" ], [ "com.azure.resourcemanager.sql.implementation.RecommendedSensitivityLabelsClientImpl$RecommendedSensitivityLabelsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerAdvancedThreatProtectionSettingsClientImpl$ServerAdvancedThreatProtectionSettingsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerAdvisorsClientImpl$ServerAdvisorsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerAutomaticTuningsClientImpl$ServerAutomaticTuningsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerAzureADAdministratorsClientImpl$ServerAzureADAdministratorsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerAzureADOnlyAuthenticationsClientImpl$ServerAzureADOnlyAuthenticationsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerConnectionPoliciesClientImpl$ServerConnectionPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerDevOpsAuditSettingsClientImpl$ServerDevOpsAuditSettingsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerDnsAliasesClientImpl$ServerDnsAliasesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerKeysClientImpl$ServerKeysService" ], [ "com.azure.resourcemanager.sql.implementation.ServerOperationsClientImpl$ServerOperationsService" ], [ "com.azure.resourcemanager.sql.implementation.ServersClientImpl$ServersService" ], [ "com.azure.resourcemanager.sql.implementation.ServerSecurityAlertPoliciesClientImpl$ServerSecurityAlertPoliciesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerTrustCertificatesClientImpl$ServerTrustCertificatesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerTrustGroupsClientImpl$ServerTrustGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.ServerUsagesClientImpl$ServerUsagesService" ], [ "com.azure.resourcemanager.sql.implementation.ServerVulnerabilityAssessmentsClientImpl$ServerVulnerabilityAssessmentsService" ], [ "com.azure.resourcemanager.sql.implementation.SqlAgentsClientImpl$SqlAgentsService" ], [ "com.azure.resourcemanager.sql.implementation.SubscriptionUsagesClientImpl$SubscriptionUsagesService" ], [ "com.azure.resourcemanager.sql.implementation.SyncAgentsClientImpl$SyncAgentsService" ], [ "com.azure.resourcemanager.sql.implementation.SyncGroupsClientImpl$SyncGroupsService" ], [ "com.azure.resourcemanager.sql.implementation.SyncMembersClientImpl$SyncMembersService" ], [ "com.azure.resourcemanager.sql.implementation.TdeCertificatesClientImpl$TdeCertificatesService" ], [ "com.azure.resourcemanager.sql.implementation.TimeZonesClientImpl$TimeZonesService" ], [ "com.azure.resourcemanager.sql.implementation.TransparentDataEncryptionsClientImpl$TransparentDataEncryptionsService" ], [ "com.azure.resourcemanager.sql.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.sql.implementation.VirtualClustersClientImpl$VirtualClustersService" ], [ "com.azure.resourcemanager.sql.implementation.VirtualNetworkRulesClientImpl$VirtualNetworkRulesService" ], [ "com.azure.resourcemanager.sql.implementation.WorkloadClassifiersClientImpl$WorkloadClassifiersService" ], [ "com.azure.resourcemanager.sql.implementation.WorkloadGroupsClientImpl$WorkloadGroupsService" ] ] \ No newline at end of file +[["com.azure.resourcemanager.sql.implementation.BackupShortTermRetentionPoliciesClientImpl$BackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingPoliciesClientImpl$DataMaskingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingRulesClientImpl$DataMaskingRulesService"],["com.azure.resourcemanager.sql.implementation.DataWarehouseUserActivitiesOperationsClientImpl$DataWarehouseUserActivitiesOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvancedThreatProtectionSettingsClientImpl$DatabaseAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvisorsClientImpl$DatabaseAdvisorsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAutomaticTuningsClientImpl$DatabaseAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.DatabaseBlobAuditingPoliciesClientImpl$DatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseColumnsClientImpl$DatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.DatabaseExtensionsOperationsClientImpl$DatabaseExtensionsOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseOperationsClientImpl$DatabaseOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseRecommendedActionsClientImpl$DatabaseRecommendedActionsService"],["com.azure.resourcemanager.sql.implementation.DatabaseSchemasClientImpl$DatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.DatabaseSecurityAlertPoliciesClientImpl$DatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseTablesClientImpl$DatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.DatabaseUsagesClientImpl$DatabaseUsagesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$DatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentScansClientImpl$DatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentsClientImpl$DatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.sql.implementation.DeletedServersClientImpl$DeletedServersService"],["com.azure.resourcemanager.sql.implementation.DistributedAvailabilityGroupsClientImpl$DistributedAvailabilityGroupsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolOperationsClientImpl$ElasticPoolOperationsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolsClientImpl$ElasticPoolsService"],["com.azure.resourcemanager.sql.implementation.EncryptionProtectorsClientImpl$EncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.EndpointCertificatesClientImpl$EndpointCertificatesService"],["com.azure.resourcemanager.sql.implementation.ExtendedDatabaseBlobAuditingPoliciesClientImpl$ExtendedDatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ExtendedServerBlobAuditingPoliciesClientImpl$ExtendedServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.FailoverGroupsClientImpl$FailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.GeoBackupPoliciesClientImpl$GeoBackupPoliciesService"],["com.azure.resourcemanager.sql.implementation.IPv6FirewallRulesClientImpl$IPv6FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.InstanceFailoverGroupsClientImpl$InstanceFailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.InstancePoolsClientImpl$InstancePoolsService"],["com.azure.resourcemanager.sql.implementation.JobAgentsClientImpl$JobAgentsService"],["com.azure.resourcemanager.sql.implementation.JobCredentialsClientImpl$JobCredentialsService"],["com.azure.resourcemanager.sql.implementation.JobExecutionsClientImpl$JobExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobStepExecutionsClientImpl$JobStepExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobStepsClientImpl$JobStepsService"],["com.azure.resourcemanager.sql.implementation.JobTargetExecutionsClientImpl$JobTargetExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobTargetGroupsClientImpl$JobTargetGroupsService"],["com.azure.resourcemanager.sql.implementation.JobVersionsClientImpl$JobVersionsService"],["com.azure.resourcemanager.sql.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.sql.implementation.LedgerDigestUploadsOperationsClientImpl$LedgerDigestUploadsOperationsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionBackupsClientImpl$LongTermRetentionBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionManagedInstanceBackupsClientImpl$LongTermRetentionManagedInstanceBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionPoliciesClientImpl$LongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowOptionsOperationsClientImpl$MaintenanceWindowOptionsOperationsService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowsOperationsClientImpl$MaintenanceWindowsOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedBackupShortTermRetentionPoliciesClientImpl$ManagedBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseColumnsClientImpl$ManagedDatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseQueriesClientImpl$ManagedDatabaseQueriesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRecommendedSensitivityLabelsClientImpl$ManagedDatabaseRecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRestoreDetailsClientImpl$ManagedDatabaseRestoreDetailsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSchemasClientImpl$ManagedDatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityAlertPoliciesClientImpl$ManagedDatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityEventsClientImpl$ManagedDatabaseSecurityEventsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSensitivityLabelsClientImpl$ManagedDatabaseSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTablesClientImpl$ManagedDatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTransparentDataEncryptionsClientImpl$ManagedDatabaseTransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentScansClientImpl$ManagedDatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentsClientImpl$ManagedDatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabasesClientImpl$ManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAdministratorsClientImpl$ManagedInstanceAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAzureADOnlyAuthenticationsClientImpl$ManagedInstanceAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceEncryptionProtectorsClientImpl$ManagedInstanceEncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceKeysClientImpl$ManagedInstanceKeysService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceLongTermRetentionPoliciesClientImpl$ManagedInstanceLongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceOperationsClientImpl$ManagedInstanceOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateEndpointConnectionsClientImpl$ManagedInstancePrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateLinkResourcesClientImpl$ManagedInstancePrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceTdeCertificatesClientImpl$ManagedInstanceTdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceVulnerabilityAssessmentsClientImpl$ManagedInstanceVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancesClientImpl$ManagedInstancesService"],["com.azure.resourcemanager.sql.implementation.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl$ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerDnsAliasesClientImpl$ManagedServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerSecurityAlertPoliciesClientImpl$ManagedServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.sql.implementation.OutboundFirewallRulesClientImpl$OutboundFirewallRulesService"],["com.azure.resourcemanager.sql.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.RecommendedSensitivityLabelsClientImpl$RecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.RecoverableDatabasesClientImpl$RecoverableDatabasesService"],["com.azure.resourcemanager.sql.implementation.RecoverableManagedDatabasesClientImpl$RecoverableManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ReplicationLinksClientImpl$ReplicationLinksService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedDatabasesClientImpl$RestorableDroppedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedManagedDatabasesClientImpl$RestorableDroppedManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorePointsClientImpl$RestorePointsService"],["com.azure.resourcemanager.sql.implementation.SensitivityLabelsClientImpl$SensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvancedThreatProtectionSettingsClientImpl$ServerAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvisorsClientImpl$ServerAdvisorsService"],["com.azure.resourcemanager.sql.implementation.ServerAutomaticTuningsClientImpl$ServerAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADAdministratorsClientImpl$ServerAzureADAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADOnlyAuthenticationsClientImpl$ServerAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ServerBlobAuditingPoliciesClientImpl$ServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerConnectionPoliciesClientImpl$ServerConnectionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerDevOpsAuditSettingsClientImpl$ServerDevOpsAuditSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerDnsAliasesClientImpl$ServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ServerKeysClientImpl$ServerKeysService"],["com.azure.resourcemanager.sql.implementation.ServerOperationsClientImpl$ServerOperationsService"],["com.azure.resourcemanager.sql.implementation.ServerSecurityAlertPoliciesClientImpl$ServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustCertificatesClientImpl$ServerTrustCertificatesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustGroupsClientImpl$ServerTrustGroupsService"],["com.azure.resourcemanager.sql.implementation.ServerUsagesClientImpl$ServerUsagesService"],["com.azure.resourcemanager.sql.implementation.ServerVulnerabilityAssessmentsClientImpl$ServerVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.sql.implementation.SqlAgentsClientImpl$SqlAgentsService"],["com.azure.resourcemanager.sql.implementation.SubscriptionUsagesClientImpl$SubscriptionUsagesService"],["com.azure.resourcemanager.sql.implementation.SyncAgentsClientImpl$SyncAgentsService"],["com.azure.resourcemanager.sql.implementation.SyncGroupsClientImpl$SyncGroupsService"],["com.azure.resourcemanager.sql.implementation.SyncMembersClientImpl$SyncMembersService"],["com.azure.resourcemanager.sql.implementation.TdeCertificatesClientImpl$TdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.TimeZonesClientImpl$TimeZonesService"],["com.azure.resourcemanager.sql.implementation.TransparentDataEncryptionsClientImpl$TransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.sql.implementation.VirtualClustersClientImpl$VirtualClustersService"],["com.azure.resourcemanager.sql.implementation.VirtualNetworkRulesClientImpl$VirtualNetworkRulesService"],["com.azure.resourcemanager.sql.implementation.WorkloadClassifiersClientImpl$WorkloadClassifiersService"],["com.azure.resourcemanager.sql.implementation.WorkloadGroupsClientImpl$WorkloadGroupsService"]] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/reflect-config.json b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/reflect-config.json index 1dc7fce684337..0637a088a01e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/reflect-config.json +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/reflect-config.json @@ -1,2896 +1 @@ -[ { - "name" : "com.azure.resourcemanager.sql.models.BackupShortTermRetentionPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerBlobAuditingPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseBlobAuditingPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ExtendedDatabaseBlobAuditingPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ExtendedServerBlobAuditingPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseAdvancedThreatProtectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseAdvancedThreatProtectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AdvancedThreatProtectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AdvisorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AdvisorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecommendedActionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecommendedActionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionStateInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionImplementationInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionErrorInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionImpactRecord", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionMetricInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningOptions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseColumnListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseColumnInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseColumnProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ImportExportExtensionsOperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ImportExportExtensionsOperationResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ImportExportExtensionsOperationResultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateEndpointConnectionRequestStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseExtensions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseExtensionsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.NetworkIsolationSettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseOperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.Sku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseUserIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ExportDatabaseDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ImportExportOperationResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ImportExportOperationResultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ImportExistingDatabaseDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ResourceMoveDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseSchemaListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseSecurityAlertListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SecurityAlertsPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseTableListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseTableProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseUsageListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseUsageInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseUsageProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanRecordListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VulnerabilityAssessmentScanRecordInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VulnerabilityAssessmentScanRecordProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanError", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentScansExportInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentScanExportProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataMaskingPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataMaskingPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataMaskingRuleListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataWarehouseUserActivitiesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataWarehouseUserActivitiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DataWarehouseUserActivitiesProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DeletedServerListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DeletedServerInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DeletedServerProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolOperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ElasticPoolOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ElasticPoolOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ElasticPoolProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ElasticPoolUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EncryptionProtectorListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EndpointCertificateListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.EndpointCertificateInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.EndpointCertificateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FailoverGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.FailoverGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.FailoverGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PartnerInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FailoverGroupUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.FailoverGroupUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FirewallRuleListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerFirewallRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ProxyResourceWithWritableName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ResourceWithWritableName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FirewallRuleList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.GeoBackupPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstanceFailoverGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadOnlyEndpoint", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PartnerRegionInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePairInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.InstancePoolInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.InstancePoolProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.IPv6FirewallRuleListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.IPv6ServerFirewallRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobAgentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobAgentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobAgentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobAgentUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobCredentialListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobCredentialInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobCredentialProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobExecutionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobExecutionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobExecutionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobExecutionTarget", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobSchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobStepInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobStepProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepAction", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepOutput", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepExecutionOptions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobTargetGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobTargetGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobTarget", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobVersionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.JobVersionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LedgerDigestUploadsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LocationCapabilitiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerVersionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EditionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServiceObjectiveCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MaxSizeRangeCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MaxSizeCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LogSizeCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PerformanceLevelCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LicenseTypeCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutoPauseDelayTimeRange", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MinCapacityCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MaintenanceConfigurationCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReadScaleCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.StorageCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolEditionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolPerformanceLevelCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceVersionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceEditionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceFamilyCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceVcoresCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceMaintenanceConfigurationCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolEditionCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolFamilyCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolVcoresCapability", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LongTermRetentionBackupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.CopyLongTermRetentionBackupParametersProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupOperationResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LongTermRetentionOperationResultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.UpdateLongTermRetentionBackupParametersProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionBackupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LongTermRetentionPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LongTermRetentionPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.BaseLongTermRetentionPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowOptionsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowOptionsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedBackupShortTermRetentionPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceQueryInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.QueryProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceQueryStatistics", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.QueryStatisticsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.QueryStatisticsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.QueryMetricInterval", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.QueryMetricProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseRestoreDetailsResultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseRestoreDetailsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CompleteDatabaseRestoreDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseStartMoveDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseSecurityAlertPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseSecurityAlertPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SecurityAlertPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityEventCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SecurityEventInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SecurityEventProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityEventSqlInjectionAdditionalProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SensitivityLabelListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SensitivityLabelProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdatePropertiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecommendedSensitivityLabelUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedTransparentDataEncryptionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceAzureADOnlyAuthListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthenticationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceEncryptionProtectorListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceKeyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceOperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceOperationParametersPair", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.UpsertManagedServerOperationParameters", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceOperationSteps", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.UpsertManagedServerOperationStepWithEstimatesAndDuration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePrivateEndpointConnectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePrivateEndpointProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateLinkInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ResourceIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.UserIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePecProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServicePrincipal", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OutboundEnvironmentEndpointCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.OutboundEnvironmentEndpointInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EndpointDependency", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EndpointDetail", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TopQueriesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.TopQueriesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TdeCertificate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.TdeCertificateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceVulnerabilityAssessmentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedServerDnsAliasListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedServerDnsAliasInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedServerDnsAliasProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedServerDnsAliasCreation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedServerDnsAliasAcquisition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedServerSecurityAlertPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OutboundFirewallRuleListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.OutboundFirewallRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.OutboundFirewallRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateEndpointConnectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateEndpointProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateLinkResourceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.PrivateLinkResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateLinkResourceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecoverableDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecoverableDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecoverableDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecoverableManagedDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecoverableManagedDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RecoverableManagedDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicationLinkListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ReplicationLinkInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ReplicationLinkProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RestorableDroppedDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorableDroppedDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorableDroppedDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RestorableDroppedManagedDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorableDroppedManagedDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorableDroppedManagedDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RestorePointListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorePointInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.RestorePointProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CreateDatabaseRestorePointDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LogicalServerAdvancedThreatProtectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerAdvancedThreatProtectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerAutomaticTuningInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AutomaticTuningServerProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningServerOptions", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdministratorListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerAzureADAdministratorInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AdministratorProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AzureADOnlyAuthListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerAzureADOnlyAuthenticationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.AzureADOnlyAuthProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerConnectionPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerDevOpsAuditSettingsListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditSettingsProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerDnsAliasListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerDnsAliasInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerDnsAliasProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerDnsAliasAcquisition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerKeyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerKeyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerKeyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerOperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerOperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CheckNameAvailabilityRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.CheckNameAvailabilityResponseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerPrivateEndpointConnection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerExternalAdministrator", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ImportNewDatabaseDefinition", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LogicalServerSecurityAlertPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerTrustCertificatesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerTrustGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerUsageListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerUsageInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerUsageProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerVulnerabilityAssessmentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SubscriptionUsageListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SubscriptionUsageInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SubscriptionUsageProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncAgentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncAgentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncAgentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncAgentKeyPropertiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncAgentLinkedDatabaseListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncAgentLinkedDatabaseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncAgentLinkedDatabaseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncDatabaseIdListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncDatabaseIdPropertiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupSchema", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupSchemaTable", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupSchemaTableColumn", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncFullSchemaPropertiesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncFullSchemaPropertiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncFullSchemaTable", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncFullSchemaTableColumn", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupLogListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncGroupLogPropertiesInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncMemberListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncMemberInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.SyncMemberProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TimeZoneListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.TimeZoneInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.TimeZoneProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LogicalDatabaseTransparentDataEncryptionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.LogicalDatabaseTransparentDataEncryptionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.TransparentDataEncryptionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.UsageListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.UsageInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.Name", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VirtualClusterListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VirtualClusterInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VirtualClusterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VirtualClusterUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.UpdateManagedInstanceDnsServersOperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.DnsRefreshConfigurationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VirtualNetworkRuleListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.WorkloadClassifierListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.WorkloadGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.WorkloadGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.fluent.models.WorkloadGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionCurrentState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ColumnDataType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TableTemporalType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OperationMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.StorageKeyType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagementOperationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CreateMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SampleName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CatalogCollationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseLicenseType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseReadScale", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecondaryType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.BackupStorageRedundancy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicaType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityAlertPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanTriggerType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataMaskingPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataWarehouseUserActivityName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicationMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ElasticPoolLicenseType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerKeyType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.EncryptionProtectorName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReadOnlyEndpointFailoverPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.FailoverGroupReplicationRole", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.GeoBackupPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstanceFailoverGroupReplicationRole", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.InstancePoolLicenseType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobAgentState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobExecutionLifecycle", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobTargetType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepActionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepActionSource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobStepOutputType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LedgerDigestUploadsName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CapabilityGroup", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MaxSizeUnit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LogSizeUnit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PerformanceLevelUnit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PauseDelayTimeUnit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.StorageCapabilityStorageAccountType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DatabaseState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DayOfWeek", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.QueryTimeGrainType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.QueryMetricUnitType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RestoreDetailsName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MoveOperationMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TransparentDataEncryptionName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdministratorName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AuthenticationName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.Status", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.IdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstancePropertiesProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedServerCreateMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdministratorType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrincipalType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServicePrincipalType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AggregationFunctionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.MetricType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.OperationOrigin", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateActionsRequire", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.PrivateEndpointProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicationState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicationLinkType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerConnectionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ConnectionPolicyName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerWorkspaceFeature", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ServerTrustGroupPropertiesTrustScopesItem", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SqlAgentConfigurationPropertiesState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncAgentState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncMemberDbType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupsType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncGroupLogType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncDirection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SyncMemberState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DnsRefreshConfigurationPropertiesStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VirtualNetworkRuleState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.BlobAuditingPolicyState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AdvisorStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutoExecuteStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutoExecuteStatusInheritedFrom", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedActionInitiatedBy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ImplementationMethod", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.IsRetryable", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeDesired", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeActual", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningDisabledReason", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityAlertPolicyState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataMaskingState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataMaskingRuleState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.DataMaskingFunction", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.GeoBackupPolicyState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobScheduleType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.JobTargetGroupMembershipType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.LedgerDigestUploadsState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CapabilityStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SecurityEventType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SensitivityLabelRank", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.SensitivityLabelSource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.TransparentDataEncryptionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.ReplicationRole", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.RestorePointType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningServerMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.AutomaticTuningServerReason", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.sql.models.CheckNameAvailabilityReason", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/DatabaseSku.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/DatabaseSku.java index 46a602be911d7..97e71ff7f9970 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/DatabaseSku.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/DatabaseSku.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonValue; import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; @@ -60,7 +59,6 @@ public String toString() { } /** @return the underneath sku description */ - @JsonValue public Sku toSku() { return new Sku() .withName(sku.name()) diff --git a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/ElasticPoolSku.java b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/ElasticPoolSku.java index db2a827b9b86f..1d7a5e8a3016a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/ElasticPoolSku.java +++ b/sdk/resourcemanager/azure-resourcemanager-sql/src/test/resources/ElasticPoolSku.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonValue; import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; @@ -60,7 +59,6 @@ public String toString() { } /** @return the underneath sku description */ - @JsonValue public Sku toSku() { return new Sku() .withName(sku.name()) diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java index 64a5bdfc50c08..9cacd29221040 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java @@ -4,36 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; -/** Samples for BackupShortTermRetentionPolicies CreateOrUpdate. */ +/** + * Samples for BackupShortTermRetentionPolicies CreateOrUpdate. + */ public final class BackupShortTermRetentionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateShortTermRetentionPolicy.json */ /** * Sample code: Update the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getBackupShortTermRetentionPolicies() - .createOrUpdate( - "resourceGroup", - "testsvr", - "testdb", - ShortTermRetentionPolicyName.DEFAULT, - new BackupShortTermRetentionPolicyInner() - .withRetentionDays(7) + .createOrUpdate("resourceGroup", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, + new BackupShortTermRetentionPolicyInner().withRetentionDays(7) .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java index 503307b96b2a4..6a1d9081ad40b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java @@ -4,27 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; -/** Samples for BackupShortTermRetentionPolicies Get. */ +/** + * Samples for BackupShortTermRetentionPolicies Get. + */ public final class BackupShortTermRetentionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetShortTermRetentionPolicy.json */ /** * Sample code: Get the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getBackupShortTermRetentionPolicies() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java index 053a65ad33d50..bb7be883d61d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for BackupShortTermRetentionPolicies ListByDatabase. */ +/** + * Samples for BackupShortTermRetentionPolicies ListByDatabase. + */ public final class BackupShortTermRetentionPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListShortTermRetentionPoliciesByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ListShortTermRetentionPoliciesByDatabase.json */ /** * Sample code: Get the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getBackupShortTermRetentionPolicies() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java index dea1dac8feb31..cd6f93fafd144 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java @@ -4,36 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; -/** Samples for BackupShortTermRetentionPolicies Update. */ +/** + * Samples for BackupShortTermRetentionPolicies Update. + */ public final class BackupShortTermRetentionPoliciesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateShortTermRetentionPolicy.json */ /** * Sample code: Update the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getBackupShortTermRetentionPolicies() - .update( - "resourceGroup", - "testsvr", - "testdb", - ShortTermRetentionPolicyName.DEFAULT, - new BackupShortTermRetentionPolicyInner() - .withRetentionDays(7) + .update("resourceGroup", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, + new BackupShortTermRetentionPolicyInner().withRetentionDays(7) .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java index 1f1b3f36b2682..f856b9c15442d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Capabilities ListByLocation. */ +/** + * Samples for Capabilities ListByLocation. + */ public final class CapabilitiesListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LocationCapabilityListByLocation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LocationCapabilityListByLocation.json */ /** * Sample code: List subscription capabilities in the given location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listSubscriptionCapabilitiesInTheGivenLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listSubscriptionCapabilitiesInTheGivenLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getCapabilities() - .listByLocationWithResponse("eastus", null, Context.NONE); + .listByLocationWithResponse("eastus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java index 5f35fe403310a..fae629d7706a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java @@ -4,58 +4,54 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DataMaskingPolicyInner; import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; import com.azure.resourcemanager.sql.models.DataMaskingState; -/** Samples for DataMaskingPolicies CreateOrUpdate. */ +/** + * Samples for DataMaskingPolicies CreateOrUpdate. + */ public final class DataMaskingPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyCreateOrUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyCreateOrUpdateMin. + * json */ /** * Sample code: Create or update data masking policy min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateDataMaskingPolicyMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingPolicies() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, new DataMaskingPolicyInner().withDataMaskingState(DataMaskingState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyCreateOrUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyCreateOrUpdateMax. + * json */ /** * Sample code: Create or update data masking policy max. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateDataMaskingPolicyMax(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingPolicies() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, - new DataMaskingPolicyInner() - .withDataMaskingState(DataMaskingState.ENABLED) + new DataMaskingPolicyInner().withDataMaskingState(DataMaskingState.ENABLED) .withExemptPrincipals("testuser;"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java index 98f618c0507f7..61618303a1cc5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; -/** Samples for DataMaskingPolicies Get. */ +/** + * Samples for DataMaskingPolicies Get. + */ public final class DataMaskingPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingPolicyGet.json */ /** * Sample code: Gets the database data masking policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheDatabaseDataMaskingPolicies(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingPolicies() - .getWithResponse( - "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, Context.NONE); + .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java index f553402831098..8b9ab2db6bfed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java @@ -4,130 +4,113 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner; import com.azure.resourcemanager.sql.models.DataMaskingFunction; import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; import com.azure.resourcemanager.sql.models.DataMaskingRuleState; -/** Samples for DataMaskingRules CreateOrUpdate. */ +/** + * Samples for DataMaskingRules CreateOrUpdate. + */ public final class DataMaskingRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateNumber.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateNumber. + * json */ /** * Sample code: Create/Update data masking rule for numbers. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createUpdateDataMaskingRuleForNumbers(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingRules() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - "rule1", - new DataMaskingRuleInner() - .withSchemaName("dbo") + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", + DataMaskingPolicyName.DEFAULT, "rule1", + new DataMaskingRuleInner().withSchemaName("dbo") .withTableName("Table_1") .withColumnName("test1") .withMaskingFunction(DataMaskingFunction.NUMBER) .withNumberFrom("0") .withNumberTo("2"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateText.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateText. + * json */ /** * Sample code: Create/Update data masking rule for text. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingRules() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - "rule1", - new DataMaskingRuleInner() - .withSchemaName("dbo") + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", + DataMaskingPolicyName.DEFAULT, "rule1", + new DataMaskingRuleInner().withSchemaName("dbo") .withTableName("Table_1") .withColumnName("test1") .withMaskingFunction(DataMaskingFunction.TEXT) .withPrefixSize("1") .withSuffixSize("0") .withReplacementString("asdf"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DataMaskingRuleCreateOrUpdateDefaultMin.json */ /** * Sample code: Create/Update data masking rule for default min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createUpdateDataMaskingRuleForDefaultMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingRules() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - "rule1", - new DataMaskingRuleInner() - .withSchemaName("dbo") + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", + DataMaskingPolicyName.DEFAULT, "rule1", + new DataMaskingRuleInner().withSchemaName("dbo") .withTableName("Table_1") .withColumnName("test1") .withMaskingFunction(DataMaskingFunction.DEFAULT), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DataMaskingRuleCreateOrUpdateDefaultMax.json */ /** * Sample code: Create/Update data masking rule for default max. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createUpdateDataMaskingRuleForDefaultMax(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingRules() - .createOrUpdateWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - "rule1", - new DataMaskingRuleInner() - .withRuleState(DataMaskingRuleState.ENABLED) + .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", + DataMaskingPolicyName.DEFAULT, "rule1", + new DataMaskingRuleInner().withRuleState(DataMaskingRuleState.ENABLED) .withSchemaName("dbo") .withTableName("Table_1") .withColumnName("test1") .withAliasName("nickname") .withMaskingFunction(DataMaskingFunction.DEFAULT), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java index 922b670635d7c..0448621c472a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; -/** Samples for DataMaskingRules ListByDatabase. */ +/** + * Samples for DataMaskingRules ListByDatabase. + */ public final class DataMaskingRulesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataMaskingRuleListByDatabase.json */ /** * Sample code: Gets a list of database data masking rules. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAListOfDatabaseDataMaskingRules(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataMaskingRules() - .listByDatabase( - "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, Context.NONE); + .listByDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java index ac899dac746f6..af3698ebea69d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java @@ -4,27 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.DataWarehouseUserActivityName; -/** Samples for DataWarehouseUserActivitiesOperation Get. */ +/** + * Samples for DataWarehouseUserActivitiesOperation Get. + */ public final class DataWarehouseUserActivitiesOperationGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDataWarehouseUserActivities.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDataWarehouseUserActivities.json */ /** * Sample code: Get the list of the user activities of a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheListOfTheUserActivitiesOfADataWarehouse( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheListOfTheUserActivitiesOfADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDataWarehouseUserActivitiesOperations() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java index c9c4dcadbc968..a40a108a1b8cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DataWarehouseUserActivitiesOperation ListByDatabase. */ +/** + * Samples for DataWarehouseUserActivitiesOperation ListByDatabase. + */ public final class DataWarehouseUserActivitiesOperationListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDataWarehouseUserActivities.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDataWarehouseUserActivities.json */ /** * Sample code: List of the user activities of a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listOfTheUserActivitiesOfADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDataWarehouseUserActivitiesOperations() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java index 39c0e0a60d71b..26128ef688167 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java @@ -4,58 +4,53 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseAdvancedThreatProtectionInner; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; -/** Samples for DatabaseAdvancedThreatProtectionSettings CreateOrUpdate. */ +/** + * Samples for DatabaseAdvancedThreatProtectionSettings CreateOrUpdate. + */ public final class DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseAdvancedThreatProtectionSettingsCreateMin.json */ /** * Sample code: Update a database's Advanced Threat Protection settings with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse( - "threatprotection-4799", - "threatprotection-6440", - "testdb", + .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", AdvancedThreatProtectionName.DEFAULT, new DatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseAdvancedThreatProtectionSettingsCreateMax.json */ /** * Sample code: Update a database's Advanced Threat Protection settings with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSAdvancedThreatProtectionSettingsWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse( - "threatprotection-4799", - "threatprotection-6440", - "testdb", + .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", AdvancedThreatProtectionName.DEFAULT, new DatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java index f67d67466ce29..8cd6b8e3e9f10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -/** Samples for DatabaseAdvancedThreatProtectionSettings Get. */ +/** + * Samples for DatabaseAdvancedThreatProtectionSettings Get. + */ public final class DatabaseAdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseAdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get a database's Advanced Threat Protection settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getADatabaseSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getADatabaseSAdvancedThreatProtectionSettings(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvancedThreatProtectionSettings() - .getWithResponse( - "threatprotection-6852", - "threatprotection-2080", - "testdb", - AdvancedThreatProtectionName.DEFAULT, - Context.NONE); + .getWithResponse("threatprotection-6852", "threatprotection-2080", "testdb", + AdvancedThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java index 559d38c23c526..dfb084e6312bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseAdvancedThreatProtectionSettings ListByDatabase. */ +/** + * Samples for DatabaseAdvancedThreatProtectionSettings ListByDatabase. + */ public final class DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseAdvancedThreatProtectionSettingsListByDatabase.json */ /** * Sample code: Lists the database's Advanced Threat Protection settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listsTheDatabaseSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listsTheDatabaseSAdvancedThreatProtectionSettings(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvancedThreatProtectionSettings() - .listByDatabase("threatprotection-6852", "threatprotection-2080", "testdb", Context.NONE); + .listByDatabase("threatprotection-6852", "threatprotection-2080", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java index 018fb25fa52ed..5cf96ff2143e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseAdvisors Get. */ +/** + * Samples for DatabaseAdvisors Get. + */ public final class DatabaseAdvisorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorGet.json */ /** * Sample code: Get database advisor. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseAdvisor(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvisors() - .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", Context.NONE); + .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java index 08792f9e15af9..531f48413ca32 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java @@ -4,44 +4,45 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseAdvisors ListByDatabase. */ +/** + * Samples for DatabaseAdvisors ListByDatabase. + */ public final class DatabaseAdvisorsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorList.json */ /** * Sample code: List of database advisors. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listOfDatabaseAdvisors(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvisors() - .listByDatabaseWithResponse( - "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", null, Context.NONE); + .listByDatabaseWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", null, + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionListExpand.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionListExpand. + * json */ /** * Sample code: List of database recommended actions for all advisors. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listOfDatabaseRecommendedActionsForAllAdvisors( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listOfDatabaseRecommendedActionsForAllAdvisors(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvisors() - .listByDatabaseWithResponse( - "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "recommendedActions", Context.NONE); + .listByDatabaseWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", + "recommendedActions", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java index 9abbb35e314cd..486b7354f57ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.AdvisorInner; import com.azure.resourcemanager.sql.models.AutoExecuteStatus; -/** Samples for DatabaseAdvisors Update. */ +/** + * Samples for DatabaseAdvisors Update. + */ public final class DatabaseAdvisorsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAdvisorUpdate.json */ /** * Sample code: Update database advisor. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateDatabaseAdvisor(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAdvisors() - .updateWithResponse( - "workloadinsight-demos", - "misosisvr", - "IndexAdvisor_test_3", - "CreateIndex", - new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), - Context.NONE); + .updateWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", + new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java index d15ede2371772..e0ceed0b4e736 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseAutomaticTuning Get. */ +/** + * Samples for DatabaseAutomaticTuning Get. + */ public final class DatabaseAutomaticTuningGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningGet.json */ /** * Sample code: Get a database's automatic tuning settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSAutomaticTuningSettings(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAutomaticTunings() - .getWithResponse("default-sql-onebox", "testsvr11", "db1", Context.NONE); + .getWithResponse("default-sql-onebox", "testsvr11", "db1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java index cdb5e55c7b46a..3e815279a9e9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningInner; import com.azure.resourcemanager.sql.models.AutomaticTuningMode; import com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeDesired; @@ -12,63 +11,56 @@ import java.util.HashMap; import java.util.Map; -/** Samples for DatabaseAutomaticTuning Update. */ +/** + * Samples for DatabaseAutomaticTuning Update. + */ public final class DatabaseAutomaticTuningUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningUpdateMax.json */ /** * Sample code: Updates database automatic tuning settings with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updatesDatabaseAutomaticTuningSettingsWithAllProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updatesDatabaseAutomaticTuningSettingsWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseAutomaticTunings() - .updateWithResponse( - "default-sql-onebox", - "testsvr11", - "db1", - new DatabaseAutomaticTuningInner() - .withDesiredState(AutomaticTuningMode.AUTO) - .withOptions( - mapOf( - "createIndex", - new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), - "dropIndex", - new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), - "forceLastGoodPlan", - new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), - Context.NONE); + .updateWithResponse("default-sql-onebox", "testsvr11", "db1", + new DatabaseAutomaticTuningInner().withDesiredState(AutomaticTuningMode.AUTO) + .withOptions(mapOf("createIndex", + new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), + "dropIndex", new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), + "forceLastGoodPlan", + new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAutomaticTuningUpdateMin.json */ /** * Sample code: Updates database automatic tuning settings with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesDatabaseAutomaticTuningSettingsWithMinimalProperties( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseAutomaticTunings() - .updateWithResponse( - "default-sql-onebox", - "testsvr11", - "db1", + .updateWithResponse("default-sql-onebox", "testsvr11", "db1", new DatabaseAutomaticTuningInner().withDesiredState(AutomaticTuningMode.AUTO), - Context.NONE); + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java index a7874cdd3155f..080ecd41478de 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java @@ -4,66 +4,56 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; import java.util.Arrays; import java.util.UUID; -/** Samples for DatabaseBlobAuditingPolicies CreateOrUpdate. */ +/** + * Samples for DatabaseBlobAuditingPolicies CreateOrUpdate. + */ public final class DatabaseBlobAuditingPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAzureMonitorAuditingCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAzureMonitorAuditingCreateMin + * .json */ /** * Sample code: Create or update a database's azure monitor auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateADatabaseSAzureMonitorAuditingPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new DatabaseBlobAuditingPolicyInner() - .withIsAzureMonitorTargetEnabled(true) + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new DatabaseBlobAuditingPolicyInner().withIsAzureMonitorTargetEnabled(true) .withState(BlobAuditingPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingCreateMax.json */ /** * Sample code: Create or update a database's blob auditing policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new DatabaseBlobAuditingPolicyInner() - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new DatabaseBlobAuditingPolicyInner().withRetentionDays(6) + .withAuditActionsAndGroups(Arrays.asList("DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public")) .withIsStorageSecondaryKeyInUse(false) .withIsAzureMonitorTargetEnabled(true) .withQueueDelayMs(4000) @@ -71,32 +61,28 @@ public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters( .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingCreateMin.json */ /** * Sample code: Create or update a database's blob auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new DatabaseBlobAuditingPolicyInner() - .withState(BlobAuditingPolicyState.ENABLED) + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new DatabaseBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java index aa337be982f52..291b59da64f11 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseBlobAuditingPolicies Get. */ +/** + * Samples for DatabaseBlobAuditingPolicies Get. + */ public final class DatabaseBlobAuditingPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseBlobAuditingGet.json */ /** * Sample code: Get a database's blob auditing policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSBlobAuditingPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); + .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java index 08aee5613903b..5b3c25be4ab28 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseBlobAuditingPolicies ListByDatabase. */ +/** + * Samples for DatabaseBlobAuditingPolicies ListByDatabase. + */ public final class DatabaseBlobAuditingPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAuditingSettingsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseAuditingSettingsList.json */ /** * Sample code: List audit settings of a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listAuditSettingsOfADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseBlobAuditingPolicies() - .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); + .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java index b1dc4d7f28446..dd2639e9e5c4e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseColumns Get. */ +/** + * Samples for DatabaseColumns Get. + */ public final class DatabaseColumnsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseColumnGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseColumnGet.json */ /** * Sample code: Get database column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseColumn(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseColumns() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", Context.NONE); + .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java index 7fe45e92f301b..9f7ab68beed84 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java @@ -4,51 +4,46 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.Arrays; -/** Samples for DatabaseColumns ListByDatabase. */ +/** + * Samples for DatabaseColumns ListByDatabase. + */ public final class DatabaseColumnsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnsListByDatabaseMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnsListByDatabaseMax.json */ /** * Sample code: Filter database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void filterDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseColumns() - .listByDatabase( - "myRG", - "serverName", - "myDatabase", - Arrays.asList("dbo"), - Arrays.asList("customer", "address"), - Arrays.asList("username"), - Arrays.asList("schema asc", "table", "column desc"), - null, - Context.NONE); + .listByDatabase("myRG", "serverName", "myDatabase", Arrays.asList("dbo"), + Arrays.asList("customer", "address"), Arrays.asList("username"), + Arrays.asList("schema asc", "table", "column desc"), null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnsListByDatabaseMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnsListByDatabaseMin.json */ /** * Sample code: List database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, Context.NONE); + .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java index 87dff35be2643..121fac504359a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseColumns ListByTable. */ +/** + * Samples for DatabaseColumns ListByTable. + */ public final class DatabaseColumnsListByTableSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseColumnListByTable.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseColumnListByTable.json */ /** * Sample code: List database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseColumns() - .listByTable("myRG", "serverName", "myDatabase", "dbo", "table1", null, Context.NONE); + .listByTable("myRG", "serverName", "myDatabase", "dbo", "table1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java index 3027d0d004912..63996801f0dbc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java @@ -4,97 +4,88 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.DatabaseExtensions; import com.azure.resourcemanager.sql.models.OperationMode; import com.azure.resourcemanager.sql.models.StorageKeyType; -/** Samples for DatabaseExtensionsOperation CreateOrUpdate. */ +/** + * Samples for DatabaseExtensionsOperation CreateOrUpdate. + */ public final class DatabaseExtensionsOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabaseUsingDatabaseExtensions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabaseUsingDatabaseExtensions + * .json */ /** * Sample code: Import database using database extension. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void importDatabaseUsingDatabaseExtension(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseExtensionsOperations() - .createOrUpdate( - "rg_062866bf-c4f4-41f9-abf0-b59132ca7924", - "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82", - "db_2a47e946-e414-4c00-94ac-ed886bb78302", - "Import", - new DatabaseExtensions() - .withOperationMode(OperationMode.IMPORT) + .createOrUpdate("rg_062866bf-c4f4-41f9-abf0-b59132ca7924", "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82", + "db_2a47e946-e414-4c00-94ac-ed886bb78302", "Import", + new DatabaseExtensions().withOperationMode(OperationMode.IMPORT) .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml") .withAdministratorLogin("login") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withAuthenticationType("Sql"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabaseUsingDatabaseExtensions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabaseUsingDatabaseExtensions + * .json */ /** * Sample code: Export database using database extension. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void exportDatabaseUsingDatabaseExtension(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseExtensionsOperations() - .createOrUpdate( - "rg_d1ef9eae-044d-4710-ba59-b82e84ad3157", - "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", - "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", - "Export", - new DatabaseExtensions() - .withOperationMode(OperationMode.EXPORT) + .createOrUpdate("rg_d1ef9eae-044d-4710-ba59-b82e84ad3157", "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", + "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", "Export", + new DatabaseExtensions().withOperationMode(OperationMode.EXPORT) .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml") .withAdministratorLogin("login") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withAuthenticationType("Sql"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateDatabaseExtensions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateDatabaseExtensions.json */ /** * Sample code: Create or Update database extensions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateDatabaseExtensions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseExtensionsOperations() - .createOrUpdate( - "rg_20cbe0f0-c2d9-4522-9177-5469aad53029", - "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", - "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", - "polybaseimport", - new DatabaseExtensions() - .withOperationMode(OperationMode.POLYBASE_IMPORT) + .createOrUpdate("rg_20cbe0f0-c2d9-4522-9177-5469aad53029", "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", + "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", "polybaseimport", + new DatabaseExtensions().withOperationMode(OperationMode.POLYBASE_IMPORT) .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java index a0209c9888f34..0d848628a1a3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java @@ -4,29 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseExtensionsOperation Get. */ +/** + * Samples for DatabaseExtensionsOperation Get. + */ public final class DatabaseExtensionsOperationGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDatabaseExtensions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDatabaseExtensions.json */ /** * Sample code: Get database extensions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseExtensions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseExtensionsOperations() - .getWithResponse( - "rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", - "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", - "11aa6c5e-58ed-4693-b303-3b8e3131deaa", - "polybaseimport", - Context.NONE); + .getWithResponse("rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", + "11aa6c5e-58ed-4693-b303-3b8e3131deaa", "polybaseimport", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java index 43fc86c437712..56a0261eba11a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java @@ -4,28 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseExtensionsOperation ListByDatabase. */ +/** + * Samples for DatabaseExtensionsOperation ListByDatabase. + */ public final class DatabaseExtensionsOperationListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabaseExtensions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabaseExtensions.json */ /** * Sample code: List database extensions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseExtensions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseExtensionsOperations() - .listByDatabase( - "rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", - "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", - "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", - Context.NONE); + .listByDatabase("rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", + "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java index a58afb2d5710d..ee9299d7632de 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java @@ -4,30 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for DatabaseOperations Cancel. */ +/** + * Samples for DatabaseOperations Cancel. + */ public final class DatabaseOperationsCancelSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelDatabaseOperation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelDatabaseOperation.json */ /** * Sample code: Cancel the database management operation. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void cancelTheDatabaseManagementOperation(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseOperations() - .cancelWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-6661", - "testdb", - UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), - Context.NONE); + .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-6661", "testdb", + UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java index 5a01ffa2405b7..a24cf8c3ee83b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseOperations ListByDatabase. */ +/** + * Samples for DatabaseOperations ListByDatabase. + */ public final class DatabaseOperationsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabaseOperations.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabaseOperations.json */ /** * Sample code: List the database management operations. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheDatabaseManagementOperations(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseOperations() - .listByDatabase("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", Context.NONE); + .listByDatabase("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java index 3ebd8925d50ee..3b6a026908c9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseRecommendedActions Get. */ +/** + * Samples for DatabaseRecommendedActions Get. + */ public final class DatabaseRecommendedActionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionGet.json */ /** * Sample code: Get database recommended action. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseRecommendedAction(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseRecommendedActions() - .getWithResponse( - "workloadinsight-demos", - "misosisvr", - "IndexAdvisor_test_3", - "CreateIndex", - "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", - Context.NONE); + .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", + "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java index 1db9b4658e583..3e4bdc052e441 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseRecommendedActions ListByDatabaseAdvisor. */ +/** + * Samples for DatabaseRecommendedActions ListByDatabaseAdvisor. + */ public final class DatabaseRecommendedActionsListByDatabaseAdvisorSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionList.json */ /** * Sample code: List of database recommended actions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listOfDatabaseRecommendedActions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseRecommendedActions() - .listByDatabaseAdvisorWithResponse( - "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", Context.NONE); + .listByDatabaseAdvisorWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", + "CreateIndex", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java index eab8bee195249..e07917ce7803d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java @@ -4,36 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.RecommendedActionInner; import com.azure.resourcemanager.sql.models.RecommendedActionCurrentState; import com.azure.resourcemanager.sql.models.RecommendedActionStateInfo; -/** Samples for DatabaseRecommendedActions Update. */ +/** + * Samples for DatabaseRecommendedActions Update. + */ public final class DatabaseRecommendedActionsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRecommendedActionUpdate.json */ /** * Sample code: Update database recommended action. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateDatabaseRecommendedAction(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseRecommendedActions() - .updateWithResponse( - "workloadinsight-demos", - "misosisvr", - "IndexAdvisor_test_3", - "CreateIndex", + .updateWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", - new RecommendedActionInner() - .withState( - new RecommendedActionStateInfo().withCurrentValue(RecommendedActionCurrentState.PENDING)), - Context.NONE); + new RecommendedActionInner().withState( + new RecommendedActionStateInfo().withCurrentValue(RecommendedActionCurrentState.PENDING)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java index 0013c6dadc897..b2c011c9f19a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseSchemas Get. */ +/** + * Samples for DatabaseSchemas Get. + */ public final class DatabaseSchemasGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSchemaGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSchemaGet.json */ /** * Sample code: Get database schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseSchemas() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", Context.NONE); + .getWithResponse("myRG", "serverName", "myDatabase", "dbo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java index 31584c6eaea31..f09a87fc9722f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseSchemas ListByDatabase. */ +/** + * Samples for DatabaseSchemas ListByDatabase. + */ public final class DatabaseSchemasListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSchemaListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSchemaListByDatabase.json */ /** * Sample code: List database schemas. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseSchemas(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseSchemas() - .listByDatabase("myRG", "serverName", "myDatabase", null, Context.NONE); + .listByDatabase("myRG", "serverName", "myDatabase", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java index 64e1c069f2d33..369c21efb13ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java @@ -4,66 +4,60 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; import java.util.Arrays; -/** Samples for DatabaseSecurityAlertPolicies CreateOrUpdate. */ +/** + * Samples for DatabaseSecurityAlertPolicies CreateOrUpdate. + */ public final class DatabaseSecurityAlertPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertCreateMax.json */ /** * Sample code: Update a database's threat detection policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateADatabaseSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateADatabaseSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse( - "securityalert-4799", - "securityalert-6440", - "testdb", + .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, - new DatabaseSecurityAlertPolicyInner() - .withState(SecurityAlertPolicyState.ENABLED) + new DatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) .withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com")) .withEmailAccountAdmins(true) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withRetentionDays(6), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertCreateMin.json */ /** * Sample code: Update a database's threat detection policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse( - "securityalert-4799", - "securityalert-6440", - "testdb", + .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, new DatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java index 644d780089f5a..9c317f3c52324 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -/** Samples for DatabaseSecurityAlertPolicies Get. */ +/** + * Samples for DatabaseSecurityAlertPolicies Get. + */ public final class DatabaseSecurityAlertPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertGet.json */ /** * Sample code: Get a database's threat detection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseSecurityAlertPolicies() - .getWithResponse( - "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE); + .getWithResponse("securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java index 1ec222c909070..87ac4b8286794 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseSecurityAlertPolicies ListByDatabase. */ +/** + * Samples for DatabaseSecurityAlertPolicies ListByDatabase. + */ public final class DatabaseSecurityAlertPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseSecurityAlertListByDatabase. + * json */ /** * Sample code: Get the database's threat detection policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheDatabaseSThreatDetectionPolicies(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseSecurityAlertPolicies() - .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", Context.NONE); + .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java index 52b84f86bd14b..7411dd80b01d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseTables Get. */ +/** + * Samples for DatabaseTables Get. + */ public final class DatabaseTablesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseTableGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseTableGet.json */ /** * Sample code: Get database table. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDatabaseTable(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseTables() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", Context.NONE); + .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java index 485349049f491..5da3e725c183b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseTables ListBySchema. */ +/** + * Samples for DatabaseTables ListBySchema. + */ public final class DatabaseTablesListBySchemaSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseTableListBySchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseTableListBySchema.json */ /** * Sample code: List database tables. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseTables(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseTables() - .listBySchema("myRG", "serverName", "myDatabase", "dbo", null, Context.NONE); + .listBySchema("myRG", "serverName", "myDatabase", "dbo", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java index 7de0e3add1668..d12aa0e6cb9aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseUsages ListByDatabase. */ +/** + * Samples for DatabaseUsages ListByDatabase. + */ public final class DatabaseUsagesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDatabaseUsages.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetDatabaseUsages.json */ /** * Sample code: Gets database usages. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsDatabaseUsages(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseUsages() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java index a57a01f2c4079..4737bce03667e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java @@ -4,47 +4,39 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; import java.util.Arrays; -/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */ +/** + * Samples for DatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. + */ public final class DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentRuleBaselineCreate.json */ /** * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - new DatabaseVulnerabilityAssessmentRuleBaselineInner() - .withBaselineResults( - Arrays - .asList( - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userA", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userB", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), - Context.NONE); + new DatabaseVulnerabilityAssessmentRuleBaselineInner().withBaselineResults(Arrays.asList( + new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userA", "SELECT")), + new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userB", "SELECT")), + new DatabaseVulnerabilityAssessmentRuleBaselineItem() + .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java index 60b63bd7b61bc..d0146ac61d609 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines Delete. */ +/** + * Samples for DatabaseVulnerabilityAssessmentRuleBaselines Delete. + */ public final class DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentRuleBaselineDelete.json */ /** * Sample code: Removes a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java index 6d572137bc419..f863a256af844 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -/** Samples for DatabaseVulnerabilityAssessmentRuleBaselines Get. */ +/** + * Samples for DatabaseVulnerabilityAssessmentRuleBaselines Get. + */ public final class DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentRuleBaselineGet.json */ /** * Sample code: Gets a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentRuleBaselines() - .getWithResponse( - "vulnerabilityaseessmenttest-4711", - "vulnerabilityaseessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.MASTER, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.MASTER, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java index 767b0fad89eb1..95b2de61d8867 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessmentScans Export. */ +/** + * Samples for DatabaseVulnerabilityAssessmentScans Export. + */ public final class DatabaseVulnerabilityAssessmentScansExportSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentScanExport.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentScanExport.json */ /** * Sample code: Export a database's vulnerability assessment scan results. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void exportADatabaseSVulnerabilityAssessmentScanResults( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + exportADatabaseSVulnerabilityAssessmentScanResults(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentScans() - .exportWithResponse( - "vulnerabilityassessmenttest-4799", - "vulnerabilityassessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); + .exportWithResponse("vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java index 705eedc09948a..33de812b06798 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessmentScans Get. */ +/** + * Samples for DatabaseVulnerabilityAssessmentScans Get. + */ public final class DatabaseVulnerabilityAssessmentScansGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentScanRecordsGet.json */ /** * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsADatabaseVulnerabilityAssessmentScanRecordByScanID(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentScans() - .getWithResponse( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); + .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java index 8f82106cae02f..8c7ac357adb5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessmentScans InitiateScan. */ +/** + * Samples for DatabaseVulnerabilityAssessmentScans InitiateScan. + */ public final class DatabaseVulnerabilityAssessmentScansInitiateScanSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentScansExecute.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentScansExecute.json */ /** * Sample code: Executes a database's vulnerability assessment scan. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void executesADatabaseSVulnerabilityAssessmentScan( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentScans() - .initiateScan( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan01", - Context.NONE); + .initiateScan("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java index 726c6b9fe268f..a92bc409bf329 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessmentScans ListByDatabase. */ +/** + * Samples for DatabaseVulnerabilityAssessmentScans ListByDatabase. + */ public final class DatabaseVulnerabilityAssessmentScansListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json */ /** * Sample code: Gets the list of a database vulnerability assessment scan records. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsTheListOfADatabaseVulnerabilityAssessmentScanRecords(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessmentScans() - .listByDatabase( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .listByDatabase("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java index 6de29e3cb37a2..e3aa1e97ae62a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java @@ -4,99 +4,89 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; -/** Samples for DatabaseVulnerabilityAssessments CreateOrUpdate. */ +/** + * Samples for DatabaseVulnerabilityAssessments CreateOrUpdate. + */ public final class DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json */ /** * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is * specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, new DatabaseVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentCreateMax.json */ /** * Sample code: Create a database's vulnerability assessment with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createADatabaseSVulnerabilityAssessmentWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, new DatabaseVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder") .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - Context.NONE); + .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) + .withEmailSubscriptionAdmins(true) + .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json */ /** * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey * is specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, new DatabaseVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java index 559a05e45cf72..f25165ef850d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessments Delete. */ +/** + * Samples for DatabaseVulnerabilityAssessments Delete. + */ public final class DatabaseVulnerabilityAssessmentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentDelete + * .json */ /** * Sample code: Remove a database's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void removeADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java index bc30a08cd2a3f..3dd7573249c35 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for DatabaseVulnerabilityAssessments Get. */ +/** + * Samples for DatabaseVulnerabilityAssessments Get. + */ public final class DatabaseVulnerabilityAssessmentsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentGet. + * json */ /** * Sample code: Get a database's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java index 6e231fa1bd69b..97ef9f001059a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DatabaseVulnerabilityAssessments ListByDatabase. */ +/** + * Samples for DatabaseVulnerabilityAssessments ListByDatabase. + */ public final class DatabaseVulnerabilityAssessmentsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseVulnerabilityAssessmentListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DatabaseVulnerabilityAssessmentListByDatabase.json */ /** * Sample code: Get the database's vulnerability assessment policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheDatabaseSVulnerabilityAssessmentPolicies( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheDatabaseSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabaseVulnerabilityAssessments() - .listByDatabase( - "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE); + .listByDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java index b1866966a53fd..39bb81c65bb2a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseInner; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CreateMode; @@ -12,376 +11,323 @@ import com.azure.resourcemanager.sql.models.Sku; import java.time.OffsetDateTime; -/** Samples for Databases CreateOrUpdate. */ +/** + * Samples for Databases CreateOrUpdate. + */ public final class DatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * CreateDatabaseConfiguredBackupStorageRedundancy.json */ /** * Sample code: Creates a database with specified backup storage redundancy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsADatabaseWithSpecifiedBackupStorageRedundancy( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsADatabaseWithSpecifiedBackupStorageRedundancy(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseInner().withLocation("southeastasia") .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.ZONE), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseDefaultMode.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseDefaultMode.json */ /** * Sample code: Creates a database with default mode. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseWithDefaultMode(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseInner().withLocation("southeastasia") .withSku(new Sku().withName("S0").withTier("Standard")) .withCreateMode(CreateMode.DEFAULT) .withCollation("SQL_Latin1_General_CP1_CI_AS") .withMaxSizeBytes(1073741824L), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateVCoreDatabaseByServiceObjective.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateVCoreDatabaseByServiceObjective + * .json */ /** * Sample code: Creates a VCore database by specifying service objective name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsAVCoreDatabaseBySpecifyingServiceObjectiveName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsAVCoreDatabaseBySpecifyingServiceObjectiveName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseInner().withLocation("southeastasia") .withSku(new Sku().withName("BC").withFamily("Gen4").withCapacity(2)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseMin.json */ /** * Sample code: Creates a database with minimum number of parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsADatabaseWithMinimumNumberOfParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsADatabaseWithMinimumNumberOfParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner().withLocation("southeastasia"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseInner().withLocation("southeastasia"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDwDatabaseCrossSubscriptionRecovery.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * CreateDwDatabaseCrossSubscriptionRecovery.json */ /** * Sample code: Creates a data warehouse database as a cross-subscription restore from a geo-backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromAGeoBackup( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-WestUS", - "testsvr", - "testdw", - new DatabaseInner() - .withLocation("westus") - .withCreateMode(CreateMode.RECOVERY) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"), - Context.NONE); + .createOrUpdate("Default-SQL-WestUS", "testsvr", "testdw", new DatabaseInner().withLocation("westus") + .withCreateMode(CreateMode.RECOVERY) + .withSourceResourceId( + "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * CreateDatabaseMaintenanceConfiguration.json */ /** * Sample code: Creates a database with preferred maintenance window. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsADatabaseWithPreferredMaintenanceWindow( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsADatabaseWithPreferredMaintenanceWindow(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S2").withTier("Standard")) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() + .withLocation("southeastasia") + .withSku(new Sku().withName("S2").withTier("Standard")) + .withCreateMode(CreateMode.DEFAULT) + .withCollation("SQL_Latin1_General_CP1_CI_AS") + .withMaxSizeBytes(1073741824L) + .withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseCopyMode.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseCopyMode.json */ /** * Sample code: Creates a database as a copy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseAsACopy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "dbcopy", - new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.COPY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "dbcopy", new DatabaseInner() + .withLocation("southeastasia") + .withSku(new Sku().withName("S0").withTier("Standard")) + .withCreateMode(CreateMode.COPY) + .withSourceDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabasePITRMode.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabasePITRMode.json */ /** * Sample code: Creates a database from PointInTimeRestore. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseFromPointInTimeRestore(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "dbpitr", - new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb") - .withRestorePointInTime(OffsetDateTime.parse("2020-10-22T05:35:31.503Z")), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "dbpitr", new DatabaseInner() + .withLocation("southeastasia") + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .withSourceDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb") + .withRestorePointInTime(OffsetDateTime.parse("2020-10-22T05:35:31.503Z")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseLedger.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseLedger.json */ /** * Sample code: Creates a database with ledger on. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseWithLedgerOn(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner().withLocation("southeastasia").withIsLedgerOn(true), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDwDatabaseCrossSubscriptionPITR.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDwDatabaseCrossSubscriptionPITR + * .json */ /** * Sample code: Creates a data warehouse database as a cross-subscription restore from a restore point of an * existing database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromARestorePointOfAnExistingDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdw", - new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .withRestorePointInTime(OffsetDateTime.parse("2022-01-22T05:35:31.503Z")) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdw", new DatabaseInner() + .withLocation("southeastasia") + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .withRestorePointInTime(OffsetDateTime.parse("2022-01-22T05:35:31.503Z")) + .withSourceResourceId( + "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateVCoreDatabaseBySkuNameCapacity.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateVCoreDatabaseBySkuNameCapacity. + * json */ /** * Sample code: Creates a VCore database by specifying sku name and capacity. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsAVCoreDatabaseBySpecifyingSkuNameAndCapacity( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsAVCoreDatabaseBySpecifyingSkuNameAndCapacity(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseInner().withLocation("southeastasia") .withSku(new Sku().withName("BC_Gen4").withCapacity(2)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDwDatabaseCrossSubscriptionRestore.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * CreateDwDatabaseCrossSubscriptionRestore.json */ /** * Sample code: Creates a data warehouse database as a cross-subscription restore from a backup of a dropped * database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromABackupOfADroppedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdw", - new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.RESTORE) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdw", new DatabaseInner() + .withLocation("southeastasia") + .withCreateMode(CreateMode.RESTORE) + .withSourceResourceId( + "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseNamedReplica.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseNamedReplica.json */ /** * Sample code: Creates a database as named replica secondary. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseAsNamedReplicaSecondary(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("HS_Gen4").withTier("Hyperscale").withCapacity(2)) - .withCreateMode(CreateMode.SECONDARY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb") - .withSecondaryType(SecondaryType.NAMED), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() + .withLocation("southeastasia") + .withSku(new Sku().withName("HS_Gen4").withTier("Hyperscale").withCapacity(2)) + .withCreateMode(CreateMode.SECONDARY) + .withSourceDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb") + .withSecondaryType(SecondaryType.NAMED), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseSecondaryMode.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateDatabaseSecondaryMode.json */ /** * Sample code: Creates a database as an on-line secondary. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsADatabaseAsAnOnLineSecondary(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.SECONDARY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb") - .withSecondaryType(SecondaryType.GEO), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() + .withLocation("southeastasia") + .withSku(new Sku().withName("S0").withTier("Standard")) + .withCreateMode(CreateMode.SECONDARY) + .withSourceDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb") + .withSecondaryType(SecondaryType.GEO), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java index 4c3897bb9d0fc..4bc4e73fb2605 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases Delete. */ +/** + * Samples for Databases Delete. + */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteDatabase.json */ /** * Sample code: Deletes a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deletesADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java index 321aed93d54ed..1adaa2acdbaea 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java @@ -4,73 +4,65 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ExportDatabaseDefinition; import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; import com.azure.resourcemanager.sql.models.StorageKeyType; -/** Samples for Databases Export. */ +/** + * Samples for Databases Export. + */ public final class DatabasesExportSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabase.json */ /** * Sample code: Exports a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void exportsADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .export( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ExportDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) + .export("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new ExportDatabaseDefinition().withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://test.blob.core.windows.net/test.bacpac") .withAdministratorLogin("login") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withAuthenticationType("Sql"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabaseWithNetworkIsolation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExportDatabaseWithNetworkIsolation. + * json */ /** * Sample code: Exports a database, using private link to communicate with SQL server and storage account. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void exportsADatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .export( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ExportDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation( - new NetworkIsolationSettings() - .withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - Context.NONE); + .export("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ExportDatabaseDefinition() + .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) + .withStorageKey("fakeTokenPlaceholder") + .withStorageUri("https://test.blob.core.windows.net/test.bacpac") + .withAdministratorLogin("login") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withAuthenticationType("Sql") + .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") + .withSqlServerResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java index f03451f3d8a8d..f93b9a9117b34 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ReplicaType; -/** Samples for Databases Failover. */ +/** + * Samples for Databases Failover. + */ public final class DatabasesFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverDatabase.json */ /** * Sample code: Failover an database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void failoverAnDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .failover("group1", "testServer", "testDatabase", ReplicaType.PRIMARY, Context.NONE); + .failover("group1", "testServer", "testDatabase", ReplicaType.PRIMARY, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java index 31372a9186208..2bc74044179a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases Get. */ +/** + * Samples for Databases Get. + */ public final class DatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetVCoreDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetVCoreDatabase.json */ /** * Sample code: Gets a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java index c4635eeeea435..3c83b3578ff22 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java @@ -4,74 +4,66 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ImportExistingDatabaseDefinition; import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; import com.azure.resourcemanager.sql.models.StorageKeyType; -/** Samples for Databases ImportMethod. */ +/** + * Samples for Databases ImportMethod. + */ public final class DatabasesImportMethodSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabase.json */ /** * Sample code: Imports to an existing empty database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void importsToAnExistingEmptyDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .importMethod( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ImportExistingDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) + .importMethod("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new ImportExistingDatabaseDefinition().withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://test.blob.core.windows.net/test.bacpac") .withAdministratorLogin("login") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withAuthenticationType("Sql"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabaseWithNetworkIsolation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportDatabaseWithNetworkIsolation. + * json */ /** * Sample code: Imports to an existing empty database, using private link to communicate with SQL server and storage * account. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void importsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .importMethod( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ImportExistingDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation( - new NetworkIsolationSettings() - .withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - Context.NONE); + .importMethod("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ImportExistingDatabaseDefinition() + .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) + .withStorageKey("fakeTokenPlaceholder") + .withStorageUri("https://test.blob.core.windows.net/test.bacpac") + .withAdministratorLogin("login") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withAuthenticationType("Sql") + .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") + .withSqlServerResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java index 71f3292e7df54..e0290d7b697d3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases ListByElasticPool. */ +/** + * Samples for Databases ListByElasticPool. + */ public final class DatabasesListByElasticPoolSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabasesByElasticPool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListDatabasesByElasticPool.json */ /** * Sample code: Gets a list of databases in an elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAListOfDatabasesInAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .listByElasticPool("Default-SQL-SouthEastAsia", "testsvr", "pool1", Context.NONE); + .listByElasticPool("Default-SQL-SouthEastAsia", "testsvr", "pool1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java index 4a166f617b7a3..e8531bc88529c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases ListByServer. */ +/** + * Samples for Databases ListByServer. + */ public final class DatabasesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListVCoreDatabasesByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListVCoreDatabasesByServer.json */ /** * Sample code: Gets a list of databases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAListOfDatabases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", null, Context.NONE); + .listByServer("Default-SQL-SouthEastAsia", "testsvr", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java index cdff6a4a9f97b..29d347d4d3f36 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases ListInaccessibleByServer. */ +/** + * Samples for Databases ListInaccessibleByServer. + */ public final class DatabasesListInaccessibleByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListVCoreInaccessibleDatabasesByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ListVCoreInaccessibleDatabasesByServer.json */ /** * Sample code: Gets a list of inaccessible databases in a logical server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAListOfInaccessibleDatabasesInALogicalServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAListOfInaccessibleDatabasesInALogicalServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .listInaccessibleByServer("Default-SQL-SouthEastAsia", "testsvr", Context.NONE); + .listInaccessibleByServer("Default-SQL-SouthEastAsia", "testsvr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java index 4993f5d4bcc8f..34ef60573333c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases Pause. */ +/** + * Samples for Databases Pause. + */ public final class DatabasesPauseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PauseDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PauseDatabase.json */ /** * Sample code: Pauses a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void pausesADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE); + .pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java index 35586355b2f8a..7e8e8961930f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ResourceMoveDefinition; -/** Samples for Databases Rename. */ +/** + * Samples for Databases Rename. + */ public final class DatabasesRenameSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RenameDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RenameDatabase.json */ /** * Sample code: Renames a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void renamesADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .renameWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ResourceMoveDefinition() - .withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb"), - Context.NONE); + .renameWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ResourceMoveDefinition().withId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java index 3afd928775b8e..394cdcb204b0c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases Resume. */ +/** + * Samples for Databases Resume. + */ public final class DatabasesResumeSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResumeDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResumeDatabase.json */ /** * Sample code: Resumes a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void resumesADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .resume("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE); + .resume("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java index 9a76e0c9af52e..ab526ec700e41 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java @@ -4,86 +4,75 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.DatabaseLicenseType; import com.azure.resourcemanager.sql.models.DatabaseUpdate; import com.azure.resourcemanager.sql.models.Sku; -/** Samples for Databases Update. */ +/** + * Samples for Databases Update. + */ public final class DatabasesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * PatchVCoreDatabaseAssignMaintenanceConfiguration.json */ /** * Sample code: Assigns maintenance window to a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void assignsMaintenanceWindowToADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .update( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseUpdate() - .withSku(new Sku().withName("BC_Gen5_4")) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), - Context.NONE); + .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseUpdate() + .withSku(new Sku().withName("BC_Gen5_4")) + .withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * PatchVCoreDatabaseResetMaintenanceConfiguration.json */ /** * Sample code: Resets maintenance window of a database to default. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void resetsMaintenanceWindowOfADatabaseToDefault( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + resetsMaintenanceWindowOfADatabaseToDefault(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .update( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseUpdate() - .withSku(new Sku().withName("BC_Gen5_4")) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - Context.NONE); + .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseUpdate() + .withSku(new Sku().withName("BC_Gen5_4")) + .withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchVCoreDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchVCoreDatabase.json */ /** * Sample code: Updates a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .update( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new DatabaseUpdate() - .withSku(new Sku().withName("BC_Gen4_4")) + .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", + new DatabaseUpdate().withSku(new Sku().withName("BC_Gen4_4")) .withMaxSizeBytes(1073741824L) .withLicenseType(DatabaseLicenseType.LICENSE_INCLUDED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java index 9436b1a69c880..4c317a2ed1ea9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Databases UpgradeDataWarehouse. */ +/** + * Samples for Databases UpgradeDataWarehouse. + */ public final class DatabasesUpgradeDataWarehouseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpgradeDataWarehouse.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpgradeDataWarehouse.json */ /** * Sample code: Upgrades a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void upgradesADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDatabases() - .upgradeDataWarehouse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE); + .upgradeDataWarehouse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java index 6bb5bb1cfa867..29e34288793c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DeletedServers Get. */ +/** + * Samples for DeletedServers Get. + */ public final class DeletedServersGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerGet.json */ /** * Sample code: Get deleted server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getDeletedServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDeletedServers() - .getWithResponse("japaneast", "sqlcrudtest-d-1414", Context.NONE); + .getWithResponse("japaneast", "sqlcrudtest-d-1414", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java index 13bfcbd14623d..3245682e72709 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DeletedServers ListByLocation. */ +/** + * Samples for DeletedServers ListByLocation. + */ public final class DeletedServersListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerList.json */ /** * Sample code: List deleted servers. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDeletedServers(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getDeletedServers().listByLocation("japaneast", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getDeletedServers() + .listByLocation("japaneast", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java index 08923e4cc0029..9d2c7d1869847 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DeletedServers List. */ +/** + * Samples for DeletedServers List. + */ public final class DeletedServersListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerListBySubscription.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerListBySubscription.json */ /** * Sample code: List deleted servers in a subscription. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDeletedServersInASubscription(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getDeletedServers().list(Context.NONE); + azure.sqlServers().manager().serviceClient().getDeletedServers().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java index 1ad0db31ea7a3..ea50d9ce3a6f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DeletedServers Recover. */ +/** + * Samples for DeletedServers Recover. + */ public final class DeletedServersRecoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerRecover.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeletedServerRecover.json */ /** * Sample code: Recover deleted server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void recoverDeletedServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDeletedServers() - .recover("japaneast", "sqlcrudtest-d-1414", Context.NONE); + .recover("japaneast", "sqlcrudtest-d-1414", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java index 57e14aa483898..3f1d64316ccb6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java @@ -4,34 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -/** Samples for DistributedAvailabilityGroups CreateOrUpdate. */ +/** + * Samples for DistributedAvailabilityGroups CreateOrUpdate. + */ public final class DistributedAvailabilityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsCreate. + * json */ /** * Sample code: Create a distributed availability group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createADistributedAvailabilityGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDistributedAvailabilityGroups() - .createOrUpdate( - "testrg", - "testcl", - "dag", - new DistributedAvailabilityGroupInner() - .withTargetDatabase("testdb") + .createOrUpdate("testrg", "testcl", "dag", + new DistributedAvailabilityGroupInner().withTargetDatabase("testdb") .withSourceEndpoint("TCP://SERVER:7022") .withPrimaryAvailabilityGroupName("BoxLocalAg1") .withSecondaryAvailabilityGroupName("testcl"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java index 78cc10e2da65a..3e803ae36b855 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DistributedAvailabilityGroups Delete. */ +/** + * Samples for DistributedAvailabilityGroups Delete. + */ public final class DistributedAvailabilityGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsDelete. + * json */ /** * Sample code: Initiate a distributed availability group drop. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void initiateADistributedAvailabilityGroupDrop(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDistributedAvailabilityGroups() - .delete("testrg", "testcl", "dag", Context.NONE); + .delete("testrg", "testcl", "dag", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java index 1533973fe967f..8836904e54323 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DistributedAvailabilityGroups Get. */ +/** + * Samples for DistributedAvailabilityGroups Get. + */ public final class DistributedAvailabilityGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsGet.json */ /** * Sample code: Gets the distributed availability group info. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheDistributedAvailabilityGroupInfo(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDistributedAvailabilityGroups() - .getWithResponse("testrg", "testcl", "dag", Context.NONE); + .getWithResponse("testrg", "testcl", "dag", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java index c55366270b3cb..0fff6c964aef4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for DistributedAvailabilityGroups ListByInstance. */ +/** + * Samples for DistributedAvailabilityGroups ListByInstance. + */ public final class DistributedAvailabilityGroupsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DistributedAvailabilityGroupsListByInstance.json */ /** * Sample code: Lists all distributed availability groups in instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listsAllDistributedAvailabilityGroupsInInstance( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listsAllDistributedAvailabilityGroupsInInstance(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getDistributedAvailabilityGroups() - .listByInstance("testrg", "testcl", Context.NONE); + .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java index 9f947eef1d5ac..4fe49f18f25b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java @@ -4,32 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; import com.azure.resourcemanager.sql.models.ReplicationMode; -/** Samples for DistributedAvailabilityGroups Update. */ +/** + * Samples for DistributedAvailabilityGroups Update. + */ public final class DistributedAvailabilityGroupsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DistributedAvailabilityGroupsUpdate. + * json */ /** * Sample code: Update the distributed availability group replication mode before deleting it. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheDistributedAvailabilityGroupReplicationModeBeforeDeletingIt( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getDistributedAvailabilityGroups() - .update( - "testrg", - "testcl", - "dag", + .update("testrg", "testcl", "dag", new DistributedAvailabilityGroupInner().withReplicationMode(ReplicationMode.SYNC), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java index 7b2489d42d34a..f9fa252cf5dfa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java @@ -4,30 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for ElasticPoolOperations Cancel. */ +/** + * Samples for ElasticPoolOperations Cancel. + */ public final class ElasticPoolOperationsCancelSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelElasticPoolOperation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelElasticPoolOperation.json */ /** * Sample code: Cancel the elastic pool management operation. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void cancelTheElasticPoolManagementOperation(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPoolOperations() - .cancelWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-6661", - "testpool", - UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), - Context.NONE); + .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-6661", "testpool", + UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java index 64c40e3fefd5a..d7a18b6de8f92 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ElasticPoolOperations ListByElasticPool. */ +/** + * Samples for ElasticPoolOperations ListByElasticPool. + */ public final class ElasticPoolOperationsListByElasticPoolSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListElasticPoolOperations.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListElasticPoolOperations.json */ /** * Sample code: List the elastic pool management operations. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheElasticPoolManagementOperations(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPoolOperations() - .listByElasticPool("sqlcrudtestgroup", "sqlcrudtestserver", "testpool", Context.NONE); + .listByElasticPool("sqlcrudtestgroup", "sqlcrudtestserver", "testpool", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java index 5a57aee826c9d..a67907fc2dd50 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java @@ -4,111 +4,96 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; import com.azure.resourcemanager.sql.models.Sku; -/** Samples for ElasticPools CreateOrUpdate. */ +/** + * Samples for ElasticPools CreateOrUpdate. + */ public final class ElasticPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolCreateOrUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolCreateOrUpdateMax.json */ /** * Sample code: Create or update elastic pool with all parameter. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateElasticPoolWithAllParameter(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .createOrUpdate( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolInner() - .withLocation("Japan East") + .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolInner().withLocation("Japan East") .withSku(new Sku().withName("GP_Gen4_2").withTier("GeneralPurpose").withCapacity(2)) .withPerDatabaseSettings( new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(2.0D)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json */ /** * Sample code: Create or update Hyperscale elastic pool with high availability replica count parameter. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .createOrUpdate( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolInner() - .withLocation("Japan East") + .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolInner().withLocation("Japan East") .withSku(new Sku().withName("HS_Gen5_4")) .withHighAvailabilityReplicaCount(2), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json */ /** * Sample code: Create or update elastic pool with maintenance configuration parameter. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateElasticPoolWithMaintenanceConfigurationParameter( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .createOrUpdate( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolInner() - .withLocation("Japan East") - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), - Context.NONE); + .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolInner() + .withLocation("Japan East") + .withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolCreateOrUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolCreateOrUpdateMin.json */ /** * Sample code: Create or update elastic pool with minimum parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateElasticPoolWithMinimumParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateElasticPoolWithMinimumParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .createOrUpdate( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East"), - Context.NONE); + .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolInner().withLocation("Japan East"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java index d237c28641f13..d0215ab04c474 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ElasticPools Delete. */ +/** + * Samples for ElasticPools Delete. + */ public final class ElasticPoolsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolDelete.json */ /** * Sample code: Delete an elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .delete("sqlcrudtest-3129", "sqlcrudtest-228", "sqlcrudtest-3851", Context.NONE); + .delete("sqlcrudtest-3129", "sqlcrudtest-228", "sqlcrudtest-3851", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java index e94f36ae99e0f..8f1a83a40c329 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ElasticPools Failover. */ +/** + * Samples for ElasticPools Failover. + */ public final class ElasticPoolsFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverElasticPool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverElasticPool.json */ /** * Sample code: Failover an elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void failoverAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .failover("group1", "testServer", "testElasticPool", Context.NONE); + .failover("group1", "testServer", "testElasticPool", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java index 920a002f0c9ec..98b472b1469e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java @@ -4,41 +4,43 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ElasticPools Get. */ +/** + * Samples for ElasticPools Get. + */ public final class ElasticPoolsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/HyperscaleElasticPoolGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/HyperscaleElasticPoolGet.json */ /** * Sample code: Get a Hyperscale elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAHyperscaleElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE); + .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolGet.json */ /** * Sample code: Get an elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", Context.NONE); + .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java index 5f2861b7e5fac..4e8a475ec4d10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ElasticPools ListByServer. */ +/** + * Samples for ElasticPools ListByServer. + */ public final class ElasticPoolsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolListByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolListByServer.json */ /** * Sample code: Get all elastic pools in a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAllElasticPoolsInAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .listByServer("sqlcrudtest-2369", "sqlcrudtest-8069", null, Context.NONE); + .listByServer("sqlcrudtest-2369", "sqlcrudtest-8069", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java index a48157dd2ab71..900ec83e5d548 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java @@ -4,128 +4,115 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; import com.azure.resourcemanager.sql.models.ElasticPoolUpdate; import com.azure.resourcemanager.sql.models.Sku; -/** Samples for ElasticPools Update. */ +/** + * Samples for ElasticPools Update. + */ public final class ElasticPoolsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateMax.json */ /** * Sample code: Update an elastic pool with all parameter. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAnElasticPoolWithAllParameter(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .update( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", + .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolUpdate() .withSku(new Sku().withName("BC_Gen4").withTier("BusinessCritical").withCapacity(2)) .withPerDatabaseSettings( new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(1.0D)) .withZoneRedundant(true) .withLicenseType(ElasticPoolLicenseType.LICENSE_INCLUDED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json */ /** * Sample code: Update high availability replica count of a Hyperscale elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateHighAvailabilityReplicaCountOfAHyperscaleElasticPool( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .update( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolUpdate().withHighAvailabilityReplicaCount(2), - Context.NONE); + .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolUpdate().withHighAvailabilityReplicaCount(2), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateMin.json */ /** * Sample code: Update an elastic pool with minimum parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAnElasticPoolWithMinimumParameters(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolUpdate(), Context.NONE); + .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolUpdate(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ElasticPoolUpdateAssignMaintenanceConfiguration.json */ /** * Sample code: Assigns maintenance configuration to an elastic pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void assignsMaintenanceConfigurationToAnElasticPool( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + assignsMaintenanceConfigurationToAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .update( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolUpdate() - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), - Context.NONE); + .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolUpdate().withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ElasticPoolUpdateResetMaintenanceConfiguration.json */ /** * Sample code: Resets maintenance configuration of an elastic pool to default. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void resetsMaintenanceConfigurationOfAnElasticPoolToDefault( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + resetsMaintenanceConfigurationOfAnElasticPoolToDefault(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getElasticPools() - .update( - "sqlcrudtest-2369", - "sqlcrudtest-8069", - "sqlcrudtest-8102", - new ElasticPoolUpdate() - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - Context.NONE); + .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", + new ElasticPoolUpdate().withMaintenanceConfigurationId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java index 67ebb98ca3c74..94565ca6445b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java @@ -4,60 +4,53 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorInner; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; import com.azure.resourcemanager.sql.models.ServerKeyType; -/** Samples for EncryptionProtectors CreateOrUpdate. */ +/** + * Samples for EncryptionProtectors CreateOrUpdate. + */ public final class EncryptionProtectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorCreateOrUpdateKeyVault.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * EncryptionProtectorCreateOrUpdateKeyVault.json */ /** * Sample code: Update the encryption protector to key vault. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheEncryptionProtectorToKeyVault(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEncryptionProtectors() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - EncryptionProtectorName.CURRENT, - new EncryptionProtectorInner() - .withServerKeyName("fakeTokenPlaceholder") + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + new EncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) .withAutoRotationEnabled(false), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * EncryptionProtectorCreateOrUpdateServiceManaged.json */ /** * Sample code: Update the encryption protector to service managed. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheEncryptionProtectorToServiceManaged( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheEncryptionProtectorToServiceManaged(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getEncryptionProtectors() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - EncryptionProtectorName.CURRENT, - new EncryptionProtectorInner() - .withServerKeyName("fakeTokenPlaceholder") + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + new EncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") .withServerKeyType(ServerKeyType.SERVICE_MANAGED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java index 64479c4f5bfee..43a854bf7b8a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -/** Samples for EncryptionProtectors Get. */ +/** + * Samples for EncryptionProtectors Get. + */ public final class EncryptionProtectorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorGet.json */ /** * Sample code: Get the encryption protector. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheEncryptionProtector(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEncryptionProtectors() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java index f0ba8235d1695..5fb5a781592ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for EncryptionProtectors ListByServer. */ +/** + * Samples for EncryptionProtectors ListByServer. + */ public final class EncryptionProtectorsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorList.json */ /** * Sample code: List encryption protectors by server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listEncryptionProtectorsByServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEncryptionProtectors() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java index 4e15693d06637..a6e4d8d60a680 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -/** Samples for EncryptionProtectors Revalidate. */ +/** + * Samples for EncryptionProtectors Revalidate. + */ public final class EncryptionProtectorsRevalidateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorRevalidate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EncryptionProtectorRevalidate.json */ /** * Sample code: Revalidates the encryption protector. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEncryptionProtectors() - .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE); + .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java index bb55a98c0aed8..14a0aff7b7a94 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for EndpointCertificates Get. */ +/** + * Samples for EndpointCertificates Get. + */ public final class EndpointCertificatesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EndpointCertificatesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EndpointCertificatesGet.json */ /** * Sample code: Gets an endpoint certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAnEndpointCertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEndpointCertificates() - .getWithResponse("testrg", "testcl", "DATABASE_MIRRORING", Context.NONE); + .getWithResponse("testrg", "testcl", "DATABASE_MIRRORING", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java index 83a31d6aa8448..9239b518bc94e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for EndpointCertificates ListByInstance. */ +/** + * Samples for EndpointCertificates ListByInstance. + */ public final class EndpointCertificatesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EndpointCertificatesListByInstance.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/EndpointCertificatesListByInstance. + * json */ /** * Sample code: Get a list of endpoint certificates. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAListOfEndpointCertificates(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getEndpointCertificates() - .listByInstance("testrg", "testcl", Context.NONE); + .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java index 352c5f8e2ccda..0606b0618e396 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java @@ -4,68 +4,59 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; import java.util.Arrays; import java.util.UUID; -/** Samples for ExtendedDatabaseBlobAuditingPolicies CreateOrUpdate. */ +/** + * Samples for ExtendedDatabaseBlobAuditingPolicies CreateOrUpdate. + */ public final class ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingCreateMin + * .json */ /** * Sample code: Create or update an extended database's blob auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new ExtendedDatabaseBlobAuditingPolicyInner() - .withState(BlobAuditingPolicyState.ENABLED) + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new ExtendedDatabaseBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingCreateMax + * .json */ /** * Sample code: Create or update an extended database's blob auditing policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new ExtendedDatabaseBlobAuditingPolicyInner() - .withPredicateExpression("statement = 'select 1'") + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new ExtendedDatabaseBlobAuditingPolicyInner().withPredicateExpression("statement = 'select 1'") .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) + .withAuditActionsAndGroups(Arrays.asList("DATABASE_LOGOUT_GROUP", + "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public")) .withIsStorageSecondaryKeyInUse(false) .withIsAzureMonitorTargetEnabled(true) .withQueueDelayMs(4000) @@ -73,31 +64,27 @@ public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllPar .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ExtendedDatabaseAzureMonitorAuditingCreateMin.json */ /** * Sample code: Create or update an extended database's azure monitor auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse( - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - new ExtendedDatabaseBlobAuditingPolicyInner() - .withIsAzureMonitorTargetEnabled(true) + .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", + new ExtendedDatabaseBlobAuditingPolicyInner().withIsAzureMonitorTargetEnabled(true) .withState(BlobAuditingPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java index 82d012f0138de..6e845865960f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ExtendedDatabaseBlobAuditingPolicies Get. */ +/** + * Samples for ExtendedDatabaseBlobAuditingPolicies Get. + */ public final class ExtendedDatabaseBlobAuditingPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedDatabaseBlobAuditingGet.json */ /** * Sample code: Get an extended database's blob auditing policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAnExtendedDatabaseSBlobAuditingPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedDatabaseBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); + .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java index 5698f8e8d4ad7..4930a9068599d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java @@ -4,24 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ExtendedDatabaseBlobAuditingPolicies ListByDatabase. */ +/** + * Samples for ExtendedDatabaseBlobAuditingPolicies ListByDatabase. + */ public final class ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseExtendedAuditingSettingsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseExtendedAuditingSettingsList. + * json */ /** * Sample code: List extended auditing settings of a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listExtendedAuditingSettingsOfADatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedDatabaseBlobAuditingPolicies() - .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); + .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java index 8ff36751b56d4..86d02ad8beb6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java @@ -4,66 +4,59 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; import java.util.Arrays; import java.util.UUID; -/** Samples for ExtendedServerBlobAuditingPolicies CreateOrUpdate. */ +/** + * Samples for ExtendedServerBlobAuditingPolicies CreateOrUpdate. + */ public final class ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingCreateMin. + * json */ /** * Sample code: Update a server's extended blob auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAServerSExtendedBlobAuditingPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedServerBlobAuditingPolicies() - .createOrUpdate( - "blobauditingtest-4799", - "blobauditingtest-6440", - new ExtendedServerBlobAuditingPolicyInner() - .withState(BlobAuditingPolicyState.ENABLED) + .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", + new ExtendedServerBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingCreateMax. + * json */ /** * Sample code: Update a server's extended blob auditing policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAServerSExtendedBlobAuditingPolicyWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedServerBlobAuditingPolicies() - .createOrUpdate( - "blobauditingtest-4799", - "blobauditingtest-6440", - new ExtendedServerBlobAuditingPolicyInner() - .withPredicateExpression("object_name = 'SensitiveData'") + .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", + new ExtendedServerBlobAuditingPolicyInner().withPredicateExpression("object_name = 'SensitiveData'") .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) + .withAuditActionsAndGroups(Arrays.asList("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP")) .withIsStorageSecondaryKeyInUse(false) .withIsAzureMonitorTargetEnabled(true) .withQueueDelayMs(4000) @@ -71,6 +64,6 @@ public static void updateAServerSExtendedBlobAuditingPolicyWithAllParameters( .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java index c4fd37ca4c76e..9754159308693 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ExtendedServerBlobAuditingPolicies Get. */ +/** + * Samples for ExtendedServerBlobAuditingPolicies Get. + */ public final class ExtendedServerBlobAuditingPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ExtendedServerBlobAuditingGet.json */ /** * Sample code: Get a server's blob extended auditing policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSBlobExtendedAuditingPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedServerBlobAuditingPolicies() - .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE); + .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java index 2412d34a62976..aeb47d4bc3763 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ExtendedServerBlobAuditingPolicies ListByServer. */ +/** + * Samples for ExtendedServerBlobAuditingPolicies ListByServer. + */ public final class ExtendedServerBlobAuditingPoliciesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerExtendedAuditingSettingsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerExtendedAuditingSettingsList. + * json */ /** * Sample code: List extended auditing settings of a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listExtendedAuditingSettingsOfAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getExtendedServerBlobAuditingPolicies() - .listByServer("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE); + .listByServer("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java index 99dc61da0885a..db7ba48bdbdb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.FailoverGroupInner; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; @@ -13,44 +12,36 @@ import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; import java.util.Arrays; -/** Samples for FailoverGroups CreateOrUpdate. */ +/** + * Samples for FailoverGroups CreateOrUpdate. + */ public final class FailoverGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupCreateOrUpdate.json */ /** * Sample code: Create failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .createOrUpdate( - "Default", - "failover-group-primary-server", - "failover-group-test-3", + .createOrUpdate("Default", "failover-group-primary-server", "failover-group-test-3", new FailoverGroupInner() - .withReadWriteEndpoint( - new FailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(480)) + .withReadWriteEndpoint(new FailoverGroupReadWriteEndpoint() + .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) + .withFailoverWithDataLossGracePeriodMinutes(480)) .withReadOnlyEndpoint( new FailoverGroupReadOnlyEndpoint().withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) - .withPartnerServers( - Arrays - .asList( - new PartnerInfo() - .withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"))) - .withDatabases( - Arrays - .asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")), - Context.NONE); + .withPartnerServers(Arrays.asList(new PartnerInfo().withId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"))) + .withDatabases(Arrays.asList( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java index 9cd26ee06c3f6..3551810a4c5d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FailoverGroups Delete. */ +/** + * Samples for FailoverGroups Delete. + */ public final class FailoverGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupDelete.json */ /** * Sample code: Delete failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .delete("Default", "failover-group-primary-server", "failover-group-test-1", Context.NONE); + .delete("Default", "failover-group-primary-server", "failover-group-test-1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java index ac7161403a875..9de25f2d8e0ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FailoverGroups Failover. */ +/** + * Samples for FailoverGroups Failover. + */ public final class FailoverGroupsFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupFailover.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupFailover.json */ /** * Sample code: Planned failover of a failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .failover("Default", "failover-group-secondary-server", "failover-group-test-3", Context.NONE); + .failover("Default", "failover-group-secondary-server", "failover-group-test-3", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java index 8954eb9488ad8..f6d01c7ec84cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FailoverGroups ForceFailoverAllowDataLoss. */ +/** + * Samples for FailoverGroups ForceFailoverAllowDataLoss. + */ public final class FailoverGroupsForceFailoverAllowDataLossSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupForceFailoverAllowDataLoss.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * FailoverGroupForceFailoverAllowDataLoss.json */ /** * Sample code: Forced failover of a failover group allowing data loss. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void forcedFailoverOfAFailoverGroupAllowingDataLoss( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + forcedFailoverOfAFailoverGroupAllowingDataLoss(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .forceFailoverAllowDataLoss( - "Default", "failover-group-secondary-server", "failover-group-test-3", Context.NONE); + .forceFailoverAllowDataLoss("Default", "failover-group-secondary-server", "failover-group-test-3", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java index 847888a4aef0a..4f85b1a8d5136 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FailoverGroups Get. */ +/** + * Samples for FailoverGroups Get. + */ public final class FailoverGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupGet.json */ /** * Sample code: Get failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .getWithResponse("Default", "failover-group-primary-server", "failover-group-test", Context.NONE); + .getWithResponse("Default", "failover-group-primary-server", "failover-group-test", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java index 6c86e46a0cd44..cd9f1102d430c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FailoverGroups ListByServer. */ +/** + * Samples for FailoverGroups ListByServer. + */ public final class FailoverGroupsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupList.json */ /** * Sample code: List failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .listByServer("Default", "failover-group-primary-server", Context.NONE); + .listByServer("Default", "failover-group-primary-server", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java index 23c2a0928f7d4..11de6fd1fbc4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java @@ -4,41 +4,35 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupUpdate; import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; import java.util.Arrays; -/** Samples for FailoverGroups Update. */ +/** + * Samples for FailoverGroups Update. + */ public final class FailoverGroupsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverGroupUpdate.json */ /** * Sample code: Update failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFailoverGroups() - .update( - "Default", - "failover-group-primary-server", - "failover-group-test-1", - new FailoverGroupUpdate() - .withReadWriteEndpoint( - new FailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(120)) - .withDatabases( - Arrays - .asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")), - Context.NONE); + .update("Default", "failover-group-primary-server", "failover-group-test-1", new FailoverGroupUpdate() + .withReadWriteEndpoint( + new FailoverGroupReadWriteEndpoint().withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) + .withFailoverWithDataLossGracePeriodMinutes(120)) + .withDatabases(Arrays.asList( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java index 44a7e8b372be3..962c2962174a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java @@ -4,52 +4,49 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; -/** Samples for FirewallRules CreateOrUpdate. */ +/** + * Samples for FirewallRules CreateOrUpdate. + */ public final class FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleCreate.json */ /** * Sample code: Create a firewall rule max/min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAFirewallRuleMaxMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .createOrUpdateWithResponse( - "firewallrulecrudtest-12", - "firewallrulecrudtest-6285", + .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-5370", new FirewallRuleInner().withStartIpAddress("0.0.0.3").withEndIpAddress("0.0.0.3"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleUpdate.json */ /** * Sample code: Update a firewall rule max/min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAFirewallRuleMaxMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .createOrUpdateWithResponse( - "firewallrulecrudtest-12", - "firewallrulecrudtest-6285", + .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-3927", new FirewallRuleInner().withStartIpAddress("0.0.0.1").withEndIpAddress("0.0.0.1"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java index 15cb2c4c42d34..fd6fa5bcaa400 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FirewallRules Delete. */ +/** + * Samples for FirewallRules Delete. + */ public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleDelete.json */ /** * Sample code: Delete a firewall rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAFirewallRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .deleteWithResponse( - "firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", Context.NONE); + .deleteWithResponse("firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java index d875794118625..ed245f5b7b6d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FirewallRules Get. */ +/** + * Samples for FirewallRules Get. + */ public final class FirewallRulesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleGet.json */ /** * Sample code: Get Firewall Rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getFirewallRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .getWithResponse( - "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", Context.NONE); + .getWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java index c1d216db1a475..eaf669f7c1492 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for FirewallRules ListByServer. */ +/** + * Samples for FirewallRules ListByServer. + */ public final class FirewallRulesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleList.json */ /** * Sample code: List Firewall Rules. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listFirewallRules(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", Context.NONE); + .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java index f7e85b7e22d56..272f7a6ffaaf1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java @@ -4,38 +4,33 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; import com.azure.resourcemanager.sql.models.FirewallRuleList; import java.util.Arrays; -/** Samples for FirewallRules Replace. */ +/** + * Samples for FirewallRules Replace. + */ public final class FirewallRulesReplaceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleReplace.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FirewallRuleReplace.json */ /** * Sample code: Replace firewall rules. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void replaceFirewallRules(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getFirewallRules() - .replaceWithResponse( - "firewallrulecrudtest-12", - "firewallrulecrudtest-6285", + .replaceWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", new FirewallRuleList() - .withValues( - Arrays - .asList( - new FirewallRuleInner() - .withName("firewallrulecrudtest-5370 ") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("100.0.0.0"))), - Context.NONE); + .withValues(Arrays.asList(new FirewallRuleInner().withName("firewallrulecrudtest-5370 ") + .withStartIpAddress("0.0.0.0") + .withEndIpAddress("100.0.0.0"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java index 31f0d988d2a1f..9803ff7922643 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner; import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; import com.azure.resourcemanager.sql.models.GeoBackupPolicyState; -/** Samples for GeoBackupPolicies CreateOrUpdate. */ +/** + * Samples for GeoBackupPolicies CreateOrUpdate. + */ public final class GeoBackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesCreateOrUpdate.json */ /** * Sample code: Create or update a database default Geo backup policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateADatabaseDefaultGeoBackupPolicy( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateADatabaseDefaultGeoBackupPolicy(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getGeoBackupPolicies() - .createOrUpdateWithResponse( - "sqlcrudtest-4799", - "sqlcrudtest-5961", - "testdw", - GeoBackupPolicyName.DEFAULT, - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), - Context.NONE); + .createOrUpdateWithResponse("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, + new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java index 277bff538e434..916f4588b0629 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; -/** Samples for GeoBackupPolicies Get. */ +/** + * Samples for GeoBackupPolicies Get. + */ public final class GeoBackupPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesGet.json */ /** * Sample code: Gets the specified Geo backup policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheSpecifiedGeoBackupPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getGeoBackupPolicies() - .getWithResponse( - "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, Context.NONE); + .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java index 2ac856d0db482..08c11c19694b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for GeoBackupPolicies List. */ +/** + * Samples for GeoBackupPolicies List. + */ public final class GeoBackupPoliciesListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GeoBackupPoliciesList.json */ /** * Sample code: List Geo backup policies for the given database resource. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listGeoBackupPoliciesForTheGivenDatabaseResource( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listGeoBackupPoliciesForTheGivenDatabaseResource(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getGeoBackupPolicies() - .list("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", Context.NONE); + .list("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java index d31f509601590..f312da0a809f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java @@ -4,56 +4,51 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner; -/** Samples for IPv6FirewallRules CreateOrUpdate. */ +/** + * Samples for IPv6FirewallRules CreateOrUpdate. + */ public final class IPv6FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleUpdate.json */ /** * Sample code: Update an IPv6 firewall rule max/min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAnIPv6FirewallRuleMaxMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getIPv6FirewallRules() - .createOrUpdateWithResponse( - "firewallrulecrudtest-12", - "firewallrulecrudtest-6285", + .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-3927", - new IPv6FirewallRuleInner() - .withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0001") + new IPv6FirewallRuleInner().withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0001") .withEndIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0001"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleCreate.json */ /** * Sample code: Create an IPv6 firewall rule max/min. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAnIPv6FirewallRuleMaxMin(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getIPv6FirewallRules() - .createOrUpdateWithResponse( - "firewallrulecrudtest-12", - "firewallrulecrudtest-6285", + .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-5370", - new IPv6FirewallRuleInner() - .withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0003") + new IPv6FirewallRuleInner().withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0003") .withEndIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0003"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java index 2445b5bc61b90..e1927675aeb77 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for IPv6FirewallRules Delete. */ +/** + * Samples for IPv6FirewallRules Delete. + */ public final class IPv6FirewallRulesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleDelete.json */ /** * Sample code: Delete an IPv6 firewall rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAnIPv6FirewallRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getIPv6FirewallRules() - .deleteWithResponse( - "firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", Context.NONE); + .deleteWithResponse("firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java index 6b3949536fdf8..fce87bb181f2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for IPv6FirewallRules Get. */ +/** + * Samples for IPv6FirewallRules Get. + */ public final class IPv6FirewallRulesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleGet.json */ /** * Sample code: Get IPv6 Firewall Rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getIPv6FirewallRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getIPv6FirewallRules() - .getWithResponse( - "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", Context.NONE); + .getWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java index c6c258546f860..943d2060e024e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for IPv6FirewallRules ListByServer. */ +/** + * Samples for IPv6FirewallRules ListByServer. + */ public final class IPv6FirewallRulesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/IPv6FirewallRuleList.json */ /** * Sample code: List IPv6 Firewall Rules. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listIPv6FirewallRules(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getIPv6FirewallRules() - .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", Context.NONE); + .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java index bf5d8ab0ada02..da3b0ba6fefa6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint; @@ -14,43 +13,37 @@ import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; import java.util.Arrays; -/** Samples for InstanceFailoverGroups CreateOrUpdate. */ +/** + * Samples for InstanceFailoverGroups CreateOrUpdate. + */ public final class InstanceFailoverGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupCreateOrUpdate. + * json */ /** * Sample code: Create failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .createOrUpdate( - "Default", - "Japan East", - "failover-group-test-3", + .createOrUpdate("Default", "Japan East", "failover-group-test-3", new InstanceFailoverGroupInner() - .withReadWriteEndpoint( - new InstanceFailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(480)) - .withReadOnlyEndpoint( - new InstanceFailoverGroupReadOnlyEndpoint() - .withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) + .withReadWriteEndpoint(new InstanceFailoverGroupReadWriteEndpoint() + .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) + .withFailoverWithDataLossGracePeriodMinutes(480)) + .withReadOnlyEndpoint(new InstanceFailoverGroupReadOnlyEndpoint() + .withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) .withPartnerRegions(Arrays.asList(new PartnerRegionInfo().withLocation("Japan West"))) - .withManagedInstancePairs( - Arrays - .asList( - new ManagedInstancePairInfo() - .withPrimaryManagedInstanceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance") - .withPartnerManagedInstanceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"))), - Context.NONE); + .withManagedInstancePairs(Arrays.asList(new ManagedInstancePairInfo().withPrimaryManagedInstanceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance") + .withPartnerManagedInstanceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java index 094d3689a5cb1..4234f693320cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstanceFailoverGroups Delete. */ +/** + * Samples for InstanceFailoverGroups Delete. + */ public final class InstanceFailoverGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupDelete.json */ /** * Sample code: Delete failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .delete("Default", "Japan East", "failover-group-test-1", Context.NONE); + .delete("Default", "Japan East", "failover-group-test-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java index 17668faeffd9a..1357b62f9bdef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstanceFailoverGroups Failover. */ +/** + * Samples for InstanceFailoverGroups Failover. + */ public final class InstanceFailoverGroupsFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupFailover.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupFailover.json */ /** * Sample code: Planned failover of a failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .failover("Default", "Japan West", "failover-group-test-3", Context.NONE); + .failover("Default", "Japan West", "failover-group-test-3", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java index 0671881be8578..744a7cd24423a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstanceFailoverGroups ForceFailoverAllowDataLoss. */ +/** + * Samples for InstanceFailoverGroups ForceFailoverAllowDataLoss. + */ public final class InstanceFailoverGroupsForceFailoverAllowDataLossSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * InstanceFailoverGroupForceFailoverAllowDataLoss.json */ /** * Sample code: Forced failover of a failover group allowing data loss. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void forcedFailoverOfAFailoverGroupAllowingDataLoss( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + forcedFailoverOfAFailoverGroupAllowingDataLoss(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .forceFailoverAllowDataLoss("Default", "Japan West", "failover-group-test-3", Context.NONE); + .forceFailoverAllowDataLoss("Default", "Japan West", "failover-group-test-3", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java index 8b524154dd090..5214bf2943655 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstanceFailoverGroups Get. */ +/** + * Samples for InstanceFailoverGroups Get. + */ public final class InstanceFailoverGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupGet.json */ /** * Sample code: Get failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .getWithResponse("Default", "Japan East", "failover-group-test", Context.NONE); + .getWithResponse("Default", "Japan East", "failover-group-test", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java index 628833b4b2907..3f3323848fb0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstanceFailoverGroups ListByLocation. */ +/** + * Samples for InstanceFailoverGroups ListByLocation. + */ public final class InstanceFailoverGroupsListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InstanceFailoverGroupList.json */ /** * Sample code: List failover group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listFailoverGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstanceFailoverGroups() - .listByLocation("Default", "Japan East", Context.NONE); + .listByLocation("Default", "Japan East", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java index bdac459950125..bf6c1044571e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java @@ -4,70 +4,62 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.InstancePoolInner; import com.azure.resourcemanager.sql.models.InstancePoolLicenseType; import com.azure.resourcemanager.sql.models.Sku; import java.util.HashMap; import java.util.Map; -/** Samples for InstancePools CreateOrUpdate. */ +/** + * Samples for InstancePools CreateOrUpdate. + */ public final class InstancePoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateInstancePoolMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateInstancePoolMax.json */ /** * Sample code: Create an instance pool with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAnInstancePoolWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstancePools() - .createOrUpdate( - "group1", - "testIP", - new InstancePoolInner() - .withLocation("japaneast") - .withTags(mapOf("a", "b")) - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) - .withSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") - .withVCores(8) - .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED), - Context.NONE); + .createOrUpdate("group1", "testIP", new InstancePoolInner().withLocation("japaneast") + .withTags(mapOf("a", "b")) + .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) + .withSubnetId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") + .withVCores(8) + .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateInstancePoolMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateInstancePoolMin.json */ /** * Sample code: Create an instance pool with min properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAnInstancePoolWithMinProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstancePools() - .createOrUpdate( - "group1", - "testIP", - new InstancePoolInner() - .withLocation("japaneast") - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) - .withSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") - .withVCores(8) - .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED), - Context.NONE); + .createOrUpdate("group1", "testIP", new InstancePoolInner().withLocation("japaneast") + .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) + .withSubnetId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") + .withVCores(8) + .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED), com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java index ee43835fa0c4d..2f2132fcf578c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstancePools Delete. */ +/** + * Samples for InstancePools Delete. + */ public final class InstancePoolsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteInstancePool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteInstancePool.json */ /** * Sample code: Delete an instance pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAnInstancePool(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getInstancePools().delete("group1", "testIP", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getInstancePools() + .delete("group1", "testIP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java index b86b744a64918..3729243af632a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstancePools GetByResourceGroup. */ +/** + * Samples for InstancePools GetByResourceGroup. + */ public final class InstancePoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetInstancePool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetInstancePool.json */ /** * Sample code: Get an instance pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAnInstancePool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstancePools() - .getByResourceGroupWithResponse("group1", "testIP", Context.NONE); + .getByResourceGroupWithResponse("group1", "testIP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java index 4b9238a337a08..487ac73743dda 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstancePools ListByResourceGroup. */ +/** + * Samples for InstancePools ListByResourceGroup. + */ public final class InstancePoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolsByResourceGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolsByResourceGroup.json */ /** * Sample code: List instance pools by resource group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listInstancePoolsByResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getInstancePools().listByResourceGroup("group1", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getInstancePools() + .listByResourceGroup("group1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java index 6ff5940e69a0a..8bae140edee1f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for InstancePools List. */ +/** + * Samples for InstancePools List. + */ public final class InstancePoolsListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolsBySubscriptionId.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolsBySubscriptionId. + * json */ /** * Sample code: List instance pools in the subscription. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listInstancePoolsInTheSubscription(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getInstancePools().list(Context.NONE); + azure.sqlServers().manager().serviceClient().getInstancePools().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java index d497d1dcf4ab8..a73d4e28e4912 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java @@ -4,30 +4,33 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.InstancePoolUpdate; import java.util.HashMap; import java.util.Map; -/** Samples for InstancePools Update. */ +/** + * Samples for InstancePools Update. + */ public final class InstancePoolsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchInstancePool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PatchInstancePool.json */ /** * Sample code: Patch an instance pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void patchAnInstancePool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getInstancePools() - .update("group1", "testIP", new InstancePoolUpdate().withTags(mapOf("x", "y")), Context.NONE); + .update("group1", "testIP", new InstancePoolUpdate().withTags(mapOf("x", "y")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java index 54fd3fa05cca6..97491ccc9040a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java @@ -4,33 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.JobAgentInner; -/** Samples for JobAgents CreateOrUpdate. */ +/** + * Samples for JobAgents CreateOrUpdate. + */ public final class JobAgentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobAgent.json */ /** * Sample code: Create or update a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobAgents() - .createOrUpdate( - "group1", - "server1", - "agent1", - new JobAgentInner() - .withLocation("southeastasia") - .withDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), - Context.NONE); + .createOrUpdate("group1", "server1", "agent1", new JobAgentInner().withLocation("southeastasia") + .withDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java index f0f7501d27853..5eee1d9d8b566 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobAgents Delete. */ +/** + * Samples for JobAgents Delete. + */ public final class JobAgentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobAgent.json */ /** * Sample code: Delete a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getJobAgents().delete("group1", "server1", "agent1", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getJobAgents() + .delete("group1", "server1", "agent1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java index 0f85515577014..e9c9b9ab4dbb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobAgents Get. */ +/** + * Samples for JobAgents Get. + */ public final class JobAgentsGetSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobAgent.json */ /** * Sample code: Get a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobAgents() - .getWithResponse("group1", "server1", "agent1", Context.NONE); + .getWithResponse("group1", "server1", "agent1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java index 72df1cc0be774..2e339567a6a96 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobAgents ListByServer. */ +/** + * Samples for JobAgents ListByServer. + */ public final class JobAgentsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobAgentsByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobAgentsByServer.json */ /** * Sample code: List job agents in a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobAgentsInAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getJobAgents().listByServer("group1", "server1", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getJobAgents() + .listByServer("group1", "server1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java index 74eb4aba8c532..357f5335fd2a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java @@ -4,35 +4,33 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.JobAgentUpdate; import java.util.HashMap; import java.util.Map; -/** Samples for JobAgents Update. */ +/** + * Samples for JobAgents Update. + */ public final class JobAgentsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateJobAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateJobAgent.json */ /** * Sample code: Update a job agent's tags. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAJobAgentSTags(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobAgents() - .update( - "group1", - "server1", - "agent1", - new JobAgentUpdate().withTags(mapOf("mytag1", "myvalue1")), - Context.NONE); + .update("group1", "server1", "agent1", new JobAgentUpdate().withTags(mapOf("mytag1", "myvalue1")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java index 2b9d4f4f53509..79f4c43a2bff7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.JobCredentialInner; -/** Samples for JobCredentials CreateOrUpdate. */ +/** + * Samples for JobCredentials CreateOrUpdate. + */ public final class JobCredentialsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobCredential.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobCredential.json */ /** * Sample code: Create or update a credential. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateACredential(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobCredentials() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "cred1", + .createOrUpdateWithResponse("group1", "server1", "agent1", "cred1", new JobCredentialInner().withUsername("myuser").withPassword("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java index 1c9eee6bed5dd..e04cd1cdb921c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobCredentials Delete. */ +/** + * Samples for JobCredentials Delete. + */ public final class JobCredentialsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobCredential.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobCredential.json */ /** * Sample code: Delete a credential. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteACredential(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobCredentials() - .deleteWithResponse("group1", "server1", "agent1", "cred1", Context.NONE); + .deleteWithResponse("group1", "server1", "agent1", "cred1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java index a2ea91048a37d..6d86f415d5e33 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobCredentials Get. */ +/** + * Samples for JobCredentials Get. + */ public final class JobCredentialsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobCredential.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobCredential.json */ /** * Sample code: Get a credential. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getACredential(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobCredentials() - .getWithResponse("group1", "server1", "agent1", "cred1", Context.NONE); + .getWithResponse("group1", "server1", "agent1", "cred1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java index 7636d9476bf69..e1474637093af 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobCredentials ListByAgent. */ +/** + * Samples for JobCredentials ListByAgent. + */ public final class JobCredentialsListByAgentSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobCredentialsByAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobCredentialsByAgent.json */ /** * Sample code: List credentials in a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listCredentialsInAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobCredentials() - .listByAgent("group1", "server1", "agent1", Context.NONE); + .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java index bc9171cc031d5..332227691a2d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java @@ -4,31 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobExecutions Cancel. */ +/** + * Samples for JobExecutions Cancel. + */ public final class JobExecutionsCancelSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelJobExecution.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelJobExecution.json */ /** * Sample code: Cancel a job execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void cancelAJobExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .cancelWithResponse( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - Context.NONE); + .cancelWithResponse("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java index 87de0a73f5029..13df4a52dcdf9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java @@ -4,31 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobExecutions CreateOrUpdate. */ +/** + * Samples for JobExecutions CreateOrUpdate. + */ public final class JobExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobExecution.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobExecution.json */ /** * Sample code: Create job execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createJobExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .createOrUpdate( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - Context.NONE); + .createOrUpdate("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java index c90cb6ef3b726..004279fa08cd0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobExecutions Create. */ +/** + * Samples for JobExecutions Create. + */ public final class JobExecutionsCreateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateJobExecution.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateJobExecution.json */ /** * Sample code: Start a job execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void startAJobExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .create("group1", "server1", "agent1", "job1", Context.NONE); + .create("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java index 24c00e866681a..193269f55d465 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java @@ -4,31 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobExecutions Get. */ +/** + * Samples for JobExecutions Get. + */ public final class JobExecutionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecution.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecution.json */ /** * Sample code: Get a job execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAJobExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .getWithResponse( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java index 30ef77e778553..d52a83534afee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java @@ -4,54 +4,48 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.time.OffsetDateTime; -/** Samples for JobExecutions ListByAgent. */ +/** + * Samples for JobExecutions ListByAgent. + */ public final class JobExecutionsListByAgentSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByAgent.json */ /** * Sample code: List all job executions in a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listAllJobExecutionsInAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .listByAgent("group1", "server1", "agent1", null, null, null, null, null, null, null, Context.NONE); + .listByAgent("group1", "server1", "agent1", null, null, null, null, null, null, null, + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByAgentWithFilter.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByAgentWithFilter. + * json */ /** * Sample code: List all job executions in a job agent with filtering. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listAllJobExecutionsInAJobAgentWithFiltering( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listAllJobExecutionsInAJobAgentWithFiltering(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .listByAgent( - "group1", - "server1", - "agent1", - OffsetDateTime.parse("2017-03-21T19:00:00Z"), - OffsetDateTime.parse("2017-03-21T19:05:00Z"), - OffsetDateTime.parse("2017-03-21T19:20:00Z"), - OffsetDateTime.parse("2017-03-21T19:25:00Z"), - false, - null, - null, - Context.NONE); + .listByAgent("group1", "server1", "agent1", OffsetDateTime.parse("2017-03-21T19:00:00Z"), + OffsetDateTime.parse("2017-03-21T19:05:00Z"), OffsetDateTime.parse("2017-03-21T19:20:00Z"), + OffsetDateTime.parse("2017-03-21T19:25:00Z"), false, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java index 328326e8d6c78..cd83f1f512b59 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobExecutions ListByJob. */ +/** + * Samples for JobExecutions ListByJob. + */ public final class JobExecutionsListByJobSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByJob.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionsByJob.json */ /** * Sample code: List a job's executions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listAJobSExecutions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobExecutions() - .listByJob("group1", "server1", "agent1", "job1", null, null, null, null, null, null, null, Context.NONE); + .listByJob("group1", "server1", "agent1", "job1", null, null, null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java index 3c1e63092ef65..cb0b1a9897f11 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java @@ -4,32 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobStepExecutions Get. */ +/** + * Samples for JobStepExecutions Get. + */ public final class JobStepExecutionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecutionStep.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecutionStep.json */ /** * Sample code: Get a job step execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAJobStepExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobStepExecutions() - .getWithResponse( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - "step1", - Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), "step1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java index 6e4efa157ce67..f07bd7fae74cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java @@ -4,38 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobStepExecutions ListByJobExecution. */ +/** + * Samples for JobStepExecutions ListByJobExecution. + */ public final class JobStepExecutionsListByJobExecutionSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionSteps.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionSteps.json */ /** * Sample code: List job step executions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobStepExecutions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobStepExecutions() - .listByJobExecution( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - null, - null, - null, - null, - null, - null, - null, - Context.NONE); + .listByJobExecution("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), null, null, null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java index 2988232f5698f..a84a14859b0d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.JobStepInner; import com.azure.resourcemanager.sql.models.JobStepAction; import com.azure.resourcemanager.sql.models.JobStepActionSource; @@ -14,85 +13,68 @@ import com.azure.resourcemanager.sql.models.JobStepOutputType; import java.util.UUID; -/** Samples for JobSteps CreateOrUpdate. */ +/** + * Samples for JobSteps CreateOrUpdate. + */ public final class JobStepsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobStepMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobStepMin.json */ /** * Sample code: Create or update a job step with minimal properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateAJobStepWithMinimalPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateAJobStepWithMinimalPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "job1", - "step1", - new JobStepInner() - .withTargetGroup( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0") + .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", "step1", + new JobStepInner().withTargetGroup( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0") .withCredential("fakeTokenPlaceholder") .withAction(new JobStepAction().withValue("select 1")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobStepMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobStepMax.json */ /** * Sample code: Create or update a job step with all properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateAJobStepWithAllPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateAJobStepWithAllPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "job1", - "step1", - new JobStepInner() - .withStepId(1) - .withTargetGroup( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1") - .withCredential("fakeTokenPlaceholder") - .withAction( - new JobStepAction() - .withType(JobStepActionType.TSQL) - .withSource(JobStepActionSource.INLINE) - .withValue("select 2")) - .withOutput( - new JobStepOutput() - .withType(JobStepOutputType.SQL_DATABASE) - .withSubscriptionId(UUID.fromString("3501b905-a848-4b5d-96e8-b253f62d735a")) - .withResourceGroupName("group3") - .withServerName("server3") - .withDatabaseName("database3") - .withSchemaName("myschema1234") - .withTableName("mytable5678") - .withCredential("fakeTokenPlaceholder")) - .withExecutionOptions( - new JobStepExecutionOptions() - .withTimeoutSeconds(1234) - .withRetryAttempts(42) - .withInitialRetryIntervalSeconds(11) - .withMaximumRetryIntervalSeconds(222) - .withRetryIntervalBackoffMultiplier(3.0F)), - Context.NONE); + .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", "step1", new JobStepInner().withStepId(1) + .withTargetGroup( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1") + .withCredential("fakeTokenPlaceholder") + .withAction(new JobStepAction().withType(JobStepActionType.TSQL) + .withSource(JobStepActionSource.INLINE) + .withValue("select 2")) + .withOutput(new JobStepOutput().withType(JobStepOutputType.SQL_DATABASE) + .withSubscriptionId(UUID.fromString("3501b905-a848-4b5d-96e8-b253f62d735a")) + .withResourceGroupName("group3") + .withServerName("server3") + .withDatabaseName("database3") + .withSchemaName("myschema1234") + .withTableName("mytable5678") + .withCredential("fakeTokenPlaceholder")) + .withExecutionOptions(new JobStepExecutionOptions().withTimeoutSeconds(1234) + .withRetryAttempts(42) + .withInitialRetryIntervalSeconds(11) + .withMaximumRetryIntervalSeconds(222) + .withRetryIntervalBackoffMultiplier(3.0F)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java index b274bbf7c640a..5b8cfc0646f11 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobSteps Delete. */ +/** + * Samples for JobSteps Delete. + */ public final class JobStepsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobStep.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobStep.json */ /** * Sample code: Delete a job step. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAJobStep(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .deleteWithResponse("group1", "server1", "agent1", "job1", "step1", Context.NONE); + .deleteWithResponse("group1", "server1", "agent1", "job1", "step1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java index 1dbd5c41f5f57..3924757387903 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobSteps GetByVersion. */ +/** + * Samples for JobSteps GetByVersion. + */ public final class JobStepsGetByVersionSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobStepByVersion.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobStepByVersion.json */ /** * Sample code: Get the specified version of a job step. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheSpecifiedVersionOfAJobStep(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .getByVersionWithResponse("group1", "server1", "agent1", "job1", 1, "step1", Context.NONE); + .getByVersionWithResponse("group1", "server1", "agent1", "job1", 1, "step1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java index e4c5de37defdc..6a1ce7dd1c4a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobSteps Get. */ +/** + * Samples for JobSteps Get. + */ public final class JobStepsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobStepByJob.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobStepByJob.json */ /** * Sample code: Get the latest version of a job step. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheLatestVersionOfAJobStep(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .getWithResponse("group1", "server1", "agent1", "job1", "step1", Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", "step1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java index 6cd1d677971c1..347166de0d6a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobSteps ListByJob. */ +/** + * Samples for JobSteps ListByJob. + */ public final class JobStepsListByJobSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobStepsByJob.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobStepsByJob.json */ /** * Sample code: List job steps for the latest version of a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobStepsForTheLatestVersionOfAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .listByJob("group1", "server1", "agent1", "job1", Context.NONE); + .listByJob("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java index 26fb6808998ae..c023ea47f4d4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobSteps ListByVersion. */ +/** + * Samples for JobSteps ListByVersion. + */ public final class JobStepsListByVersionSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobStepsByVersion.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobStepsByVersion.json */ /** * Sample code: List job steps for the specified version of a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobStepsForTheSpecifiedVersionOfAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobSteps() - .listByVersion("group1", "server1", "agent1", "job1", 1, Context.NONE); + .listByVersion("group1", "server1", "agent1", "job1", 1, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java index a063a2a290989..b6124dd85ae9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java @@ -4,33 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobTargetExecutions Get. */ +/** + * Samples for JobTargetExecutions Get. + */ public final class JobTargetExecutionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecutionTarget.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobExecutionTarget.json */ /** * Sample code: Get a job step target execution. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAJobStepTargetExecution(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetExecutions() - .getWithResponse( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - "step1", - UUID.fromString("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), - Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), "step1", + UUID.fromString("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java index b65240cb99c87..f536b76a4194a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java @@ -4,38 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobTargetExecutions ListByJobExecution. */ +/** + * Samples for JobTargetExecutions ListByJobExecution. + */ public final class JobTargetExecutionsListByJobExecutionSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionTargetsByExecution.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionTargetsByExecution. + * json */ /** * Sample code: List job step target executions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobStepTargetExecutions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetExecutions() - .listByJobExecution( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - null, - null, - null, - null, - null, - null, - null, - Context.NONE); + .listByJobExecution("group1", "server1", "agent1", "job1", + UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), null, null, null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java index 19836243c0c73..1979bbd3ef290 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java @@ -4,39 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for JobTargetExecutions ListByStep. */ +/** + * Samples for JobTargetExecutions ListByStep. + */ public final class JobTargetExecutionsListByStepSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionTargetsByStep.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobExecutionTargetsByStep.json */ /** * Sample code: List job step target executions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobStepTargetExecutions(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetExecutions() - .listByStep( - "group1", - "server1", - "agent1", - "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - "step1", - null, - null, - null, - null, - null, - null, - null, - Context.NONE); + .listByStep("group1", "server1", "agent1", "job1", UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), + "step1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java index 4cae8ed7d3e45..eedd15963c33a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java @@ -4,85 +4,70 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner; import com.azure.resourcemanager.sql.models.JobTarget; import com.azure.resourcemanager.sql.models.JobTargetGroupMembershipType; import com.azure.resourcemanager.sql.models.JobTargetType; import java.util.Arrays; -/** Samples for JobTargetGroups CreateOrUpdate. */ +/** + * Samples for JobTargetGroups CreateOrUpdate. + */ public final class JobTargetGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobTargetGroupMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobTargetGroupMin.json */ /** * Sample code: Create or update a target group with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateATargetGroupWithMinimalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateATargetGroupWithMinimalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getJobTargetGroups() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "targetGroup1", - new JobTargetGroupInner().withMembers(Arrays.asList()), - Context.NONE); + .createOrUpdateWithResponse("group1", "server1", "agent1", "targetGroup1", + new JobTargetGroupInner().withMembers(Arrays.asList()), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobTargetGroupMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobTargetGroupMax.json */ /** * Sample code: Create or update a target group with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateATargetGroupWithAllProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateATargetGroupWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getJobTargetGroups() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "targetGroup1", - new JobTargetGroupInner() - .withMembers( - Arrays - .asList( - new JobTarget() - .withMembershipType(JobTargetGroupMembershipType.EXCLUDE) - .withType(JobTargetType.SQL_DATABASE) - .withServerName("server1") - .withDatabaseName("database1"), - new JobTarget() - .withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_SERVER) - .withServerName("server1") - .withRefreshCredential("fakeTokenPlaceholder"), - new JobTarget() - .withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_ELASTIC_POOL) - .withServerName("server2") - .withElasticPoolName("pool1") - .withRefreshCredential("fakeTokenPlaceholder"), - new JobTarget() - .withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_SHARD_MAP) - .withServerName("server3") - .withShardMapName("shardMap1") - .withRefreshCredential("fakeTokenPlaceholder"))), - Context.NONE); + .createOrUpdateWithResponse("group1", "server1", "agent1", "targetGroup1", + new JobTargetGroupInner().withMembers(Arrays.asList( + new JobTarget().withMembershipType(JobTargetGroupMembershipType.EXCLUDE) + .withType(JobTargetType.SQL_DATABASE) + .withServerName("server1") + .withDatabaseName("database1"), + new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) + .withType(JobTargetType.SQL_SERVER) + .withServerName("server1") + .withRefreshCredential("fakeTokenPlaceholder"), + new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) + .withType(JobTargetType.SQL_ELASTIC_POOL) + .withServerName("server2") + .withElasticPoolName("pool1") + .withRefreshCredential("fakeTokenPlaceholder"), + new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) + .withType(JobTargetType.SQL_SHARD_MAP) + .withServerName("server3") + .withShardMapName("shardMap1") + .withRefreshCredential("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java index e0d2af744d2f1..050650060a8a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobTargetGroups Delete. */ +/** + * Samples for JobTargetGroups Delete. + */ public final class JobTargetGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobTargetGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJobTargetGroup.json */ /** * Sample code: Delete a target group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteATargetGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetGroups() - .deleteWithResponse("group1", "server1", "agent1", "targetGroup1", Context.NONE); + .deleteWithResponse("group1", "server1", "agent1", "targetGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java index c95d1b3dae367..cdac2c0532117 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobTargetGroups Get. */ +/** + * Samples for JobTargetGroups Get. + */ public final class JobTargetGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobTargetGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobTargetGroup.json */ /** * Sample code: Get a target group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getATargetGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetGroups() - .getWithResponse("group1", "server1", "agent1", "targetGroup1", Context.NONE); + .getWithResponse("group1", "server1", "agent1", "targetGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java index c51388d5783b5..84117319e9a1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobTargetGroups ListByAgent. */ +/** + * Samples for JobTargetGroups ListByAgent. + */ public final class JobTargetGroupsListByAgentSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobTargetGroups.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobTargetGroups.json */ /** * Sample code: Get all target groups in an agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAllTargetGroupsInAnAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobTargetGroups() - .listByAgent("group1", "server1", "agent1", Context.NONE); + .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java index 80eadf6a2c59e..1f949f05305f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobVersions Get. */ +/** + * Samples for JobVersions Get. + */ public final class JobVersionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobVersion.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJobVersion.json */ /** * Sample code: Get a version of a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAVersionOfAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobVersions() - .getWithResponse("group1", "server1", "agent1", "job1", 1, Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", 1, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java index f67d7eb9cd5c7..85e3e8b15abbd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for JobVersions ListByJob. */ +/** + * Samples for JobVersions ListByJob. + */ public final class JobVersionsListByJobSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobVersions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobVersions.json */ /** * Sample code: Get all versions of a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAllVersionsOfAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobVersions() - .listByJob("group1", "server1", "agent1", "job1", Context.NONE); + .listByJob("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java index df51afc86a1ef..f62170b71b08f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java @@ -4,59 +4,54 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.JobInner; import com.azure.resourcemanager.sql.models.JobSchedule; import com.azure.resourcemanager.sql.models.JobScheduleType; import java.time.OffsetDateTime; -/** Samples for Jobs CreateOrUpdate. */ +/** + * Samples for Jobs CreateOrUpdate. + */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobMin.json */ /** * Sample code: Create a job with default properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAJobWithDefaultProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobs() - .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", new JobInner(), Context.NONE); + .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", new JobInner(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateJobMax.json */ /** * Sample code: Create a job with all properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAJobWithAllPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobs() - .createOrUpdateWithResponse( - "group1", - "server1", - "agent1", - "job1", - new JobInner() - .withDescription("my favourite job") - .withSchedule( - new JobSchedule() - .withStartTime(OffsetDateTime.parse("2015-09-24T18:30:01Z")) - .withEndTime(OffsetDateTime.parse("2015-09-24T23:59:59Z")) - .withType(JobScheduleType.RECURRING) - .withEnabled(true) - .withInterval("PT5M")), - Context.NONE); + .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", + new JobInner().withDescription("my favourite job") + .withSchedule(new JobSchedule().withStartTime(OffsetDateTime.parse("2015-09-24T18:30:01Z")) + .withEndTime(OffsetDateTime.parse("2015-09-24T23:59:59Z")) + .withType(JobScheduleType.RECURRING) + .withEnabled(true) + .withInterval("PT5M")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java index 6323df973dcda..ed35acd2ef745 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Jobs Delete. */ +/** + * Samples for Jobs Delete. + */ public final class JobsDeleteSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteJob.json */ /** * Sample code: Delete a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobs() - .deleteWithResponse("group1", "server1", "agent1", "job1", Context.NONE); + .deleteWithResponse("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java index 7443ae68ebc91..5aec3045a019c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Jobs Get. */ +/** + * Samples for Jobs Get. + */ public final class JobsGetSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetJob.json */ /** * Sample code: Get a job. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAJob(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getJobs() - .getWithResponse("group1", "server1", "agent1", "job1", Context.NONE); + .getWithResponse("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java index 78df423c8f4df..89fa71be448c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Jobs ListByAgent. */ +/** + * Samples for Jobs ListByAgent. + */ public final class JobsListByAgentSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobsByAgent.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListJobsByAgent.json */ /** * Sample code: List jobs in a job agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listJobsInAJobAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getJobs().listByAgent("group1", "server1", "agent1", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getJobs() + .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java index b86042fff5efe..e67f13706abb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java @@ -4,33 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsInner; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; -/** Samples for LedgerDigestUploadsOperation CreateOrUpdate. */ +/** + * Samples for LedgerDigestUploadsOperation CreateOrUpdate. + */ public final class LedgerDigestUploadsOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsEnable.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsEnable.json */ /** * Sample code: Enables ledger digest upload configuration for a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void enablesLedgerDigestUploadConfigurationForADatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + enablesLedgerDigestUploadConfigurationForADatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLedgerDigestUploadsOperations() - .createOrUpdate( - "ledgertestrg", - "ledgertestserver", - "testdb", - LedgerDigestUploadsName.CURRENT, + .createOrUpdate("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, new LedgerDigestUploadsInner().withDigestStorageEndpoint("https://MyAccount.blob.core.windows.net"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java index 2cd3777e6ab33..244e8bb423c86 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java @@ -4,26 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; -/** Samples for LedgerDigestUploadsOperation Disable. */ +/** + * Samples for LedgerDigestUploadsOperation Disable. + */ public final class LedgerDigestUploadsOperationDisableSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsDisable.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsDisable.json */ /** * Sample code: Disables uploading ledger digests for a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void disablesUploadingLedgerDigestsForADatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + disablesUploadingLedgerDigestsForADatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLedgerDigestUploadsOperations() - .disable("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, Context.NONE); + .disable("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java index 5a37361204eea..4469801ee94bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java @@ -4,27 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; -/** Samples for LedgerDigestUploadsOperation Get. */ +/** + * Samples for LedgerDigestUploadsOperation Get. + */ public final class LedgerDigestUploadsOperationGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsGet.json */ /** * Sample code: Gets the current ledger digest upload configuration for a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheCurrentLedgerDigestUploadConfigurationForADatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLedgerDigestUploadsOperations() - .getWithResponse( - "ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, Context.NONE); + .getWithResponse("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java index 3657ee90d4207..f076f60036cb3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LedgerDigestUploadsOperation ListByDatabase. */ +/** + * Samples for LedgerDigestUploadsOperation ListByDatabase. + */ public final class LedgerDigestUploadsOperationListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LedgerDigestUploadsList.json */ /** * Sample code: Gets list of ledger digest upload settings on a database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsListOfLedgerDigestUploadSettingsOnADatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsListOfLedgerDigestUploadSettingsOnADatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLedgerDigestUploadsOperations() - .listByDatabase("ledgertestrg", "ledgertestserver", "testdb", Context.NONE); + .listByDatabase("ledgertestrg", "ledgertestserver", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java index 7c63107ae7408..208607452d607 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java @@ -4,37 +4,33 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; -/** Samples for LongTermRetentionBackups CopyByResourceGroup. */ +/** + * Samples for LongTermRetentionBackups CopyByResourceGroup. + */ public final class LongTermRetentionBackupsCopyByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupCopy.json */ /** * Sample code: Copy the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .copyByResourceGroup( - "testResourceGroup", - "japaneast", - "testserver", - "testDatabase", + .copyByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", - new CopyLongTermRetentionBackupParameters() - .withTargetServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") + new CopyLongTermRetentionBackupParameters().withTargetServerResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") .withTargetDatabaseName("testDatabase2") .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java index e6aee199afeac..2c4505004ebb4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java @@ -4,36 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; -/** Samples for LongTermRetentionBackups Copy. */ +/** + * Samples for LongTermRetentionBackups Copy. + */ public final class LongTermRetentionBackupsCopySamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupCopy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupCopy.json */ /** * Sample code: Copy the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .copy( - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - new CopyLongTermRetentionBackupParameters() - .withTargetServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") + .copy("japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", + new CopyLongTermRetentionBackupParameters().withTargetServerResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") .withTargetDatabaseName("testDatabase2") .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java index 8348ce82f7e7d..043bb6c613b9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups DeleteByResourceGroup. */ +/** + * Samples for LongTermRetentionBackups DeleteByResourceGroup. + */ public final class LongTermRetentionBackupsDeleteByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupDelete.json */ /** * Sample code: Delete the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .deleteByResourceGroup( - "testResourceGroup", - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .deleteByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java index 76cd1f29de2a4..6dc8d303445f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java @@ -4,29 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups Delete. */ +/** + * Samples for LongTermRetentionBackups Delete. + */ public final class LongTermRetentionBackupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupDelete.json */ /** * Sample code: Delete the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .delete( - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .delete("japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java index 7285904aa6c38..5ef5c1c2a2b94 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups GetByResourceGroup. */ +/** + * Samples for LongTermRetentionBackups GetByResourceGroup. + */ public final class LongTermRetentionBackupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupGet.json */ /** * Sample code: Get the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .getByResourceGroupWithResponse( - "testResourceGroup", - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .getByResourceGroupWithResponse("testResourceGroup", "japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java index 915ec6c5b9370..fcfbc58b7d8d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java @@ -4,29 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups Get. */ +/** + * Samples for LongTermRetentionBackups Get. + */ public final class LongTermRetentionBackupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupGet.json */ /** * Sample code: Get the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .getWithResponse( - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .getWithResponse("japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java index 6589f3afec982..a03cfabb42fec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByDatabase. */ +/** + * Samples for LongTermRetentionBackups ListByDatabase. + */ public final class LongTermRetentionBackupsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByDatabase + * .json */ /** * Sample code: Get all long term retention backups under the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByDatabase("japaneast", "testserver", "testDatabase", null, null, Context.NONE); + .listByDatabase("japaneast", "testserver", "testDatabase", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java index 195cb0d603613..985891c0ca8b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByLocation. */ +/** + * Samples for LongTermRetentionBackups ListByLocation. + */ public final class LongTermRetentionBackupsListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByLocation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByLocation + * .json */ /** * Sample code: Get all long term retention backups under the location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByLocation("japaneast", null, null, Context.NONE); + .listByLocation("japaneast", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java index 039ebe9aad89e..e91ab3e5838bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByResourceGroupDatabase. */ +/** + * Samples for LongTermRetentionBackups ListByResourceGroupDatabase. + */ public final class LongTermRetentionBackupsListByResourceGroupDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupListByDatabase.json */ /** * Sample code: Get all long term retention backups under the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByResourceGroupDatabase( - "testResourceGroup", "japaneast", "testserver", "testDatabase", null, null, Context.NONE); + .listByResourceGroupDatabase("testResourceGroup", "japaneast", "testserver", "testDatabase", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java index eed5601c72fd8..f2ad3ed216bdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByResourceGroupLocation. */ +/** + * Samples for LongTermRetentionBackups ListByResourceGroupLocation. + */ public final class LongTermRetentionBackupsListByResourceGroupLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupListByLocation.json */ /** * Sample code: Get all long term retention backups under the location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, Context.NONE); + .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java index 3c155ed2c7da4..68fe2cacd3f56 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByResourceGroupServer. */ +/** + * Samples for LongTermRetentionBackups ListByResourceGroupServer. + */ public final class LongTermRetentionBackupsListByResourceGroupServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupListByServer.json */ /** * Sample code: Get all long term retention backups under the server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByResourceGroupServer("testResourceGroup", "japaneast", "testserver", null, null, Context.NONE); + .listByResourceGroupServer("testResourceGroup", "japaneast", "testserver", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java index 50607edc2af26..123f6115311a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionBackups ListByServer. */ +/** + * Samples for LongTermRetentionBackups ListByServer. + */ public final class LongTermRetentionBackupsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupListByServer. + * json */ /** * Sample code: Get all long term retention backups under the server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .listByServer("japaneast", "testserver", null, null, Context.NONE); + .listByServer("japaneast", "testserver", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java index a99b41589e060..d87ebb1ced46c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; -/** Samples for LongTermRetentionBackups UpdateByResourceGroup. */ +/** + * Samples for LongTermRetentionBackups UpdateByResourceGroup. + */ public final class LongTermRetentionBackupsUpdateByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedLongTermRetentionBackupUpdate.json */ /** * Sample code: Update the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .updateByResourceGroup( - "testResourceGroup", - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - new UpdateLongTermRetentionBackupParameters() + .updateByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", new UpdateLongTermRetentionBackupParameters() .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java index 3fcc12fda5c4b..48e72b727f90a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java @@ -4,33 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; -/** Samples for LongTermRetentionBackups Update. */ +/** + * Samples for LongTermRetentionBackups Update. + */ public final class LongTermRetentionBackupsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionBackupUpdate.json */ /** * Sample code: Update the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionBackups() - .update( - "japaneast", - "testserver", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - new UpdateLongTermRetentionBackupParameters() + .update("japaneast", "testserver", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", new UpdateLongTermRetentionBackupParameters() .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java index ddf478f990f1c..64a468963ff72 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups DeleteByResourceGroup. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups DeleteByResourceGroup. + */ public final class LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json */ /** * Sample code: Delete the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .deleteByResourceGroup( - "testResourceGroup", - "japaneast", - "testInstance", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .deleteByResourceGroup("testResourceGroup", "japaneast", "testInstance", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java index d6d7b50858db7..661bb411415f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java @@ -4,29 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups Delete. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups Delete. + */ public final class LongTermRetentionManagedInstanceBackupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionBackupDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionBackupDelete.json */ /** * Sample code: Delete the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .delete( - "japaneast", - "testInstance", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .delete("japaneast", "testInstance", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java index 9828c98591a8a..111a0e1b6e1a3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups GetByResourceGroup. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups GetByResourceGroup. + */ public final class LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json */ /** * Sample code: Get the long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .getByResourceGroupWithResponse( - "testResourceGroup", - "japaneast", - "testInstance", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .getByResourceGroupWithResponse("testResourceGroup", "japaneast", "testInstance", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java index a97a9de24265a..12721ea3821c5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java @@ -4,30 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups Get. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups Get. + */ public final class LongTermRetentionManagedInstanceBackupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionBackupGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionBackupGet.json */ /** * Sample code: Get the long term retention backup of a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheLongTermRetentionBackupOfAManagedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheLongTermRetentionBackupOfAManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .getWithResponse( - "japaneast", - "testInstance", - "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - Context.NONE); + .getWithResponse("japaneast", "testInstance", "testDatabase", + "55555555-6666-7777-8888-999999999999;131637960820000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java index 28e475ce912eb..150a6a2239c82 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByDatabase. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByDatabase. + */ public final class LongTermRetentionManagedInstanceBackupsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionBackupListByDatabase.json */ /** * Sample code: Get all long term retention backups under the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByDatabase("japaneast", "testInstance", "testDatabase", null, null, Context.NONE); + .listByDatabase("japaneast", "testInstance", "testDatabase", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java index 916864b1a4310..7000e47f68ecc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByInstance. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByInstance. + */ public final class LongTermRetentionManagedInstanceBackupsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionBackupListByInstance.json */ /** * Sample code: Get all long term retention backups under the managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheManagedInstance( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByInstance("japaneast", "testInstance", null, null, Context.NONE); + .listByInstance("japaneast", "testInstance", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java index 5174804943d8a..437b06cbd5531 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByLocation. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByLocation. + */ public final class LongTermRetentionManagedInstanceBackupsListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionBackupListByLocation.json */ /** * Sample code: Get all long term retention backups under the location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByLocation("japaneast", null, null, Context.NONE); + .listByLocation("japaneast", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java index f2d09a68c9feb..9635ba04d0cb4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupDatabase. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupDatabase. + */ public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json */ /** * Sample code: Get all long term retention backups under the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupDatabase( - "testResourceGroup", "japaneast", "testInstance", "testDatabase", null, null, Context.NONE); + .listByResourceGroupDatabase("testResourceGroup", "japaneast", "testInstance", "testDatabase", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java index 34d0e033b98bc..e2f1ea6232f9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupInstance. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupInstance. + */ public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json */ /** * Sample code: Get all long term retention backups under the managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheManagedInstance( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupInstance("testResourceGroup", "japaneast", "testInstance", null, null, Context.NONE); + .listByResourceGroupInstance("testResourceGroup", "japaneast", "testInstance", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java index 5e871a8b12fb7..6c45669f2a94b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupLocation. */ +/** + * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupLocation. + */ public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json */ /** * Sample code: Get all long term retention backups under the location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAllLongTermRetentionBackupsUnderTheLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, Context.NONE); + .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java index 4aacfa5618380..3284151b0164e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java @@ -4,37 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; -/** Samples for LongTermRetentionPolicies CreateOrUpdate. */ +/** + * Samples for LongTermRetentionPolicies CreateOrUpdate. + */ public final class LongTermRetentionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyCreateOrUpdate + * .json */ /** * Sample code: Create or update the long term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateTheLongTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionPolicies() - .createOrUpdate( - "resourceGroup", - "testserver", - "testDatabase", - LongTermRetentionPolicyName.DEFAULT, - new LongTermRetentionPolicyInner() - .withWeeklyRetention("P1M") + .createOrUpdate("resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, + new LongTermRetentionPolicyInner().withWeeklyRetention("P1M") .withMonthlyRetention("P1Y") .withYearlyRetention("P5Y") .withWeekOfYear(5), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java index 659bfd32d5279..0e39e169cee40 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java @@ -4,27 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; -/** Samples for LongTermRetentionPolicies Get. */ +/** + * Samples for LongTermRetentionPolicies Get. + */ public final class LongTermRetentionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyGet.json */ /** * Sample code: Get the long term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheLongTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionPolicies() - .getWithResponse( - "resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, Context.NONE); + .getWithResponse("resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java index 395c5d5ab6bc5..72f62177b6522 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for LongTermRetentionPolicies ListByDatabase. */ +/** + * Samples for LongTermRetentionPolicies ListByDatabase. + */ public final class LongTermRetentionPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/LongTermRetentionPolicyListByDatabase + * .json */ /** * Sample code: Get the long term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheLongTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getLongTermRetentionPolicies() - .listByDatabase("resourceGroup", "testserver", "testDatabase", Context.NONE); + .listByDatabase("resourceGroup", "testserver", "testDatabase", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java index a5037fa8dcef5..0adece8b6121c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for MaintenanceWindowOptionsOperation Get. */ +/** + * Samples for MaintenanceWindowOptionsOperation Get. + */ public final class MaintenanceWindowOptionsOperationGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetMaintenanceWindowOptions.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetMaintenanceWindowOptions.json */ /** * Sample code: Gets a list of available maintenance windows for a selected database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAListOfAvailableMaintenanceWindowsForASelectedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getMaintenanceWindowOptionsOperations() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java index a5dafc918c41f..7dabfad8078c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java @@ -4,42 +4,35 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsInner; import com.azure.resourcemanager.sql.models.DayOfWeek; import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; import java.util.Arrays; -/** Samples for MaintenanceWindowsOperation CreateOrUpdate. */ +/** + * Samples for MaintenanceWindowsOperation CreateOrUpdate. + */ public final class MaintenanceWindowsOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateMaintenanceWindows.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateMaintenanceWindows.json */ /** * Sample code: Sets maintenance window settings for a selected database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void setsMaintenanceWindowSettingsForASelectedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + setsMaintenanceWindowSettingsForASelectedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getMaintenanceWindowsOperations() - .createOrUpdateWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdwdb", - "current", + .createOrUpdateWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", "current", new MaintenanceWindowsInner() - .withTimeRanges( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("00:00:00") - .withDuration("PT60M"))), - Context.NONE); + .withTimeRanges(Arrays.asList(new MaintenanceWindowTimeRange().withDayOfWeek(DayOfWeek.SATURDAY) + .withStartTime("00:00:00") + .withDuration("PT60M"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java index 8c275b45ec2f6..c349f68a9d89e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for MaintenanceWindowsOperation Get. */ +/** + * Samples for MaintenanceWindowsOperation Get. + */ public final class MaintenanceWindowsOperationGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetMaintenanceWindows.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetMaintenanceWindows.json */ /** * Sample code: Gets maintenance window settings for a selected database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsMaintenanceWindowSettingsForASelectedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsMaintenanceWindowSettingsForASelectedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getMaintenanceWindowsOperations() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java index f0c29d00925d9..c1d72079af3af 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedBackupShortTermRetentionPolicies CreateOrUpdate. */ +/** + * Samples for ManagedBackupShortTermRetentionPolicies CreateOrUpdate. + */ public final class ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicy + * .json */ /** * Sample code: Update the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedBackupShortTermRetentionPolicies() - .createOrUpdate( - "resourceGroup", - "testsvr", - "testdb", - ManagedShortTermRetentionPolicyName.DEFAULT, + .createOrUpdate("resourceGroup", "testsvr", "testdb", ManagedShortTermRetentionPolicyName.DEFAULT, new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java index 1ff0418c54365..0270f3698712f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java @@ -4,31 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedBackupShortTermRetentionPolicies Get. */ +/** + * Samples for ManagedBackupShortTermRetentionPolicies Get. + */ public final class ManagedBackupShortTermRetentionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetManagedShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetManagedShortTermRetentionPolicy. + * json */ /** * Sample code: Get the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedBackupShortTermRetentionPolicies() - .getWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - ManagedShortTermRetentionPolicyName.DEFAULT, - Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", + ManagedShortTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java index 792a7d895a262..c7b4db8510074 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedBackupShortTermRetentionPolicies ListByDatabase. */ +/** + * Samples for ManagedBackupShortTermRetentionPolicies ListByDatabase. + */ public final class ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetListManagedShortTermRetentionPolicy.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * GetListManagedShortTermRetentionPolicy.json */ /** * Sample code: Get the short term retention policy list for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyListForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyListForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedBackupShortTermRetentionPolicies() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java index 046fb444163d4..52e2e31eb3c1d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedBackupShortTermRetentionPolicies Update. */ +/** + * Samples for ManagedBackupShortTermRetentionPolicies Update. + */ public final class ManagedBackupShortTermRetentionPoliciesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicy.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicy + * .json */ /** * Sample code: Update the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedBackupShortTermRetentionPolicies() - .update( - "resourceGroup", - "testsvr", - "testdb", - ManagedShortTermRetentionPolicyName.DEFAULT, + .update("resourceGroup", "testsvr", "testdb", ManagedShortTermRetentionPolicyName.DEFAULT, new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java index dec879afadc09..60e4da611658f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseColumns Get. */ +/** + * Samples for ManagedDatabaseColumns Get. + */ public final class ManagedDatabaseColumnsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnGet.json */ /** * Sample code: Get managed database column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedDatabaseColumn(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseColumns() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", "column1", Context.NONE); + .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", "column1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java index d6b2e7bd082dc..6534e627e5fb4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java @@ -4,51 +4,46 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.Arrays; -/** Samples for ManagedDatabaseColumns ListByDatabase. */ +/** + * Samples for ManagedDatabaseColumns ListByDatabase. + */ public final class ManagedDatabaseColumnsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedColumnsListByDatabaseMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedColumnsListByDatabaseMin.json */ /** * Sample code: List managed database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, Context.NONE); + .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedColumnsListByDatabaseMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedColumnsListByDatabaseMax.json */ /** * Sample code: Filter managed database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void filterManagedDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseColumns() - .listByDatabase( - "myRG", - "serverName", - "myDatabase", - Arrays.asList("dbo"), - Arrays.asList("customer", "address"), - Arrays.asList("username"), - Arrays.asList("schema asc", "table", "column desc"), - null, - Context.NONE); + .listByDatabase("myRG", "serverName", "myDatabase", Arrays.asList("dbo"), + Arrays.asList("customer", "address"), Arrays.asList("username"), + Arrays.asList("schema asc", "table", "column desc"), null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java index b3a747967f55b..b277773b59e35 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseColumns ListByTable. */ +/** + * Samples for ManagedDatabaseColumns ListByTable. + */ public final class ManagedDatabaseColumnsListByTableSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnListByTable.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnListByTable.json */ /** * Sample code: List managed database columns. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedDatabaseColumns(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseColumns() - .listByTable("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", null, Context.NONE); + .listByTable("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java index 389dc9a7984c4..74877be1661b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseQueries Get. */ +/** + * Samples for ManagedDatabaseQueries Get. + */ public final class ManagedDatabaseQueriesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryGet.json */ /** * Sample code: Obtain query properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainQueryProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseQueries() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java index 5f947c394be99..557d0bc48cf61 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java @@ -4,77 +4,68 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; -/** Samples for ManagedDatabaseQueries ListByQuery. */ +/** + * Samples for ManagedDatabaseQueries ListByQuery. + */ public final class ManagedDatabaseQueriesListByQuerySamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsListMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsListMax + * .json */ /** * Sample code: Obtain query execution statistics. Example with all request parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainQueryExecutionStatisticsExampleWithAllRequestParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseQueries() - .listByQuery( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "database_1", - "42", - "03/01/2020 16:23:09", - "03/11/2020 14:00:00", - QueryTimeGrainType.P1D, - Context.NONE); + .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", "03/01/2020 16:23:09", + "03/11/2020 14:00:00", QueryTimeGrainType.P1D, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsList. + * json */ /** * Sample code: Obtain query execution statistics. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainQueryExecutionStatistics(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseQueries() - .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, null, Context.NONE); + .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, null, + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsListMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceQueryStatisticsListMin + * .json */ /** * Sample code: Obtain query execution statistics. Minimal example with only mandatory request parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseQueries() - .listByQuery( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "database_1", - "42", - null, - null, - QueryTimeGrainType.PT1H, - Context.NONE); + .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, + QueryTimeGrainType.PT1H, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java index 85e8b95421e8c..7cd4acc138aff 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java @@ -4,52 +4,44 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdate; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; import java.util.Arrays; -/** Samples for ManagedDatabaseRecommendedSensitivityLabels Update. */ +/** + * Samples for ManagedDatabaseRecommendedSensitivityLabels Update. + */ public final class ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSensitivityLabelsRecommendedUpdate.json */ /** * Sample code: Update recommended sensitivity labels of a given database using an operations batch. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseRecommendedSensitivityLabels() - .updateWithResponse( - "myRG", - "myManagedInstanceName", - "myDatabase", - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - Context.NONE); + .updateWithResponse("myRG", "myManagedInstanceName", "myDatabase", + new RecommendedSensitivityLabelUpdateList().withOperations(Arrays.asList( + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) + .withSchema("dbo") + .withTable("table1") + .withColumn("column1"), + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) + .withSchema("dbo") + .withTable("table2") + .withColumn("column2"), + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) + .withSchema("dbo") + .withTable("Table1") + .withColumn("Column3"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java index 8a2d4ed7b94f5..6014bb62a34e6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.RestoreDetailsName; -/** Samples for ManagedDatabaseRestoreDetails Get. */ +/** + * Samples for ManagedDatabaseRestoreDetails Get. + */ public final class ManagedDatabaseRestoreDetailsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseRestoreDetails.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseRestoreDetails.json */ /** * Sample code: Managed database restore details. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void managedDatabaseRestoreDetails(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseRestoreDetails() - .getWithResponse( - "Default-SQL-SouthEastAsia", "managedInstance", "testdb", RestoreDetailsName.DEFAULT, Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", "testdb", RestoreDetailsName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java index 162630043b162..8b1310a744e1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSchemas Get. */ +/** + * Samples for ManagedDatabaseSchemas Get. + */ public final class ManagedDatabaseSchemasGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSchemaGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSchemaGet.json */ /** * Sample code: Get managed database schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedDatabaseSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSchemas() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", Context.NONE); + .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java index 300ca42ebdc0e..452d47c3a55f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSchemas ListByDatabase. */ +/** + * Samples for ManagedDatabaseSchemas ListByDatabase. + */ public final class ManagedDatabaseSchemasListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSchemaListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSchemaListByDatabase. + * json */ /** * Sample code: List managed database schemas. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedDatabaseSchemas(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSchemas() - .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, Context.NONE); + .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java index b145576d23ec8..03a363aab9cb5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java @@ -4,66 +4,62 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; import java.util.Arrays; -/** Samples for ManagedDatabaseSecurityAlertPolicies CreateOrUpdate. */ +/** + * Samples for ManagedDatabaseSecurityAlertPolicies CreateOrUpdate. + */ public final class ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertCreateMax + * .json */ /** * Sample code: Update a database's threat detection policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateADatabaseSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateADatabaseSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse( - "securityalert-4799", - "securityalert-6440", - "testdb", + .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, - new ManagedDatabaseSecurityAlertPolicyInner() - .withState(SecurityAlertPolicyState.ENABLED) + new ManagedDatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) .withEmailAddresses(Arrays.asList("test@contoso.com", "user@contoso.com")) .withEmailAccountAdmins(true) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withRetentionDays(6), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertCreateMin + * .json */ /** * Sample code: Update a database's threat detection policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse( - "securityalert-4799", - "securityalert-6440", - "testdb", + .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, new ManagedDatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java index cf2721ba64c00..bc41c62124996 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -/** Samples for ManagedDatabaseSecurityAlertPolicies Get. */ +/** + * Samples for ManagedDatabaseSecurityAlertPolicies Get. + */ public final class ManagedDatabaseSecurityAlertPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertGet.json */ /** * Sample code: Get a database's threat detection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityAlertPolicies() - .getWithResponse( - "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE); + .getWithResponse("securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java index 65ed5b0052108..9c230764b6c4f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSecurityAlertPolicies ListByDatabase. */ +/** + * Samples for ManagedDatabaseSecurityAlertPolicies ListByDatabase. + */ public final class ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityAlertListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSecurityAlertListByDatabase.json */ /** * Sample code: Get a list of the database's threat detection policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAListOfTheDatabaseSThreatDetectionPolicies( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAListOfTheDatabaseSThreatDetectionPolicies(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityAlertPolicies() - .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", Context.NONE); + .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java index 6eff22377d012..d1b0d7fdd55e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java @@ -4,51 +4,47 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSecurityEvents ListByDatabase. */ +/** + * Samples for ManagedDatabaseSecurityEvents ListByDatabase. + */ public final class ManagedDatabaseSecurityEventsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityEventsGetMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityEventsGetMin. + * json */ /** * Sample code: Get the managed database's security events with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheManagedDatabaseSSecurityEventsWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityEvents() - .listByDatabase("testrg", "testcl", "database1", null, null, null, null, Context.NONE); + .listByDatabase("testrg", "testcl", "database1", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityEventsGetMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSecurityEventsGetMax. + * json */ /** * Sample code: Get the managed database's security events with maximal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheManagedDatabaseSSecurityEventsWithMaximalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSecurityEvents() - .listByDatabase( - "testrg", - "testcl", - "database1", - "ShowServerRecords eq true", - 0L, - 1L, + .listByDatabase("testrg", "testcl", "database1", "ShowServerRecords eq true", 0L, 1L, "eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java index 2879fd22b12b1..626b742107079 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java @@ -4,40 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; import com.azure.resourcemanager.sql.models.SensitivityLabelRank; -/** Samples for ManagedDatabaseSensitivityLabels CreateOrUpdate. */ +/** + * Samples for ManagedDatabaseSensitivityLabels CreateOrUpdate. + */ public final class ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnSensitivityLabelCreate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseColumnSensitivityLabelCreate.json */ /** * Sample code: Updates or creates a sensitivity label of a given column with all parameters in a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesOrCreatesASensitivityLabelOfAGivenColumnWithAllParametersInAManagedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .createOrUpdateWithResponse( - "myRG", - "myManagedInstanceName", - "myDatabase", - "dbo", - "myTable", - "myColumn", - new SensitivityLabelInner() - .withLabelName("PII") + .createOrUpdateWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", + new SensitivityLabelInner().withLabelName("PII") .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") .withInformationType("PhoneNumber") .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") .withRank(SensitivityLabelRank.HIGH), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java index c4b907b32ac2e..30f508312fb7e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels Delete. */ +/** + * Samples for ManagedDatabaseSensitivityLabels Delete. + */ public final class ManagedDatabaseSensitivityLabelsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnSensitivityLabelDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseColumnSensitivityLabelDelete.json */ /** * Sample code: Deletes the sensitivity label of a given column in a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deletesTheSensitivityLabelOfAGivenColumnInAManagedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .deleteWithResponse( - "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .deleteWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java index d74e9f06bb5d5..d24ba59dcdbc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels DisableRecommendation. */ +/** + * Samples for ManagedDatabaseSensitivityLabels DisableRecommendation. + */ public final class ManagedDatabaseSensitivityLabelsDisableRecommendationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json */ /** * Sample code: Disables the sensitivity recommendations on a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void disablesTheSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + disablesTheSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .disableRecommendationWithResponse( - "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .disableRecommendationWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", + "myColumn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java index 6b5605743fe27..1e36dc276334b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels EnableRecommendation. */ +/** + * Samples for ManagedDatabaseSensitivityLabels EnableRecommendation. + */ public final class ManagedDatabaseSensitivityLabelsEnableRecommendationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json */ /** * Sample code: Enables the sensitivity recommendations on a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void enablesTheSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + enablesTheSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .enableRecommendationWithResponse( - "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .enableRecommendationWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", + "myColumn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java index c7f472db43892..58183b3c7d8e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java @@ -4,34 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; -/** Samples for ManagedDatabaseSensitivityLabels Get. */ +/** + * Samples for ManagedDatabaseSensitivityLabels Get. + */ public final class ManagedDatabaseSensitivityLabelsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseColumnSensitivityLabelGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseColumnSensitivityLabelGet.json */ /** * Sample code: Gets the sensitivity label of a given column in a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsTheSensitivityLabelOfAGivenColumnInAManagedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsTheSensitivityLabelOfAGivenColumnInAManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .getWithResponse( - "myRG", - "myManagedInstanceName", - "myDatabase", - "dbo", - "myTable", - "myColumn", - SensitivityLabelSource.CURRENT, - Context.NONE); + .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", + SensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java index 1f8431a817216..f63f2cbbde170 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels ListByDatabase. */ +/** + * Samples for ManagedDatabaseSensitivityLabels ListByDatabase. + */ public final class ManagedDatabaseSensitivityLabelsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSensitivityLabelsListByDatabase.json */ /** * Sample code: Gets the current and recommended sensitivity labels of a given database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, Context.NONE); + .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java index 4bf343f56cc9d..6af461b5ee751 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels ListCurrentByDatabase. */ +/** + * Samples for ManagedDatabaseSensitivityLabels ListCurrentByDatabase. + */ public final class ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json */ /** * Sample code: Gets the current sensitivity labels of a given database in a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheCurrentSensitivityLabelsOfAGivenDatabaseInAManagedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .listCurrentByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, Context.NONE); + .listCurrentByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java index ff21e8ea2b1c2..fcb3524f997d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseSensitivityLabels ListRecommendedByDatabase. */ +/** + * Samples for ManagedDatabaseSensitivityLabels ListRecommendedByDatabase. + */ public final class ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json */ /** * Sample code: Gets the recommended sensitivity labels of a given database in a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheRecommendedSensitivityLabelsOfAGivenDatabaseInAManagedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .listRecommendedByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, Context.NONE); + .listRecommendedByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java index 8e529554d73bb..9b695fa8bf7b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java @@ -4,65 +4,53 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import java.util.Arrays; -/** Samples for ManagedDatabaseSensitivityLabels Update. */ +/** + * Samples for ManagedDatabaseSensitivityLabels Update. + */ public final class ManagedDatabaseSensitivityLabelsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseSensitivityLabelsCurrentUpdate.json */ /** * Sample code: Update sensitivity labels of a given database using an operations batch. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseSensitivityLabels() - .updateWithResponse( - "myRG", - "myManagedInstanceName", - "myDatabase", - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8")), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - Context.NONE); + .updateWithResponse("myRG", "myManagedInstanceName", "myDatabase", + new SensitivityLabelUpdateList().withOperations(Arrays.asList( + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) + .withSchema("dbo") + .withTable("table1") + .withColumn("column1") + .withSensitivityLabel(new SensitivityLabelInner().withLabelName("Highly Confidential") + .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") + .withInformationType("Financial") + .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8")), + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) + .withSchema("dbo") + .withTable("table2") + .withColumn("column2") + .withSensitivityLabel(new SensitivityLabelInner().withLabelName("PII") + .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") + .withInformationType("PhoneNumber") + .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")), + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.REMOVE) + .withSchema("dbo") + .withTable("Table1") + .withColumn("Column3"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java index 928b0a6c2df41..6585cb35932d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseTables Get. */ +/** + * Samples for ManagedDatabaseTables Get. + */ public final class ManagedDatabaseTablesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseTableGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseTableGet.json */ /** * Sample code: Get managed database table. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedDatabaseTable(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseTables() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", Context.NONE); + .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java index a7b390fe9dd06..8480a948180ce 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseTables ListBySchema. */ +/** + * Samples for ManagedDatabaseTables ListBySchema. + */ public final class ManagedDatabaseTablesListBySchemaSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseTableListBySchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseTableListBySchema.json */ /** * Sample code: List managed database tables. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedDatabaseTables(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseTables() - .listBySchema("myRG", "myManagedInstanceName", "myDatabase", "dbo", null, Context.NONE); + .listBySchema("myRG", "myManagedInstanceName", "myDatabase", "dbo", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java index 4b9a357adada0..77e0730223daf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java @@ -4,34 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionInner; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -/** Samples for ManagedDatabaseTransparentDataEncryption CreateOrUpdate. */ +/** + * Samples for ManagedDatabaseTransparentDataEncryption CreateOrUpdate. + */ public final class ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedTransparentDataEncryptionUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedTransparentDataEncryptionUpdate.json */ /** * Sample code: Update a database's Transparent Data Encryption state with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseTransparentDataEncryptions() - .createOrUpdateWithResponse( - "securitytde-42-rg", - "securitytde-42", - "testdb", + .createOrUpdateWithResponse("securitytde-42-rg", "securitytde-42", "testdb", TransparentDataEncryptionName.CURRENT, new ManagedTransparentDataEncryptionInner().withState(TransparentDataEncryptionState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java index 190da949a9944..8a31373f38cdb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; -/** Samples for ManagedDatabaseTransparentDataEncryption Get. */ +/** + * Samples for ManagedDatabaseTransparentDataEncryption Get. + */ public final class ManagedDatabaseTransparentDataEncryptionGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedTransparentDataEncryptionGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedTransparentDataEncryptionGet. + * json */ /** * Sample code: Get a database's transparent data encryption. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSTransparentDataEncryption(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseTransparentDataEncryptions() - .getWithResponse( - "security-tde-resourcegroup", - "securitytde", - "testdb", - TransparentDataEncryptionName.CURRENT, - Context.NONE); + .getWithResponse("security-tde-resourcegroup", "securitytde", "testdb", + TransparentDataEncryptionName.CURRENT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java index 73bc7f4a247c0..8bcab2264c888 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseTransparentDataEncryption ListByDatabase. */ +/** + * Samples for ManagedDatabaseTransparentDataEncryption ListByDatabase. + */ public final class ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedTransparentDataEncryptionList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedTransparentDataEncryptionList. + * json */ /** * Sample code: Get a list of the database's transparent data encryptions. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAListOfTheDatabaseSTransparentDataEncryptions( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAListOfTheDatabaseSTransparentDataEncryptions(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseTransparentDataEncryptions() - .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", Context.NONE); + .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java index dfb23a16e42ce..34f3e2e377bf8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java @@ -4,47 +4,39 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner; import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; import java.util.Arrays; -/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. + */ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json */ /** * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - new DatabaseVulnerabilityAssessmentRuleBaselineInner() - .withBaselineResults( - Arrays - .asList( - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userA", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userB", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), - Context.NONE); + new DatabaseVulnerabilityAssessmentRuleBaselineInner().withBaselineResults(Arrays.asList( + new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userA", "SELECT")), + new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userB", "SELECT")), + new DatabaseVulnerabilityAssessmentRuleBaselineItem() + .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java index 80e2bbb7e6f36..d6a670a97f2f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Delete. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Delete. + */ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json */ /** * Sample code: Removes a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java index 6bd45d642d4f2..5176c0a9e6716 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java @@ -4,34 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Get. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Get. + */ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json */ /** * Sample code: Gets a database's vulnerability assessment rule baseline. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .getWithResponse( - "vulnerabilityaseessmenttest-4711", - "vulnerabilityaseessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.MASTER, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.MASTER, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java index 4ddb4a328d70b..9b4c48c4671d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentScans Export. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentScans Export. + */ public final class ManagedDatabaseVulnerabilityAssessmentScansExportSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentScanExport.json */ /** * Sample code: Export a database's vulnerability assessment scan results. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void exportADatabaseSVulnerabilityAssessmentScanResults( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + exportADatabaseSVulnerabilityAssessmentScanResults(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentScans() - .exportWithResponse( - "vulnerabilityassessmenttest-4799", - "vulnerabilityassessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); + .exportWithResponse("vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java index 433ca0ed84c0f..8992d7fb002aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentScans Get. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentScans Get. + */ public final class ManagedDatabaseVulnerabilityAssessmentScansGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json */ /** * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsADatabaseVulnerabilityAssessmentScanRecordByScanID(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentScans() - .getWithResponse( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); + .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java index d97b8beb413bb..86cd811466e14 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java @@ -4,32 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentScans InitiateScan. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentScans InitiateScan. + */ public final class ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentScansExecute.json */ /** * Sample code: Executes a database's vulnerability assessment scan. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void executesADatabaseSVulnerabilityAssessmentScan( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentScans() - .initiateScan( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan01", - Context.NONE); + .initiateScan("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, "scan01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java index 7a247db6186a2..973adc2c7361b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessmentScans ListByDatabase. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessmentScans ListByDatabase. + */ public final class ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json */ /** * Sample code: Gets the list of a database vulnerability assessment scan records. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsTheListOfADatabaseVulnerabilityAssessmentScanRecords(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessmentScans() - .listByDatabase( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .listByDatabase("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java index 152fa05312c43..68ee8547b54ad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java @@ -4,68 +4,61 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; -/** Samples for ManagedDatabaseVulnerabilityAssessments CreateOrUpdate. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessments CreateOrUpdate. + */ public final class ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentCreateMax.json */ /** * Sample code: Create a database's vulnerability assessment with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createADatabaseSVulnerabilityAssessmentWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, + new DatabaseVulnerabilityAssessmentAutoGeneratedInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - Context.NONE); + .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) + .withEmailSubscriptionAdmins(true) + .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentCreateMin.json */ /** * Sample code: Create a database's vulnerability assessment with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createADatabaseSVulnerabilityAssessmentWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + "testdb", VulnerabilityAssessmentName.DEFAULT, + new DatabaseVulnerabilityAssessmentAutoGeneratedInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java index af5e5ab1ccec6..177be87888b5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java @@ -4,30 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessments Delete. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessments Delete. + */ public final class ManagedDatabaseVulnerabilityAssessmentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentDelete.json */ /** * Sample code: Remove a database's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void removeADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java index 0f67016ed5f6d..7b3d331066a5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java @@ -4,30 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedDatabaseVulnerabilityAssessments Get. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessments Get. + */ public final class ManagedDatabaseVulnerabilityAssessmentsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentGet.json */ /** * Sample code: Get a database's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java index a7f8a9e32192c..da3f8b85947f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabaseVulnerabilityAssessments ListByDatabase. */ +/** + * Samples for ManagedDatabaseVulnerabilityAssessments ListByDatabase. + */ public final class ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseVulnerabilityAssessmentListByDatabase.json */ /** * Sample code: Get a database's vulnerability assessments list. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSVulnerabilityAssessmentsList(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabaseVulnerabilityAssessments() - .listByDatabase( - "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE); + .listByDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java index 30066fba70b0b..fa7538e0402be 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java @@ -4,32 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition; -/** Samples for ManagedDatabases CancelMove. */ +/** + * Samples for ManagedDatabases CancelMove. + */ public final class ManagedDatabasesCancelMoveSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCancelMove.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCancelMove.json */ /** * Sample code: Cancels a managed database move. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void cancelsAManagedDatabaseMove(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .cancelMove( - "group1", - "testInstanceSrc", - "testDatabase", - new ManagedDatabaseMoveDefinition() - .withDestinationManagedDatabaseId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - Context.NONE); + .cancelMove("group1", "testInstanceSrc", "testDatabase", + new ManagedDatabaseMoveDefinition().withDestinationManagedDatabaseId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java index a847cb13ff37b..7c9fb83b20bad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java @@ -4,32 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition; -/** Samples for ManagedDatabases CompleteMove. */ +/** + * Samples for ManagedDatabases CompleteMove. + */ public final class ManagedDatabasesCompleteMoveSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCompleteMove.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCompleteMove.json */ /** * Sample code: Completes a managed database move. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void completesAManagedDatabaseMove(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .completeMove( - "group1", - "testInstanceSrc", - "testDatabase", - new ManagedDatabaseMoveDefinition() - .withDestinationManagedDatabaseId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - Context.NONE); + .completeMove("group1", "testInstanceSrc", "testDatabase", + new ManagedDatabaseMoveDefinition().withDestinationManagedDatabaseId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java index 7eaabcea26de6..3fed381110e6d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java @@ -4,31 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.CompleteDatabaseRestoreDefinition; -/** Samples for ManagedDatabases CompleteRestore. */ +/** + * Samples for ManagedDatabases CompleteRestore. + */ public final class ManagedDatabasesCompleteRestoreSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCompleteExternalRestore.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseCompleteExternalRestore.json */ /** * Sample code: Completes a managed database external backup restore. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void completesAManagedDatabaseExternalBackupRestore( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + completesAManagedDatabaseExternalBackupRestore(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .completeRestore( - "myRG", - "myManagedInstanceName", - "myDatabase", + .completeRestore("myRG", "myManagedInstanceName", "myDatabase", new CompleteDatabaseRestoreDefinition().withLastBackupName("testdb1_log4"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java index 47a241b76d25c..0b79c2b5249aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java @@ -4,174 +4,155 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner; import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; -/** Samples for ManagedDatabases CreateOrUpdate. */ +/** + * Samples for ManagedDatabases CreateOrUpdate. + */ public final class ManagedDatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateRecovery.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateRecovery.json */ /** * Sample code: Creates a new managed database from restoring a geo-replicated backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsANewManagedDatabaseFromRestoringAGeoReplicatedBackup( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "server1", - "testdb_recovered", - new ManagedDatabaseInner() - .withLocation("southeastasia") - .withCreateMode(ManagedDatabaseCreateMode.RECOVERY) - .withRecoverableDatabaseId( - "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "server1", "testdb_recovered", new ManagedDatabaseInner() + .withLocation("southeastasia") + .withCreateMode(ManagedDatabaseCreateMode.RECOVERY) + .withRecoverableDatabaseId( + "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateRestoreExternalBackup.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseCreateRestoreExternalBackup.json */ /** * Sample code: Creates a new managed database by restoring from an external backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsANewManagedDatabaseByRestoringFromAnExternalBackup( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - "managedDatabase", - new ManagedDatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", + new ManagedDatabaseInner().withLocation("southeastasia") .withCollation("SQL_Latin1_General_CP1_CI_AS") .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP) .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups") .withStorageContainerSasToken("fakeTokenPlaceholder") .withAutoCompleteRestore(true) .withLastBackupName("last_backup_name"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateMax.json */ /** * Sample code: Creates a new managed database with maximal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsANewManagedDatabaseWithMaximalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsANewManagedDatabaseWithMaximalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia").withTags(mapOf("tagKey1", "TagValue1")), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", + new ManagedDatabaseInner().withLocation("southeastasia") + .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateMin.json */ /** * Sample code: Creates a new managed database with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsANewManagedDatabaseWithMinimalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsANewManagedDatabaseWithMinimalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", + new ManagedDatabaseInner().withLocation("southeastasia"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreatePointInTimeRestore.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedDatabaseCreatePointInTimeRestore.json */ /** * Sample code: Creates a new managed database using point in time restore. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createsANewManagedDatabaseUsingPointInTimeRestore( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createsANewManagedDatabaseUsingPointInTimeRestore(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - "managedDatabase", - new ManagedDatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", + new ManagedDatabaseInner().withLocation("southeastasia") .withRestorePointInTime(OffsetDateTime.parse("2017-07-14T05:35:31.503Z")) .withCreateMode(ManagedDatabaseCreateMode.POINT_IN_TIME_RESTORE) .withSourceDatabaseId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateRestoreLtrBackup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseCreateRestoreLtrBackup + * .json */ /** * Sample code: Creates a new managed database from restoring a long term retention backup. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsANewManagedDatabaseFromRestoringALongTermRetentionBackup( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - "managedDatabase", - new ManagedDatabaseInner() - .withLocation("southeastasia") + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", + new ManagedDatabaseInner().withLocation("southeastasia") .withCollation("SQL_Latin1_General_CP1_CI_AS") .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP) .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups") .withStorageContainerSasToken("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java index ce5fe878cc675..7916fb99b650e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabases Delete. */ +/** + * Samples for ManagedDatabases Delete. + */ public final class ManagedDatabasesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseDelete.json */ /** * Sample code: Delete managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .delete("Default-SQL-SouthEastAsia", "managedInstance", "testdb", Context.NONE); + .delete("Default-SQL-SouthEastAsia", "managedInstance", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java index bf3603dca198e..5f21a55af6d8b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabases Get. */ +/** + * Samples for ManagedDatabases Get. + */ public final class ManagedDatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseGet.json */ /** * Sample code: Gets a managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .getWithResponse("Test1", "managedInstance", "managedDatabase", Context.NONE); + .getWithResponse("Test1", "managedInstance", "managedDatabase", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java index a76911d148892..027d7ac7cf7f3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabases ListByInstance. */ +/** + * Samples for ManagedDatabases ListByInstance. + */ public final class ManagedDatabasesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseListByManagedInstance.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseListByManagedInstance. + * json */ /** * Sample code: List databases by managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabasesByManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .listByInstance("Test1", "managedInstance", Context.NONE); + .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java index 852428c412c7a..c0dfe860ffbec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedDatabases ListInaccessibleByInstance. */ +/** + * Samples for ManagedDatabases ListInaccessibleByInstance. + */ public final class ManagedDatabasesListInaccessibleByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/InaccessibleManagedDatabaseListByManagedInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * InaccessibleManagedDatabaseListByManagedInstance.json */ /** * Sample code: List inaccessible managed databases by managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listInaccessibleManagedDatabasesByManagedInstances( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listInaccessibleManagedDatabasesByManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .listInaccessibleByInstance("testrg", "testcl", Context.NONE); + .listInaccessibleByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java index 757833d6a228b..62e2a39fa1dc5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java @@ -4,60 +4,53 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedDatabaseStartMoveDefinition; import com.azure.resourcemanager.sql.models.MoveOperationMode; -/** Samples for ManagedDatabases StartMove. */ +/** + * Samples for ManagedDatabases StartMove. + */ public final class ManagedDatabasesStartMoveSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseStartMoveMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseStartMoveMax.json */ /** * Sample code: Starts a managed database move with all optional parameters specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void startsAManagedDatabaseMoveWithAllOptionalParametersSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .startMove( - "group1", - "testInstanceSrc", - "testDatabase", - new ManagedDatabaseStartMoveDefinition() - .withDestinationManagedDatabaseId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase") + .startMove("group1", "testInstanceSrc", "testDatabase", + new ManagedDatabaseStartMoveDefinition().withDestinationManagedDatabaseId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase") .withOperationMode(MoveOperationMode.COPY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseStartMoveMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseStartMoveMin.json */ /** * Sample code: Starts a managed database move with no optional parameters specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void startsAManagedDatabaseMoveWithNoOptionalParametersSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .startMove( - "group1", - "testInstanceSrc", - "testDatabase", - new ManagedDatabaseStartMoveDefinition() - .withDestinationManagedDatabaseId( - "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - Context.NONE); + .startMove("group1", "testInstanceSrc", "testDatabase", + new ManagedDatabaseStartMoveDefinition().withDestinationManagedDatabaseId( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java index 8e51a15c69c43..dd5d8da47cd63 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java @@ -4,59 +4,55 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedDatabaseUpdate; import java.util.HashMap; import java.util.Map; -/** Samples for ManagedDatabases Update. */ +/** + * Samples for ManagedDatabases Update. + */ public final class ManagedDatabasesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseUpdateMax.json */ /** * Sample code: Updates a managed database with maximal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updatesAManagedDatabaseWithMaximalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updatesAManagedDatabaseWithMaximalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .update( - "Default-SQL-SouthEastAsia", - "managedInstance", - "testdb", - new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "TagValue1")), - Context.NONE); + .update("Default-SQL-SouthEastAsia", "managedInstance", "testdb", + new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedDatabaseUpdateMin.json */ /** * Sample code: Updates a managed database with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updatesAManagedDatabaseWithMinimalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updatesAManagedDatabaseWithMinimalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedDatabases() - .update( - "Default-SQL-SouthEastAsia", - "managedInstance", - "testdb", - new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "TagValue1")), - Context.NONE); + .update("Default-SQL-SouthEastAsia", "managedInstance", "testdb", + new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java index d947d5b6493e6..4240ce6ce4d68 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java @@ -4,63 +4,60 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorInner; import com.azure.resourcemanager.sql.models.AdministratorName; import com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorType; import java.util.UUID; -/** Samples for ManagedInstanceAdministrators CreateOrUpdate. */ +/** + * Samples for ManagedInstanceAdministrators CreateOrUpdate. + */ public final class ManagedInstanceAdministratorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorCreate. + * json */ /** * Sample code: Create administrator of managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAdministratorOfManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAdministrators() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - AdministratorName.ACTIVE_DIRECTORY, + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, new ManagedInstanceAdministratorInner() .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY) .withLogin("bob@contoso.com") .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000")) .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorUpdate. + * json */ /** * Sample code: Update administrator of managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAdministratorOfManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAdministrators() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - AdministratorName.ACTIVE_DIRECTORY, + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, new ManagedInstanceAdministratorInner() .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY) .withLogin("bob@contoso.com") .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000")) .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java index 73d8035b1f76a..82f11899ca324 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java @@ -4,25 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdministratorName; -/** Samples for ManagedInstanceAdministrators Delete. */ +/** + * Samples for ManagedInstanceAdministrators Delete. + */ public final class ManagedInstanceAdministratorsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorDelete. + * json */ /** * Sample code: Delete administrator of managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAdministratorOfManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAdministrators() - .delete("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, Context.NONE); + .delete("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java index d75b48fd5ad8e..21b9f6237f6b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdministratorName; -/** Samples for ManagedInstanceAdministrators Get. */ +/** + * Samples for ManagedInstanceAdministrators Get. + */ public final class ManagedInstanceAdministratorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorGet.json */ /** * Sample code: Get administrator of managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAdministratorOfManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAdministrators() - .getWithResponse( - "Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java index 6f2579f1552e9..e9d643956ab60 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceAdministrators ListByInstance. */ +/** + * Samples for ManagedInstanceAdministrators ListByInstance. + */ public final class ManagedInstanceAdministratorsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAdministratorListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceAdministratorListByInstance.json */ /** * Sample code: List administrators of managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listAdministratorsOfManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAdministrators() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", Context.NONE); + .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java index 8bafb5097b803..e7a2078db7d55 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java @@ -4,32 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthenticationInner; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ManagedInstanceAzureADOnlyAuthentications CreateOrUpdate. */ +/** + * Samples for ManagedInstanceAzureADOnlyAuthentications CreateOrUpdate. + */ public final class ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json */ /** * Sample code: Creates or updates Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAzureADOnlyAuthentications() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "managedInstance", - AuthenticationName.DEFAULT, + .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, new ManagedInstanceAzureADOnlyAuthenticationInner().withAzureADOnlyAuthentication(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java index c30a6eb1ddb2a..5e36cb8da3de2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java @@ -4,26 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ManagedInstanceAzureADOnlyAuthentications Delete. */ +/** + * Samples for ManagedInstanceAzureADOnlyAuthentications Delete. + */ public final class ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthDelete. + * json */ /** * Sample code: Deletes Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void deletesAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + deletesAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAzureADOnlyAuthentications() - .delete("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, Context.NONE); + .delete("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java index de4d0d85db319..deee70d578d96 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java @@ -4,26 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ManagedInstanceAzureADOnlyAuthentications Get. */ +/** + * Samples for ManagedInstanceAzureADOnlyAuthentications Get. + */ public final class ManagedInstanceAzureADOnlyAuthenticationsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthGet. + * json */ /** * Sample code: Gets a Azure Active Directory only authentication property. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAAzureActiveDirectoryOnlyAuthenticationProperty(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAzureADOnlyAuthentications() - .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java index a02bd3453e088..fcc8b8c3745fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceAzureADOnlyAuthentications ListByInstance. */ +/** + * Samples for ManagedInstanceAzureADOnlyAuthentications ListByInstance. + */ public final class ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceAzureADOnlyAuthListByInstance.json */ /** * Sample code: Gets a list of Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAListOfAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceAzureADOnlyAuthentications() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", Context.NONE); + .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java index b4ca77e758af1..42b59a2923757 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java @@ -4,60 +4,53 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; import com.azure.resourcemanager.sql.models.ServerKeyType; -/** Samples for ManagedInstanceEncryptionProtectors CreateOrUpdate. */ +/** + * Samples for ManagedInstanceEncryptionProtectors CreateOrUpdate. + */ public final class ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json */ /** * Sample code: Update the encryption protector to key vault. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheEncryptionProtectorToKeyVault(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceEncryptionProtectors() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - EncryptionProtectorName.CURRENT, - new ManagedInstanceEncryptionProtectorInner() - .withServerKeyName("fakeTokenPlaceholder") + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + new ManagedInstanceEncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) .withAutoRotationEnabled(false), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json */ /** * Sample code: Update the encryption protector to service managed. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateTheEncryptionProtectorToServiceManaged( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateTheEncryptionProtectorToServiceManaged(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceEncryptionProtectors() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - EncryptionProtectorName.CURRENT, - new ManagedInstanceEncryptionProtectorInner() - .withServerKeyName("fakeTokenPlaceholder") + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + new ManagedInstanceEncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") .withServerKeyType(ServerKeyType.SERVICE_MANAGED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java index 19aee82e0237a..51f5a0f17b593 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java @@ -4,25 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -/** Samples for ManagedInstanceEncryptionProtectors Get. */ +/** + * Samples for ManagedInstanceEncryptionProtectors Get. + */ public final class ManagedInstanceEncryptionProtectorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorGet + * .json */ /** * Sample code: Get the encryption protector. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheEncryptionProtector(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceEncryptionProtectors() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java index 448cb971e720b..443a041b92e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceEncryptionProtectors ListByInstance. */ +/** + * Samples for ManagedInstanceEncryptionProtectors ListByInstance. + */ public final class ManagedInstanceEncryptionProtectorsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorList.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceEncryptionProtectorList.json */ /** * Sample code: List encryption protectors by managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listEncryptionProtectorsByManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceEncryptionProtectors() - .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java index c35a27950bb3f..e71c92dda8ea3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -/** Samples for ManagedInstanceEncryptionProtectors Revalidate. */ +/** + * Samples for ManagedInstanceEncryptionProtectors Revalidate. + */ public final class ManagedInstanceEncryptionProtectorsRevalidateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceEncryptionProtectorRevalidate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceEncryptionProtectorRevalidate.json */ /** * Sample code: Revalidates the encryption protector. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceEncryptionProtectors() - .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, Context.NONE); + .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java index b479582ebfb6b..258cf8e3dd930 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyInner; import com.azure.resourcemanager.sql.models.ServerKeyType; -/** Samples for ManagedInstanceKeys CreateOrUpdate. */ +/** + * Samples for ManagedInstanceKeys CreateOrUpdate. + */ public final class ManagedInstanceKeysCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyCreateOrUpdate.json */ /** * Sample code: Creates or updates a managed instance key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesAManagedInstanceKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceKeys() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", - new ManagedInstanceKeyInner() - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) + new ManagedInstanceKeyInner().withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java index d4b7bea5f736d..291d33498d36d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java @@ -4,28 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceKeys Delete. */ +/** + * Samples for ManagedInstanceKeys Delete. + */ public final class ManagedInstanceKeysDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyDelete.json */ /** * Sample code: Delete the managed instance key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheManagedInstanceKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceKeys() - .delete( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - Context.NONE); + .delete("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java index 07c73d9f71d56..3d2ada9e97940 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java @@ -4,28 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceKeys Get. */ +/** + * Samples for ManagedInstanceKeys Get. + */ public final class ManagedInstanceKeysGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyGet.json */ /** * Sample code: Get the managed instance key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheManagedInstanceKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceKeys() - .getWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", + "someVault_someKey_01234567890123456789012345678901", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java index 4cd324628587d..0350a8f4743d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceKeys ListByInstance. */ +/** + * Samples for ManagedInstanceKeys ListByInstance. + */ public final class ManagedInstanceKeysListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceKeyList.json */ /** * Sample code: List the keys for a managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheKeysForAManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceKeys() - .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE); + .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java index ccd0768887214..d89538ba0ee84 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java @@ -4,37 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; -/** Samples for ManagedInstanceLongTermRetentionPolicies CreateOrUpdate. */ +/** + * Samples for ManagedInstanceLongTermRetentionPolicies CreateOrUpdate. + */ public final class ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json */ /** * Sample code: Create or update the LTR policy for the managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createOrUpdateTheLTRPolicyForTheManagedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createOrUpdateTheLTRPolicyForTheManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceLongTermRetentionPolicies() - .createOrUpdate( - "testResourceGroup", - "testInstance", - "testDatabase", + .createOrUpdate("testResourceGroup", "testInstance", "testDatabase", ManagedInstanceLongTermRetentionPolicyName.DEFAULT, - new ManagedInstanceLongTermRetentionPolicyInner() - .withWeeklyRetention("P1M") + new ManagedInstanceLongTermRetentionPolicyInner().withWeeklyRetention("P1M") .withMonthlyRetention("P1Y") .withYearlyRetention("P5Y") .withWeekOfYear(5), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java index 228e26a62b1a1..8d6f6f1529fbb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; -/** Samples for ManagedInstanceLongTermRetentionPolicies Get. */ +/** + * Samples for ManagedInstanceLongTermRetentionPolicies Get. + */ public final class ManagedInstanceLongTermRetentionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionPolicyGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionPolicyGet.json */ /** * Sample code: Get the long term retention policy for the managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheLongTermRetentionPolicyForTheManagedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheLongTermRetentionPolicyForTheManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceLongTermRetentionPolicies() - .getWithResponse( - "testResourceGroup", - "testInstance", - "testDatabase", - ManagedInstanceLongTermRetentionPolicyName.DEFAULT, - Context.NONE); + .getWithResponse("testResourceGroup", "testInstance", "testDatabase", + ManagedInstanceLongTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java index 47fef6386d206..8f69ae58985e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceLongTermRetentionPolicies ListByDatabase. */ +/** + * Samples for ManagedInstanceLongTermRetentionPolicies ListByDatabase. + */ public final class ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceLongTermRetentionPolicyListByDatabase.json */ /** * Sample code: Get the long term retention policies for the managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheLongTermRetentionPoliciesForTheManagedDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheLongTermRetentionPoliciesForTheManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceLongTermRetentionPolicies() - .listByDatabase("testResourceGroup", "testInstance", "testDatabase", Context.NONE); + .listByDatabase("testResourceGroup", "testInstance", "testDatabase", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java index 566e964295c66..8e48013bd0f43 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for ManagedInstanceOperations Cancel. */ +/** + * Samples for ManagedInstanceOperations Cancel. + */ public final class ManagedInstanceOperationsCancelSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelManagedInstanceOperation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CancelManagedInstanceOperation.json */ /** * Sample code: Cancel the managed instance management operation. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void cancelTheManagedInstanceManagementOperation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + cancelTheManagedInstanceManagementOperation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceOperations() - .cancelWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - UUID.fromString("11111111-1111-1111-1111-111111111111"), - Context.NONE); + .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", + UUID.fromString("11111111-1111-1111-1111-111111111111"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java index 89cdc0c75cfac..474492addd382 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java @@ -4,29 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import java.util.UUID; -/** Samples for ManagedInstanceOperations Get. */ +/** + * Samples for ManagedInstanceOperations Get. + */ public final class ManagedInstanceOperationsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetManagedInstanceOperation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetManagedInstanceOperation.json */ /** * Sample code: Gets the managed instance management operation. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheManagedInstanceManagementOperation(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceOperations() - .getWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - UUID.fromString("00000000-1111-2222-3333-444444444444"), - Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", + UUID.fromString("00000000-1111-2222-3333-444444444444"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java index 195d98ef9dde9..2150f21ad457b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceOperations ListByManagedInstance. */ +/** + * Samples for ManagedInstanceOperations ListByManagedInstance. + */ public final class ManagedInstanceOperationsListByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListManagedInstanceOperations.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListManagedInstanceOperations.json */ /** * Sample code: List the managed instance management operations. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listTheManagedInstanceManagementOperations( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listTheManagedInstanceManagementOperations(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceOperations() - .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java index 979bfa796d3e5..336f3410ebde1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -4,36 +4,32 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionInner; import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty; -/** Samples for ManagedInstancePrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for ManagedInstancePrivateEndpointConnections CreateOrUpdate. + */ public final class ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateEndpointConnectionUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + approveOrRejectAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateEndpointConnections() - .createOrUpdate( - "Default", - "test-cl", - "private-endpoint-connection-name", - new ManagedInstancePrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new ManagedInstancePrivateLinkServiceConnectionStateProperty() - .withStatus("Approved") - .withDescription("Approved by johndoe@contoso.com")), - Context.NONE); + .createOrUpdate("Default", "test-cl", "private-endpoint-connection-name", + new ManagedInstancePrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( + new ManagedInstancePrivateLinkServiceConnectionStateProperty().withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java index ae138e055fa74..ec4b7f1a32ec1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstancePrivateEndpointConnections Delete. */ +/** + * Samples for ManagedInstancePrivateEndpointConnections Delete. + */ public final class ManagedInstancePrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateEndpointConnectionDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + deletesAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateEndpointConnections() - .delete("Default", "test-cl", "private-endpoint-connection-name", Context.NONE); + .delete("Default", "test-cl", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java index 96822322c944d..58f243bc7ad7a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstancePrivateEndpointConnections Get. */ +/** + * Samples for ManagedInstancePrivateEndpointConnections Get. + */ public final class ManagedInstancePrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateEndpointConnectionGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateEndpointConnectionGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsPrivateEndpointConnection(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateEndpointConnections() - .getWithResponse("Default", "test-cl", "private-endpoint-connection-name", Context.NONE); + .getWithResponse("Default", "test-cl", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java index 7b1b9d623bf9b..ecd2b1d393bf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstancePrivateEndpointConnections ListByManagedInstance. */ +/** + * Samples for ManagedInstancePrivateEndpointConnections ListByManagedInstance. + */ public final class ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateEndpointConnectionList.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateEndpointConnectionList.json */ /** * Sample code: Gets list of private endpoint connections on a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsListOfPrivateEndpointConnectionsOnAServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateEndpointConnections() - .listByManagedInstance("Default", "test-cl", Context.NONE); + .listByManagedInstance("Default", "test-cl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java index 76a022945492b..b4129cb7d7b75 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstancePrivateLinkResources Get. */ +/** + * Samples for ManagedInstancePrivateLinkResources Get. + */ public final class ManagedInstancePrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateLinkResourcesGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for SQL. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateLinkResources() - .getWithResponse("Default", "test-cl", "plr", Context.NONE); + .getWithResponse("Default", "test-cl", "plr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java index 1d9acc9b73788..21f0d3e4fb366 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstancePrivateLinkResources ListByManagedInstance. */ +/** + * Samples for ManagedInstancePrivateLinkResources ListByManagedInstance. + */ public final class ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstancePrivateLinkResourcesList.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstancePrivateLinkResourcesList.json */ /** * Sample code: Gets private link resources for SQL. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstancePrivateLinkResources() - .listByManagedInstance("Default", "test-cl", Context.NONE); + .listByManagedInstance("Default", "test-cl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java index 23480d5be2d36..3bcf073d36b40 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.TdeCertificate; -/** Samples for ManagedInstanceTdeCertificates Create. */ +/** + * Samples for ManagedInstanceTdeCertificates Create. + */ public final class ManagedInstanceTdeCertificatesCreateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTdeCertificate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTdeCertificate.json */ /** * Sample code: Upload a TDE certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void uploadATDECertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceTdeCertificates() - .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), Context.NONE); + .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java index 04c480f59ff1e..ec5490d223acd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java @@ -4,96 +4,89 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; -/** Samples for ManagedInstanceVulnerabilityAssessments CreateOrUpdate. */ +/** + * Samples for ManagedInstanceVulnerabilityAssessments CreateOrUpdate. + */ public final class ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json */ /** * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when * storageAccountAccessKey is specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ManagedInstanceVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json */ /** * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when * storageContainerSasKey is specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ManagedInstanceVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentCreateMax.json */ /** * Sample code: Create a managed instance's vulnerability assessment with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAManagedInstanceSVulnerabilityAssessmentWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ManagedInstanceVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder") .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - Context.NONE); + .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) + .withEmailSubscriptionAdmins(true) + .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java index 9edc62b098de2..f868ee3ad8a9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedInstanceVulnerabilityAssessments Delete. */ +/** + * Samples for ManagedInstanceVulnerabilityAssessments Delete. + */ public final class ManagedInstanceVulnerabilityAssessmentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentDelete.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentDelete.json */ /** * Sample code: Remove a managed instance's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void removeAManagedInstanceSVulnerabilityAssessment( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + removeAManagedInstanceSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java index 2981c3f17c42e..5494e05c92266 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ManagedInstanceVulnerabilityAssessments Get. */ +/** + * Samples for ManagedInstanceVulnerabilityAssessments Get. + */ public final class ManagedInstanceVulnerabilityAssessmentsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentGet.json */ /** * Sample code: Get a managed instance's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAManagedInstanceSVulnerabilityAssessment( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAManagedInstanceSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java index d92c2875132ef..fbc7397ced830 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstanceVulnerabilityAssessments ListByInstance. */ +/** + * Samples for ManagedInstanceVulnerabilityAssessments ListByInstance. + */ public final class ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceVulnerabilityAssessmentListByInstance.json */ /** * Sample code: Get a managed instance's vulnerability assessment policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAManagedInstanceSVulnerabilityAssessmentPolicies( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAManagedInstanceSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstanceVulnerabilityAssessments() - .listByInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", Context.NONE); + .listByInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java index 2c676dc30ca16..fcef8c1e9309a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; @@ -18,90 +17,82 @@ import java.util.Map; import java.util.UUID; -/** Samples for ManagedInstances CreateOrUpdate. */ +/** + * Samples for ManagedInstances CreateOrUpdate. + */ public final class ManagedInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceCreateMin.json */ /** * Sample code: Create managed instance with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createManagedInstanceWithMinimalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createManagedInstanceWithMinimalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .createOrUpdate( - "testrg", - "testinstance", - new ManagedInstanceInner() - .withLocation("Japan East") - .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withSubnetId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) - .withVCores(8) - .withStorageSizeInGB(1024), - Context.NONE); + .createOrUpdate("testrg", "testinstance", new ManagedInstanceInner().withLocation("Japan East") + .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose")) + .withAdministratorLogin("dummylogin") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withSubnetId( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) + .withVCores(8) + .withStorageSizeInGB(1024), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceCreateMax.json */ /** * Sample code: Create managed instance with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createManagedInstanceWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .createOrUpdate( - "testrg", - "testinstance", - new ManagedInstanceInner() - .withLocation("Japan East") - .withTags(mapOf("tagKey1", "TagValue1")) - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withSubnetId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) - .withVCores(8) - .withStorageSizeInGB(1024) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withDnsZonePartner( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance") - .withPublicDataEndpointEnabled(false) - .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) - .withTimezoneId("UTC") - .withInstancePoolId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1") - .withMaintenanceConfigurationId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") - .withMinimalTlsVersion("1.2") - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO) - .withAdministrators( - new ManagedInstanceExternalAdministrator() - .withPrincipalType(PrincipalType.USER) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withAzureADOnlyAuthentication(true)) - .withServicePrincipal(new ServicePrincipal().withType(ServicePrincipalType.SYSTEM_ASSIGNED)), - Context.NONE); + .createOrUpdate("testrg", "testinstance", new ManagedInstanceInner().withLocation("Japan East") + .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")) + .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose")) + .withAdministratorLogin("dummylogin") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withSubnetId( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) + .withVCores(8) + .withStorageSizeInGB(1024) + .withCollation("SQL_Latin1_General_CP1_CI_AS") + .withDnsZonePartner( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance") + .withPublicDataEndpointEnabled(false) + .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) + .withTimezoneId("UTC") + .withInstancePoolId( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1") + .withMaintenanceConfigurationId( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") + .withMinimalTlsVersion("1.2") + .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO) + .withAdministrators(new ManagedInstanceExternalAdministrator().withPrincipalType(PrincipalType.USER) + .withLogin("bob@contoso.com") + .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) + .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) + .withAzureADOnlyAuthentication(true)) + .withServicePrincipal(new ServicePrincipal().withType(ServicePrincipalType.SYSTEM_ASSIGNED)), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java index 508ebf44bc721..271176c1a2a54 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances Delete. */ +/** + * Samples for ManagedInstances Delete. + */ public final class ManagedInstancesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceDelete.json */ /** * Sample code: Delete managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .delete("testrg", "testinstance", Context.NONE); + .delete("testrg", "testinstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java index b8f557f8e9f03..e6d8c500ad003 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ReplicaType; -/** Samples for ManagedInstances Failover. */ +/** + * Samples for ManagedInstances Failover. + */ public final class ManagedInstancesFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverManagedInstance.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverManagedInstance.json */ /** * Sample code: Failover a managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void failoverAManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .failover("group1", "instanceName", ReplicaType.PRIMARY, Context.NONE); + .failover("group1", "instanceName", ReplicaType.PRIMARY, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java index a33eba69a1869..69d973859ee92 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java @@ -4,42 +4,42 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances GetByResourceGroup. */ +/** + * Samples for ManagedInstances GetByResourceGroup. + */ public final class ManagedInstancesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceGetWithExpandEqualsAdministrators.json */ /** * Sample code: Get managed instance with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedInstanceWithExpandAdministratorsActivedirectory( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE); + .getByResourceGroupWithResponse("testrg", "testinstance", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceGet.json */ /** * Sample code: Get managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .getByResourceGroupWithResponse("testrg", "testinstance", null, Context.NONE); + .getByResourceGroupWithResponse("testrg", "testinstance", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java index a4f4fc363d175..88750feb18d31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java @@ -4,42 +4,43 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances ListByInstancePool. */ +/** + * Samples for ManagedInstances ListByInstancePool. + */ public final class ManagedInstancesListByInstancePoolSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByInstancePool.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByInstancePool. + * json */ /** * Sample code: List managed instances by instance pool. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstancesByInstancePool(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByInstancePool("Test1", "pool1", null, Context.NONE); + .listByInstancePool("Test1", "pool1", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json */ /** * Sample code: List managed instances by instance pool with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByInstancePool("Test1", "pool1", null, Context.NONE); + .listByInstancePool("Test1", "pool1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java index 52ee7d93240db..aa514869bb5f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java @@ -4,84 +4,67 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.MetricType; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; -/** Samples for ManagedInstances ListByManagedInstance. */ +/** + * Samples for ManagedInstances ListByManagedInstance. + */ public final class ManagedInstancesListByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesList.json */ /** * Sample code: Obtain list of instance's top resource consuming queries. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void obtainListOfInstanceSTopResourceConsumingQueries( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + obtainListOfInstanceSTopResourceConsumingQueries(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByManagedInstance( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - null, - null, - null, - null, - QueryTimeGrainType.PT1H, - null, - MetricType.DURATION, - Context.NONE); + .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, + QueryTimeGrainType.PT1H, null, MetricType.DURATION, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesListMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesListMax.json */ /** * Sample code: Obtain list of instance's top resource consuming queries. Full-blown request and response. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainListOfInstanceSTopResourceConsumingQueriesFullBlownRequestAndResponse( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByManagedInstance( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - null, - "db1,db2", - "2020-03-10T12:00:00Z", - "2020-03-12T12:00:00Z", - QueryTimeGrainType.P1D, - null, - MetricType.CPU, - Context.NONE); + .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, "db1,db2", "2020-03-10T12:00:00Z", + "2020-03-12T12:00:00Z", QueryTimeGrainType.P1D, null, MetricType.CPU, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesListMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTopQueriesListMin.json */ /** * Sample code: Obtain list of instance's top resource consuming queries. Minimal request and response. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void obtainListOfInstanceSTopResourceConsumingQueriesMinimalRequestAndResponse( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByManagedInstance( - "sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, null, null, null, Context.NONE); + .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java index ec6f19773acb2..7030e3a7b60d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java @@ -4,42 +4,43 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances ListByResourceGroup. */ +/** + * Samples for ManagedInstances ListByResourceGroup. + */ public final class ManagedInstancesListByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json */ /** * Sample code: List managed instances by resource group with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByResourceGroup("Test1", null, Context.NONE); + .listByResourceGroup("Test1", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByResourceGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListByResourceGroup. + * json */ /** * Sample code: List managed instances by resource group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstancesByResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listByResourceGroup("Test1", null, Context.NONE); + .listByResourceGroup("Test1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java index b9ddbe4e0105d..853ef683c2164 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances ListOutboundNetworkDependenciesByManagedInstance. */ +/** + * Samples for ManagedInstances ListOutboundNetworkDependenciesByManagedInstance. + */ public final class ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListOutboundNetworkDependenciesByManagedInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ListOutboundNetworkDependenciesByManagedInstance.json */ /** * Sample code: Gets the collection of outbound network dependencies for the given managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheCollectionOfOutboundNetworkDependenciesForTheGivenManagedInstance( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .listOutboundNetworkDependenciesByManagedInstance("sqlcrudtest-7398", "testinstance", Context.NONE); + .listOutboundNetworkDependenciesByManagedInstance("sqlcrudtest-7398", "testinstance", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java index 2c24afd2d56a3..3073169b286f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java @@ -4,32 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedInstances List. */ +/** + * Samples for ManagedInstances List. + */ public final class ManagedInstancesListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceList.json */ /** * Sample code: List managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getManagedInstances().list(null, Context.NONE); + azure.sqlServers().manager().serviceClient().getManagedInstances().list(null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceListWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceListWithExpandEqualsAdministrators.json */ /** * Sample code: List managed instances with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstancesWithExpandAdministratorsActivedirectory( com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getManagedInstances().list(null, Context.NONE); + azure.sqlServers().manager().serviceClient().getManagedInstances().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java index 9631510b470ab..f9b9404521841 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; @@ -13,89 +12,82 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ManagedInstances Update. */ +/** + * Samples for ManagedInstances Update. + */ public final class ManagedInstancesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceUpdateMin.json */ /** * Sample code: Update managed instance with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateManagedInstanceWithMinimalProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateManagedInstanceWithMinimalProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .update( - "testrg", - "testinstance", - new ManagedInstanceUpdate().withTags(mapOf("tagKey1", "TagValue1")), - Context.NONE); + .update("testrg", "testinstance", + new ManagedInstanceUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceUpdateMax.json */ /** * Sample code: Update managed instance with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateManagedInstanceWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .update( - "testrg", - "testinstance", - new ManagedInstanceUpdate() - .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose").withCapacity(8)) - .withTags(mapOf("tagKey1", "TagValue1")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withLicenseType(ManagedInstanceLicenseType.BASE_PRICE) - .withVCores(8) - .withStorageSizeInGB(448) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withPublicDataEndpointEnabled(false) - .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) - .withMaintenanceConfigurationId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") - .withMinimalTlsVersion("1.2") - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), - Context.NONE); + .update("testrg", "testinstance", new ManagedInstanceUpdate() + .withSku(new Sku().withName("GP_Gen4").withTier("GeneralPurpose").withCapacity(8)) + .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")) + .withAdministratorLogin("dummylogin") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withLicenseType(ManagedInstanceLicenseType.BASE_PRICE) + .withVCores(8) + .withStorageSizeInGB(448) + .withCollation("SQL_Latin1_General_CP1_CI_AS") + .withPublicDataEndpointEnabled(false) + .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) + .withMaintenanceConfigurationId( + "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") + .withMinimalTlsVersion("1.2") + .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceRemoveMaintenanceConfiguration.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedInstanceRemoveMaintenanceConfiguration.json */ /** * Sample code: Remove maintenance policy from managed instance (select default maintenance policy). - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void removeMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedInstances() - .update( - "testrg", - "testinstance", - new ManagedInstanceUpdate() - .withMaintenanceConfigurationId( - "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - Context.NONE); + .update("testrg", "testinstance", new ManagedInstanceUpdate().withMaintenanceConfigurationId( + "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java index e8b4234678c8e..794b00d11ad8a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies CreateOrUpdate. */ +/** + * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies CreateOrUpdate. + */ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * UpdateManagedShortTermRetentionPolicyRestorableDropped.json */ /** * Sample code: Update the short term retention policy for the restorable dropped database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .createOrUpdate( - "resourceGroup", - "testsvr", - "testdb,131403269876900000", + .createOrUpdate("resourceGroup", "testsvr", "testdb,131403269876900000", ManagedShortTermRetentionPolicyName.DEFAULT, new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java index 68c89ae1fec2d..a2c3c1792d6d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Get. */ +/** + * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Get. + */ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * GetManagedShortTermRetentionPolicyRestorableDropped.json */ /** * Sample code: Get the short term retention policy for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .getWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb,131403269876900000", - ManagedShortTermRetentionPolicyName.DEFAULT, - Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", + ManagedShortTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java index e195e1e6b56a6..80101d04a9bf4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies ListByRestorableDroppedDatabase. */ +/** + * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies ListByRestorableDroppedDatabase. + */ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * GetListManagedShortTermRetentionPolicyRestorableDropped.json */ /** * Sample code: Get the short term retention policy list for the database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheShortTermRetentionPolicyListForTheDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheShortTermRetentionPolicyListForTheDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .listByRestorableDroppedDatabase( - "Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", Context.NONE); + .listByRestorableDroppedDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java index 4ca418473566b..e4c3dc55e59c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; -/** Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Update. */ +/** + * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Update. + */ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * UpdateManagedShortTermRetentionPolicyRestorableDropped.json */ /** * Sample code: Update the short term retention policy for the restorable dropped database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .update( - "resourceGroup", - "testsvr", - "testdb,131403269876900000", + .update("resourceGroup", "testsvr", "testdb,131403269876900000", ManagedShortTermRetentionPolicyName.DEFAULT, new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java index e8be0229943e9..e81a6295a3833 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java @@ -4,32 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasAcquisition; -/** Samples for ManagedServerDnsAliases Acquire. */ +/** + * Samples for ManagedServerDnsAliases Acquire. + */ public final class ManagedServerDnsAliasesAcquireSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasAcquire.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasAcquire.json */ /** * Sample code: Acquire managed server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void acquireManagedServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerDnsAliases() - .acquire( - "Default", - "new-mi", - "dns-alias-mi", - new ManagedServerDnsAliasAcquisition() - .withOldManagedServerDnsAliasResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/old-mi/dnsAliases/alias1"), - Context.NONE); + .acquire("Default", "new-mi", "dns-alias-mi", + new ManagedServerDnsAliasAcquisition().withOldManagedServerDnsAliasResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/old-mi/dnsAliases/alias1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java index 45723c8bdc3bd..068208e868f15 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java @@ -4,25 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasCreation; -/** Samples for ManagedServerDnsAliases CreateOrUpdate. */ +/** + * Samples for ManagedServerDnsAliases CreateOrUpdate. + */ public final class ManagedServerDnsAliasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasCreateOrUpdate. + * json */ /** * Sample code: Create managed server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createManagedServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerDnsAliases() - .createOrUpdate("Default", "dns-mi", "dns-alias-mi", new ManagedServerDnsAliasCreation(), Context.NONE); + .createOrUpdate("Default", "dns-mi", "dns-alias-mi", new ManagedServerDnsAliasCreation(), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java index d3281eb6c3bf0..71ad1db62c352 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedServerDnsAliases Delete. */ +/** + * Samples for ManagedServerDnsAliases Delete. + */ public final class ManagedServerDnsAliasesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasDelete.json */ /** * Sample code: Delete managed server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteManagedServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerDnsAliases() - .delete("Default", "dns-mi", "dns-alias-mi", Context.NONE); + .delete("Default", "dns-mi", "dns-alias-mi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java index 4b0d9b0c2491a..245d5cc9a1e73 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedServerDnsAliases Get. */ +/** + * Samples for ManagedServerDnsAliases Get. + */ public final class ManagedServerDnsAliasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasGet.json */ /** * Sample code: Get managed server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerDnsAliases() - .getWithResponse("Default", "dns-mi", "dns-alias-mi", Context.NONE); + .getWithResponse("Default", "dns-mi", "dns-alias-mi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java index a5a9f0ae4c222..384f85a2d8187 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedServerDnsAliases ListByManagedInstance. */ +/** + * Samples for ManagedServerDnsAliases ListByManagedInstance. + */ public final class ManagedServerDnsAliasesListByManagedInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerDnsAliasList.json */ /** * Sample code: List managed server DNS aliases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedServerDNSAliases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerDnsAliases() - .listByManagedInstance("Default", "dns-mi", Context.NONE); + .listByManagedInstance("Default", "dns-mi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java index 525ecf2b91c61..d0b30ececc19e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java @@ -4,64 +4,60 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; import java.util.Arrays; -/** Samples for ManagedServerSecurityAlertPolicies CreateOrUpdate. */ +/** + * Samples for ManagedServerSecurityAlertPolicies CreateOrUpdate. + */ public final class ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertCreateMin. + * json */ /** * Sample code: Update a managed server's threat detection policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAManagedServerSThreatDetectionPolicyWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerSecurityAlertPolicies() - .createOrUpdate( - "securityalert-4799", - "securityalert-6440", - SecurityAlertPolicyNameAutoGenerated.DEFAULT, + .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, new ManagedServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertCreateMax. + * json */ /** * Sample code: Update a managed server's threat detection policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAManagedServerSThreatDetectionPolicyWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerSecurityAlertPolicies() - .createOrUpdate( - "securityalert-4799", - "securityalert-6440", - SecurityAlertPolicyNameAutoGenerated.DEFAULT, - new ManagedServerSecurityAlertPolicyInner() - .withState(SecurityAlertPolicyState.ENABLED) + .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, + new ManagedServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) .withEmailAccountAdmins(true) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withRetentionDays(5), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java index c87aa9affb2c5..d96cea9d69e5b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; -/** Samples for ManagedServerSecurityAlertPolicies Get. */ +/** + * Samples for ManagedServerSecurityAlertPolicies Get. + */ public final class ManagedServerSecurityAlertPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertGet.json */ /** * Sample code: Get a managed server's threat detection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAManagedServerSThreatDetectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getManagedServerSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE); + .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java index 0f1a8a970e1fc..1eedd633a8883 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ManagedServerSecurityAlertPolicies ListByInstance. */ +/** + * Samples for ManagedServerSecurityAlertPolicies ListByInstance. + */ public final class ManagedServerSecurityAlertPoliciesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedServerSecurityAlertListByInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ManagedServerSecurityAlertListByInstance.json */ /** * Sample code: Get the managed server's threat detection policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheManagedServerSThreatDetectionPolicies( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheManagedServerSThreatDetectionPolicies(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getManagedServerSecurityAlertPolicies() - .listByInstance("securityalert-4799", "securityalert-6440", Context.NONE); + .listByInstance("securityalert-4799", "securityalert-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java index d36072c244ed8..f2ad118bfbea3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListOperations.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListOperations.json */ /** * Sample code: Lists all of the available SQL Rest API operations. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listsAllOfTheAvailableSQLRestAPIOperations( - com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getOperations().list(Context.NONE); + public static void + listsAllOfTheAvailableSQLRestAPIOperations(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers().manager().serviceClient().getOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java index c70984c01ec66..a013072fd1e6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for OutboundFirewallRules CreateOrUpdate. */ +/** + * Samples for OutboundFirewallRules CreateOrUpdate. + */ public final class OutboundFirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleCreate.json */ /** * Sample code: Approve or reject a outbound firewall rule with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void approveOrRejectAOutboundFirewallRuleWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + approveOrRejectAOutboundFirewallRuleWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getOutboundFirewallRules() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", Context.NONE); + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java index 5f15221a81142..8add29551d360 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for OutboundFirewallRules Delete. */ +/** + * Samples for OutboundFirewallRules Delete. + */ public final class OutboundFirewallRulesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleDelete.json */ /** * Sample code: Deletes a outbound firewall rule with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void deletesAOutboundFirewallRuleWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + deletesAOutboundFirewallRuleWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getOutboundFirewallRules() - .delete("sqlcrudtest-7398", "sqlcrudtest-6661", "server.database.windows.net", Context.NONE); + .delete("sqlcrudtest-7398", "sqlcrudtest-6661", "server.database.windows.net", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java index 57d87293c9caa..00e8cd87f5cb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for OutboundFirewallRules Get. */ +/** + * Samples for OutboundFirewallRules Get. + */ public final class OutboundFirewallRulesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleGet.json */ /** * Sample code: Gets outbound firewall rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsOutboundFirewallRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getOutboundFirewallRules() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java index 39ed7ae979f90..52e7f8616762f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for OutboundFirewallRules ListByServer. */ +/** + * Samples for OutboundFirewallRules ListByServer. + */ public final class OutboundFirewallRulesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/OutboundFirewallRuleList.json */ /** * Sample code: Gets list of outbound firewall rules on a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsListOfOutboundFirewallRulesOnAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getOutboundFirewallRules() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index b525edbf32c0b..40426d91fbc3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -4,37 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateProperty; import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateStatus; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + approveOrRejectAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getPrivateEndpointConnections() - .createOrUpdate( - "Default", - "test-svr", - "private-endpoint-connection-name", + .createOrUpdate("Default", "test-svr", "private-endpoint-connection-name", new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus(PrivateLinkServiceConnectionStateStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com")), - Context.NONE); + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionStateProperty() + .withStatus(PrivateLinkServiceConnectionStateStatus.APPROVED) + .withDescription("Approved by johndoe@contoso.com")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java index 13295b00c1973..0ef49c9fcf2b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ +/** + * Samples for PrivateEndpointConnections Delete. + */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + deletesAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getPrivateEndpointConnections() - .delete("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + .delete("Default", "test-svr", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java index 5d96900c96dea..832307aa2b290 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ +/** + * Samples for PrivateEndpointConnections Get. + */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsPrivateEndpointConnection(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getPrivateEndpointConnections() - .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java index 80cc557a1ae6a..0343f7c9874b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections ListByServer. */ +/** + * Samples for PrivateEndpointConnections ListByServer. + */ public final class PrivateEndpointConnectionsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateEndpointConnectionList.json */ /** * Sample code: Gets list of private endpoint connections on a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsListOfPrivateEndpointConnectionsOnAServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getPrivateEndpointConnections() - .listByServer("Default", "test-svr", Context.NONE); + .listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java index 52ad91cfb8216..8443cbe7f692d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ +/** + * Samples for PrivateLinkResources Get. + */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateLinkResourcesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for SQL. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getPrivateLinkResources() - .getWithResponse("Default", "test-svr", "plr", Context.NONE); + .getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java index 8135dfbc6a281..89ec408be7dc0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources ListByServer. */ +/** + * Samples for PrivateLinkResources ListByServer. + */ public final class PrivateLinkResourcesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/PrivateLinkResourcesList.json */ /** * Sample code: Gets private link resources for SQL. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getPrivateLinkResources() - .listByServer("Default", "test-svr", Context.NONE); + .listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java index bb92a07acc22e..9a49e7d338ad7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java @@ -4,52 +4,45 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdate; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind; import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; import java.util.Arrays; -/** Samples for RecommendedSensitivityLabels Update. */ +/** + * Samples for RecommendedSensitivityLabels Update. + */ public final class RecommendedSensitivityLabelsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsRecommendedUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsRecommendedUpdate. + * json */ /** * Sample code: Update recommended sensitivity labels of a given database using an operations batch. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRecommendedSensitivityLabels() - .updateWithResponse( - "myRG", - "myServer", - "myDatabase", - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column3"))), - Context.NONE); + .updateWithResponse("myRG", "myServer", "myDatabase", + new RecommendedSensitivityLabelUpdateList().withOperations(Arrays.asList( + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) + .withSchema("dbo") + .withTable("table1") + .withColumn("column1"), + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) + .withSchema("dbo") + .withTable("table2") + .withColumn("column2"), + new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) + .withSchema("dbo") + .withTable("table1") + .withColumn("column3"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java index afe4da71c65d3..d1d8f2d8f4293 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java @@ -4,28 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RecoverableDatabases Get. */ +/** + * Samples for RecoverableDatabases Get. + */ public final class RecoverableDatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecoverableDatabaseGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecoverableDatabaseGet.json */ /** * Sample code: Get a recoverable database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getARecoverableDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRecoverableDatabases() - .getWithResponse( - "recoverabledatabasetest-6852", - "recoverabledatabasetest-2080", - "recoverabledatabasetest-9187", - Context.NONE); + .getWithResponse("recoverabledatabasetest-6852", "recoverabledatabasetest-2080", + "recoverabledatabasetest-9187", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java index 5c698320c16b5..f24c6eb9b6e06 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RecoverableDatabases ListByServer. */ +/** + * Samples for RecoverableDatabases ListByServer. + */ public final class RecoverableDatabasesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecoverableDatabaseList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecoverableDatabaseList.json */ /** * Sample code: Get list of recoverable databases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getListOfRecoverableDatabases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRecoverableDatabases() - .listByServer("recoverabledatabasetest-1234", "recoverabledatabasetest-7177", Context.NONE); + .listByServer("recoverabledatabasetest-1234", "recoverabledatabasetest-7177", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java index 8f8a31f2d6410..bac76127ed168 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RecoverableManagedDatabases Get. */ +/** + * Samples for RecoverableManagedDatabases Get. + */ public final class RecoverableManagedDatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRecoverableManagedDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRecoverableManagedDatabase.json */ /** * Sample code: Gets a recoverable databases by managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsARecoverableDatabasesByManagedInstances( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsARecoverableDatabasesByManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getRecoverableManagedDatabases() - .getWithResponse("Test1", "managedInstance", "testdb", Context.NONE); + .getWithResponse("Test1", "managedInstance", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java index f4f9f53406af8..53caeaead7c0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RecoverableManagedDatabases ListByInstance. */ +/** + * Samples for RecoverableManagedDatabases ListByInstance. + */ public final class RecoverableManagedDatabasesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListRecoverableManagedDatabasesByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ListRecoverableManagedDatabasesByServer.json */ /** * Sample code: List recoverable databases by managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listRecoverableDatabasesByManagedInstances( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listRecoverableDatabasesByManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getRecoverableManagedDatabases() - .listByInstance("Test1", "managedInstance", Context.NONE); + .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java index 10f11fd6d2a41..16d761a276eb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks Delete. */ +/** + * Samples for ReplicationLinks Delete. + */ public final class ReplicationLinksDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkDelete.json */ /** * Sample code: Delete replication link on server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteReplicationLinkOnServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .delete("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", Context.NONE); + .delete("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java index d8bbe9c9f511c..a316903304c21 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks FailoverAllowDataLoss. */ +/** + * Samples for ReplicationLinks FailoverAllowDataLoss. + */ public final class ReplicationLinksFailoverAllowDataLossSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkFailoverAllowDataLoss.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkFailoverAllowDataLoss. + * json */ /** * Sample code: Forced failover of a replication link. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void forcedFailoverOfAReplicationLink(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .failoverAllowDataLoss( - "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", Context.NONE); + .failoverAllowDataLoss("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java index 55e94cbaa6220..564aad178387b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks Failover. */ +/** + * Samples for ReplicationLinks Failover. + */ public final class ReplicationLinksFailoverSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkFailover.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkFailover.json */ /** * Sample code: Planned failover of a replication link. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void plannedFailoverOfAReplicationLink(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .failover("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", Context.NONE); + .failover("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java index d374ee2031a83..1eef262cb5809 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks Get. */ +/** + * Samples for ReplicationLinks Get. + */ public final class ReplicationLinksGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkGet.json */ /** * Sample code: Gets the replication link. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheReplicationLink(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .getWithResponse("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", Context.NONE); + .getWithResponse("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java index b92700654279a..cb6791d131f92 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks ListByDatabase. */ +/** + * Samples for ReplicationLinks ListByDatabase. + */ public final class ReplicationLinksListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkListByDatabase.json */ /** * Sample code: List replication links on server on database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listReplicationLinksOnServerOnDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .listByDatabase("Default", "sourcesvr", "tetha-db", Context.NONE); + .listByDatabase("Default", "sourcesvr", "tetha-db", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java index beb51d3b4c03e..5dc7674fb3df1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ReplicationLinks ListByServer. */ +/** + * Samples for ReplicationLinks ListByServer. + */ public final class ReplicationLinksListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkListByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ReplicationLinkListByServer.json */ /** * Sample code: List replication links on server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listReplicationLinksOnServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getReplicationLinks() - .listByServer("Default", "sourcesvr", Context.NONE); + .listByServer("Default", "sourcesvr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java index 2b0358b6b9a81..e7d51bcb96aa2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedDatabases Get. */ +/** + * Samples for RestorableDroppedDatabases Get. + */ public final class RestorableDroppedDatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRestorableDroppedDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRestorableDroppedDatabase.json */ /** * Sample code: Gets a restorable dropped database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsARestorableDroppedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorableDroppedDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java index 757c984aef9b6..20638e88f7bb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedDatabases ListByServer. */ +/** + * Samples for RestorableDroppedDatabases ListByServer. + */ public final class RestorableDroppedDatabasesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListRestorableDroppedDatabasesByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ListRestorableDroppedDatabasesByServer.json */ /** * Sample code: Gets a list of restorable dropped databases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAListOfRestorableDroppedDatabases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorableDroppedDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", Context.NONE); + .listByServer("Default-SQL-SouthEastAsia", "testsvr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java index 2fa5aa0652c85..90a67aab6dc99 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedManagedDatabases Get. */ +/** + * Samples for RestorableDroppedManagedDatabases Get. + */ public final class RestorableDroppedManagedDatabasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRestorableDroppedManagedDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetRestorableDroppedManagedDatabase. + * json */ /** * Sample code: Gets a restorable dropped managed database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsARestorableDroppedManagedDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorableDroppedManagedDatabases() - .getWithResponse("Test1", "managedInstance", "testdb,131403269876900000", Context.NONE); + .getWithResponse("Test1", "managedInstance", "testdb,131403269876900000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java index fcf4903de1f12..ffdcdb1d27579 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedManagedDatabases ListByInstance. */ +/** + * Samples for RestorableDroppedManagedDatabases ListByInstance. + */ public final class RestorableDroppedManagedDatabasesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * RestorableDroppedManagedDatabaseListByManagedInstance.json */ /** * Sample code: List restorable dropped databases by managed instances. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listRestorableDroppedDatabasesByManagedInstances( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listRestorableDroppedDatabasesByManagedInstances(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getRestorableDroppedManagedDatabases() - .listByInstance("Test1", "managedInstance", Context.NONE); + .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java index ed02c606495da..b81e5bd77d2b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.CreateDatabaseRestorePointDefinition; -/** Samples for RestorePoints Create. */ +/** + * Samples for RestorePoints Create. + */ public final class RestorePointsCreateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsPost.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsPost.json */ /** * Sample code: Creates datawarehouse database restore point. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsDatawarehouseDatabaseRestorePoint(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .create( - "Default-SQL-SouthEastAsia", - "testserver", - "testDatabase", + .create("Default-SQL-SouthEastAsia", "testserver", "testDatabase", new CreateDatabaseRestorePointDefinition().withRestorePointLabel("mylabel"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java index 3e392395e241a..4363b2f81300a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorePoints Delete. */ +/** + * Samples for RestorePoints Delete. + */ public final class RestorePointsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsDelete.json */ /** * Sample code: Deletes a restore point. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deletesARestorePoint(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .deleteWithResponse( - "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE); + .deleteWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java index 7af2ab54d4aab..059f2559df404 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java @@ -4,43 +4,43 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorePoints Get. */ +/** + * Samples for RestorePoints Get. + */ public final class RestorePointsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsGet.json */ /** * Sample code: Gets a database restore point. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsADatabaseRestorePoint(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataWarehouseRestorePointsGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataWarehouseRestorePointsGet.json */ /** * Sample code: Gets a datawarehouse database restore point. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsADatawarehouseDatabaseRestorePoint(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java index 8a168f83812e9..03cc4bd126c92 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java @@ -4,41 +4,43 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for RestorePoints ListByDatabase. */ +/** + * Samples for RestorePoints ListByDatabase. + */ public final class RestorePointsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DatabaseRestorePointsListByDatabase. + * json */ /** * Sample code: List database restore points. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatabaseRestorePoints(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .listByDatabase("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE); + .listByDatabase("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DataWarehouseRestorePointsListByDatabase.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * DataWarehouseRestorePointsListByDatabase.json */ /** * Sample code: List datawarehouse database restore points. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDatawarehouseDatabaseRestorePoints(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getRestorePoints() - .listByDatabase("Default-SQL-SouthEastAsia", "testserver", "testDatabase", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testserver", "testDatabase", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java index 9a88fd8d881bc..3fc02ac299a9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java @@ -4,40 +4,34 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; import com.azure.resourcemanager.sql.models.SensitivityLabelRank; -/** Samples for SensitivityLabels CreateOrUpdate. */ +/** + * Samples for SensitivityLabels CreateOrUpdate. + */ public final class SensitivityLabelsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelCreateMax.json */ /** * Sample code: Updates the sensitivity label of a given column with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesTheSensitivityLabelOfAGivenColumnWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .createOrUpdateWithResponse( - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - new SensitivityLabelInner() - .withLabelName("PII") + .createOrUpdateWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", + new SensitivityLabelInner().withLabelName("PII") .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") .withInformationType("PhoneNumber") .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") .withRank(SensitivityLabelRank.LOW), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java index eb4565e53c014..b30d8a1e60d6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels Delete. */ +/** + * Samples for SensitivityLabels Delete. + */ public final class SensitivityLabelsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelDelete.json */ /** * Sample code: Deletes the sensitivity label of a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deletesTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java index 4af7b949f924c..e51ff9ce1c919 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels DisableRecommendation. */ +/** + * Samples for SensitivityLabels DisableRecommendation. + */ public final class SensitivityLabelsDisableRecommendationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecommendedColumnSensitivityLabelDisable.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * RecommendedColumnSensitivityLabelDisable.json */ /** * Sample code: Disables sensitivity recommendations on a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void disablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + disablesSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .disableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .disableRecommendationWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java index 092abbab0b10c..dc6aefe18b499 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels EnableRecommendation. */ +/** + * Samples for SensitivityLabels EnableRecommendation. + */ public final class SensitivityLabelsEnableRecommendationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/RecommendedColumnSensitivityLabelEnable.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * RecommendedColumnSensitivityLabelEnable.json */ /** * Sample code: Enables sensitivity recommendations on a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void enablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + enablesSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .enableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); + .enableRecommendationWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java index 5a5e218972d64..f4c8b34bebe55 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java @@ -4,33 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; -/** Samples for SensitivityLabels Get. */ +/** + * Samples for SensitivityLabels Get. + */ public final class SensitivityLabelsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ColumnSensitivityLabelGet.json */ /** * Sample code: Gets the sensitivity label of a given column. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .getWithResponse( - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - SensitivityLabelSource.CURRENT, - Context.NONE); + .getWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", + SensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java index eacad9c035d0e..48cbcf992737d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels ListByDatabase. */ +/** + * Samples for SensitivityLabels ListByDatabase. + */ public final class SensitivityLabelsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsListByDatabase.json */ /** * Sample code: Gets the current and recommended sensitivity labels of a given database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .listByDatabase("myRG", "myServer", "myDatabase", null, Context.NONE); + .listByDatabase("myRG", "myServer", "myDatabase", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java index 7020b338322c4..06a469a8cc86e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels ListCurrentByDatabase. */ +/** + * Samples for SensitivityLabels ListCurrentByDatabase. + */ public final class SensitivityLabelsListCurrentByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * SensitivityLabelsListByDatabaseWithSourceCurrent.json */ /** * Sample code: Gets the current sensitivity labels of a given database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsTheCurrentSensitivityLabelsOfAGivenDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsTheCurrentSensitivityLabelsOfAGivenDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .listCurrentByDatabase("myRG", "myServer", "myDatabase", null, null, null, Context.NONE); + .listCurrentByDatabase("myRG", "myServer", "myDatabase", null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java index 242c405e045b2..bb3983f37e55d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SensitivityLabels ListRecommendedByDatabase. */ +/** + * Samples for SensitivityLabels ListRecommendedByDatabase. + */ public final class SensitivityLabelsListRecommendedByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * SensitivityLabelsListByDatabaseWithSourceRecommended.json */ /** * Sample code: Gets the recommended sensitivity labels of a given database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsTheRecommendedSensitivityLabelsOfAGivenDatabase( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsTheRecommendedSensitivityLabelsOfAGivenDatabase(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .listRecommendedByDatabase("myRG", "myServer", "myDatabase", null, null, null, Context.NONE); + .listRecommendedByDatabase("myRG", "myServer", "myDatabase", null, null, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java index 33b72090950a1..c746a4ea2d141 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner; import com.azure.resourcemanager.sql.models.SensitivityLabelRank; @@ -12,60 +11,49 @@ import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import java.util.Arrays; -/** Samples for SensitivityLabels Update. */ +/** + * Samples for SensitivityLabels Update. + */ public final class SensitivityLabelsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsCurrentUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SensitivityLabelsCurrentUpdate.json */ /** * Sample code: Update sensitivity labels of a given database using an operations batch. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSensitivityLabels() - .updateWithResponse( - "myRG", - "myServer", - "myDatabase", - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8") - .withRank(SensitivityLabelRank.LOW)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.CRITICAL)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - Context.NONE); + .updateWithResponse("myRG", "myServer", "myDatabase", + new SensitivityLabelUpdateList().withOperations(Arrays.asList( + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) + .withSchema("dbo") + .withTable("table1") + .withColumn("column1") + .withSensitivityLabel(new SensitivityLabelInner().withLabelName("Highly Confidential") + .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") + .withInformationType("Financial") + .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8") + .withRank(SensitivityLabelRank.LOW)), + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) + .withSchema("dbo") + .withTable("table2") + .withColumn("column2") + .withSensitivityLabel(new SensitivityLabelInner().withLabelName("PII") + .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") + .withInformationType("PhoneNumber") + .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") + .withRank(SensitivityLabelRank.CRITICAL)), + new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.REMOVE) + .withSchema("dbo") + .withTable("Table1") + .withColumn("Column3"))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java index 6bd79340827ff..c77e08128e48d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java @@ -4,56 +4,51 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerAdvancedThreatProtectionInner; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; -/** Samples for ServerAdvancedThreatProtectionSettings CreateOrUpdate. */ +/** + * Samples for ServerAdvancedThreatProtectionSettings CreateOrUpdate. + */ public final class ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerAdvancedThreatProtectionSettingsCreateMin.json */ /** * Sample code: Update a server's Advanced Threat Protection settings with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAServerSAdvancedThreatProtectionSettingsWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAdvancedThreatProtectionSettings() - .createOrUpdate( - "threatprotection-4799", - "threatprotection-6440", - AdvancedThreatProtectionName.DEFAULT, + .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, new ServerAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerAdvancedThreatProtectionSettingsCreateMax.json */ /** * Sample code: Update a server's Advanced Threat Protection settings with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAServerSAdvancedThreatProtectionSettingsWithAllParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAdvancedThreatProtectionSettings() - .createOrUpdate( - "threatprotection-4799", - "threatprotection-6440", - AdvancedThreatProtectionName.DEFAULT, + .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, new ServerAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java index 316406fe6d02b..b890b862b7859 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java @@ -4,27 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -/** Samples for ServerAdvancedThreatProtectionSettings Get. */ +/** + * Samples for ServerAdvancedThreatProtectionSettings Get. + */ public final class ServerAdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerAdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get a server's Advanced Threat Protection settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAServerSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAServerSAdvancedThreatProtectionSettings(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAdvancedThreatProtectionSettings() - .getWithResponse( - "threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, Context.NONE); + .getWithResponse("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java index 091ce913471f3..fa66da52f717e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAdvancedThreatProtectionSettings ListByServer. */ +/** + * Samples for ServerAdvancedThreatProtectionSettings ListByServer. + */ public final class ServerAdvancedThreatProtectionSettingsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvancedThreatProtectionSettingsListByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerAdvancedThreatProtectionSettingsListByServer.json */ /** * Sample code: List the server's Advanced Threat Protection settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listTheServerSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listTheServerSAdvancedThreatProtectionSettings(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAdvancedThreatProtectionSettings() - .listByServer("threatprotection-4799", "threatprotection-6440", Context.NONE); + .listByServer("threatprotection-4799", "threatprotection-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java index 74e3e4db99dec..04db2d9a399f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAdvisors Get. */ +/** + * Samples for ServerAdvisors Get. + */ public final class ServerAdvisorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorGet.json */ /** * Sample code: Get server advisor. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getServerAdvisor(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAdvisors() - .getWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", Context.NONE); + .getWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java index 2bb35b1923ecd..c354186a538e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java @@ -4,42 +4,44 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAdvisors ListByServer. */ +/** + * Samples for ServerAdvisors ListByServer. + */ public final class ServerAdvisorsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorList.json */ /** * Sample code: List of server advisors. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listOfServerAdvisors(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAdvisors() - .listByServerWithResponse("workloadinsight-demos", "misosisvr", null, Context.NONE); + .listByServerWithResponse("workloadinsight-demos", "misosisvr", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerRecommendedActionListExpand.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerRecommendedActionListExpand. + * json */ /** * Sample code: List of server recommended actions for all advisors. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listOfServerRecommendedActionsForAllAdvisors( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listOfServerRecommendedActionsForAllAdvisors(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAdvisors() - .listByServerWithResponse("workloadinsight-demos", "misosisvr", "recommendedActions", Context.NONE); + .listByServerWithResponse("workloadinsight-demos", "misosisvr", "recommendedActions", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java index 9a3848bc0a8be..6e8ded750000e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java @@ -4,31 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.AdvisorInner; import com.azure.resourcemanager.sql.models.AutoExecuteStatus; -/** Samples for ServerAdvisors Update. */ +/** + * Samples for ServerAdvisors Update. + */ public final class ServerAdvisorsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAdvisorUpdate.json */ /** * Sample code: Update server advisor. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateServerAdvisor(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAdvisors() - .updateWithResponse( - "workloadinsight-demos", - "misosisvr", - "CreateIndex", - new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), - Context.NONE); + .updateWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", + new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java index a92a9973aa52e..4a0b6b94a4213 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAutomaticTuning Get. */ +/** + * Samples for ServerAutomaticTuning Get. + */ public final class ServerAutomaticTuningGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningGet.json */ /** * Sample code: Get a server's automatic tuning settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSAutomaticTuningSettings(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAutomaticTunings() - .getWithResponse("default-sql-onebox", "testsvr11", Context.NONE); + .getWithResponse("default-sql-onebox", "testsvr11", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java index ed76b085e001b..842c70a06c0da 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerAutomaticTuningInner; import com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeDesired; import com.azure.resourcemanager.sql.models.AutomaticTuningServerMode; @@ -12,62 +11,57 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ServerAutomaticTuning Update. */ +/** + * Samples for ServerAutomaticTuning Update. + */ public final class ServerAutomaticTuningUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningUpdateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningUpdateMax.json */ /** * Sample code: Updates server automatic tuning settings with all properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updatesServerAutomaticTuningSettingsWithAllProperties( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updatesServerAutomaticTuningSettingsWithAllProperties(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAutomaticTunings() - .updateWithResponse( - "default-sql-onebox", - "testsvr11", - new ServerAutomaticTuningInner() - .withDesiredState(AutomaticTuningServerMode.AUTO) - .withOptions( - mapOf( - "createIndex", - new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), - "dropIndex", - new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), - "forceLastGoodPlan", - new AutomaticTuningServerOptions() - .withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), - Context.NONE); + .updateWithResponse("default-sql-onebox", "testsvr11", + new ServerAutomaticTuningInner().withDesiredState(AutomaticTuningServerMode.AUTO) + .withOptions(mapOf("createIndex", + new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), + "dropIndex", + new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), + "forceLastGoodPlan", + new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningUpdateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAutomaticTuningUpdateMin.json */ /** * Sample code: Updates server automatic tuning settings with minimal properties. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesServerAutomaticTuningSettingsWithMinimalProperties( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAutomaticTunings() - .updateWithResponse( - "default-sql-onebox", - "testsvr11", + .updateWithResponse("default-sql-onebox", "testsvr11", new ServerAutomaticTuningInner().withDesiredState(AutomaticTuningServerMode.AUTO), - Context.NONE); + com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java index 27744e795540d..35a781fc5b95e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java @@ -4,38 +4,35 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADAdministratorInner; import com.azure.resourcemanager.sql.models.AdministratorName; import com.azure.resourcemanager.sql.models.AdministratorType; import java.util.UUID; -/** Samples for ServerAzureADAdministrators CreateOrUpdate. */ +/** + * Samples for ServerAzureADAdministrators CreateOrUpdate. + */ public final class ServerAzureADAdministratorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorCreateOrUpdate.json */ /** * Sample code: Creates or updates an existing Azure Active Directory administrator. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesAnExistingAzureActiveDirectoryAdministrator( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAzureADAdministrators() - .createOrUpdate( - "sqlcrudtest-4799", - "sqlcrudtest-6440", - AdministratorName.ACTIVE_DIRECTORY, - new ServerAzureADAdministratorInner() - .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) + .createOrUpdate("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, + new ServerAzureADAdministratorInner().withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) .withLogin("bob@contoso.com") .withSid(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")) .withTenantId(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java index 867dbb28d310c..787902ea3e0f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdministratorName; -/** Samples for ServerAzureADAdministrators Delete. */ +/** + * Samples for ServerAzureADAdministrators Delete. + */ public final class ServerAzureADAdministratorsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorDelete.json */ /** * Sample code: Delete Azure Active Directory administrator. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAzureActiveDirectoryAdministrator(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAzureADAdministrators() - .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, Context.NONE); + .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java index a5bd677be06c3..ec902cd9c278f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AdministratorName; -/** Samples for ServerAzureADAdministrators Get. */ +/** + * Samples for ServerAzureADAdministrators Get. + */ public final class ServerAzureADAdministratorsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorGet.json */ /** * Sample code: Gets a Azure Active Directory administrator. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAAzureActiveDirectoryAdministrator(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAzureADAdministrators() - .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, Context.NONE); + .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java index b4fd388101f93..1fab8074591f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAzureADAdministrators ListByServer. */ +/** + * Samples for ServerAzureADAdministrators ListByServer. + */ public final class ServerAzureADAdministratorsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AdministratorList.json */ /** * Sample code: Gets a list of Azure Active Directory administrator. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAListOfAzureActiveDirectoryAdministrator( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAListOfAzureActiveDirectoryAdministrator(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAzureADAdministrators() - .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", Context.NONE); + .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java index cec9a56e63895..295bfbf9f378a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java @@ -4,32 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADOnlyAuthenticationInner; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ServerAzureADOnlyAuthentications CreateOrUpdate. */ +/** + * Samples for ServerAzureADOnlyAuthentications CreateOrUpdate. + */ public final class ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthCreateOrUpdate.json */ /** * Sample code: Creates or updates Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerAzureADOnlyAuthentications() - .createOrUpdate( - "sqlcrudtest-4799", - "sqlcrudtest-6440", - AuthenticationName.DEFAULT, + .createOrUpdate("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, new ServerAzureADOnlyAuthenticationInner().withAzureADOnlyAuthentication(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java index af33b1b97e73c..baba48902bd3f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java @@ -4,26 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ServerAzureADOnlyAuthentications Delete. */ +/** + * Samples for ServerAzureADOnlyAuthentications Delete. + */ public final class ServerAzureADOnlyAuthenticationsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthDelete.json */ /** * Sample code: Deletes Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void deletesAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + deletesAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAzureADOnlyAuthentications() - .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, Context.NONE); + .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java index 712d17c4175f4..4ca61fcfb157b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java @@ -4,26 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.AuthenticationName; -/** Samples for ServerAzureADOnlyAuthentications Get. */ +/** + * Samples for ServerAzureADOnlyAuthentications Get. + */ public final class ServerAzureADOnlyAuthenticationsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthGet.json */ /** * Sample code: Gets a Azure Active Directory only authentication property. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAAzureActiveDirectoryOnlyAuthenticationProperty(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAzureADOnlyAuthentications() - .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, Context.NONE); + .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java index ce367dc133762..514e985f24180 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerAzureADOnlyAuthentications ListByServer. */ +/** + * Samples for ServerAzureADOnlyAuthentications ListByServer. + */ public final class ServerAzureADOnlyAuthenticationsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/AzureADOnlyAuthList.json */ /** * Sample code: Gets a list of Azure Active Directory only authentication object. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAListOfAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerAzureADOnlyAuthentications() - .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", Context.NONE); + .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java index 929b2d7a930a3..1b9da276a2664 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java @@ -4,65 +4,56 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; import java.util.Arrays; import java.util.UUID; -/** Samples for ServerBlobAuditingPolicies CreateOrUpdate. */ +/** + * Samples for ServerBlobAuditingPolicies CreateOrUpdate. + */ public final class ServerBlobAuditingPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingCreateMin.json */ /** * Sample code: Update a server's blob auditing policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSBlobAuditingPolicyWithMinimalParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerBlobAuditingPolicies() - .createOrUpdate( - "blobauditingtest-4799", - "blobauditingtest-6440", - new ServerBlobAuditingPolicyInner() - .withState(BlobAuditingPolicyState.ENABLED) + .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", + new ServerBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingCreateMax.json */ /** * Sample code: Update a server's blob auditing policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSBlobAuditingPolicyWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerBlobAuditingPolicies() - .createOrUpdate( - "blobauditingtest-4799", - "blobauditingtest-6440", - new ServerBlobAuditingPolicyInner() - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) + .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", + new ServerBlobAuditingPolicyInner().withRetentionDays(6) + .withAuditActionsAndGroups(Arrays.asList("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP")) .withIsStorageSecondaryKeyInUse(false) .withIsAzureMonitorTargetEnabled(true) .withQueueDelayMs(4000) @@ -70,6 +61,6 @@ public static void updateAServerSBlobAuditingPolicyWithAllParameters( .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java index 3e62e254c2382..9a1480504ef5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerBlobAuditingPolicies Get. */ +/** + * Samples for ServerBlobAuditingPolicies Get. + */ public final class ServerBlobAuditingPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerBlobAuditingGet.json */ /** * Sample code: Get a server's blob auditing policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSBlobAuditingPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerBlobAuditingPolicies() - .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE); + .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java index 39422a92d5a1c..686847de034cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerBlobAuditingPolicies ListByServer. */ +/** + * Samples for ServerBlobAuditingPolicies ListByServer. + */ public final class ServerBlobAuditingPoliciesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAuditingSettingsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerAuditingSettingsList.json */ /** * Sample code: List auditing settings of a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listAuditingSettingsOfAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerBlobAuditingPolicies() - .listByServer("blobauditingtest-4799", "blobauditingtest-6440", Context.NONE); + .listByServer("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java index f321b7861c4f8..ee2aca6a0ac08 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java @@ -4,32 +4,30 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyInner; import com.azure.resourcemanager.sql.models.ConnectionPolicyName; import com.azure.resourcemanager.sql.models.ServerConnectionType; -/** Samples for ServerConnectionPolicies CreateOrUpdate. */ +/** + * Samples for ServerConnectionPolicies CreateOrUpdate. + */ public final class ServerConnectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesUpdate.json */ /** * Sample code: Updates a server connection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updatesAServerConnectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerConnectionPolicies() - .createOrUpdate( - "testrg", - "testserver", - ConnectionPolicyName.DEFAULT, + .createOrUpdate("testrg", "testserver", ConnectionPolicyName.DEFAULT, new ServerConnectionPolicyInner().withConnectionType(ServerConnectionType.REDIRECT), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java index d910fe881b65d..bb9faeaa73e61 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ConnectionPolicyName; -/** Samples for ServerConnectionPolicies Get. */ +/** + * Samples for ServerConnectionPolicies Get. + */ public final class ServerConnectionPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesGet.json */ /** * Sample code: Gets a server connection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAServerConnectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerConnectionPolicies() - .getWithResponse("rgtest-12", "servertest-6285", ConnectionPolicyName.DEFAULT, Context.NONE); + .getWithResponse("rgtest-12", "servertest-6285", ConnectionPolicyName.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java index 17742a9ce9891..66180e40d6fcd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerConnectionPolicies ListByServer. */ +/** + * Samples for ServerConnectionPolicies ListByServer. + */ public final class ServerConnectionPoliciesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerConnectionPoliciesList.json */ /** * Sample code: Lists a servers connection policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listsAServersConnectionPolicies(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerConnectionPolicies() - .listByServer("rgtest-12", "servertest-6285", Context.NONE); + .listByServer("rgtest-12", "servertest-6285", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java index 236d8ac885aec..37ad68a720bb5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java @@ -4,64 +4,57 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner; import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; import java.util.UUID; -/** Samples for ServerDevOpsAuditSettings CreateOrUpdate. */ +/** + * Samples for ServerDevOpsAuditSettings CreateOrUpdate. + */ public final class ServerDevOpsAuditSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditCreateMin.json */ /** * Sample code: Update a server's DevOps audit settings with minimal input. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSDevOpsAuditSettingsWithMinimalInput( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSDevOpsAuditSettingsWithMinimalInput(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerDevOpsAuditSettings() - .createOrUpdate( - "devAuditTestRG", - "devOpsAuditTestSvr", - "default", - new ServerDevOpsAuditingSettingsInner() - .withState(BlobAuditingPolicyState.ENABLED) + .createOrUpdate("devAuditTestRG", "devOpsAuditTestSvr", "default", + new ServerDevOpsAuditingSettingsInner().withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditCreateMax.json */ /** * Sample code: Update a server's DevOps audit settings with all params. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSDevOpsAuditSettingsWithAllParams( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSDevOpsAuditSettingsWithAllParams(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerDevOpsAuditSettings() - .createOrUpdate( - "devAuditTestRG", - "devOpsAuditTestSvr", - "default", - new ServerDevOpsAuditingSettingsInner() - .withIsAzureMonitorTargetEnabled(true) + .createOrUpdate("devAuditTestRG", "devOpsAuditTestSvr", "default", + new ServerDevOpsAuditingSettingsInner().withIsAzureMonitorTargetEnabled(true) .withState(BlobAuditingPolicyState.ENABLED) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java index e82e2159f8d66..334f951e1ef4e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDevOpsAuditSettings Get. */ +/** + * Samples for ServerDevOpsAuditSettings Get. + */ public final class ServerDevOpsAuditSettingsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditGet.json */ /** * Sample code: Get a server's DevOps audit settings. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSDevOpsAuditSettings(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDevOpsAuditSettings() - .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", "default", Context.NONE); + .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java index 9c542f580b225..d7068e331f93d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDevOpsAuditSettings ListByServer. */ +/** + * Samples for ServerDevOpsAuditSettings ListByServer. + */ public final class ServerDevOpsAuditSettingsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditSettingsList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDevOpsAuditSettingsList.json */ /** * Sample code: List DevOps audit settings of a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listDevOpsAuditSettingsOfAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDevOpsAuditSettings() - .listByServer("devAuditTestRG", "devOpsAuditTestSvr", Context.NONE); + .listByServer("devAuditTestRG", "devOpsAuditTestSvr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java index 090b6de0c9e26..c4996b20feef1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java @@ -4,32 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ServerDnsAliasAcquisition; -/** Samples for ServerDnsAliases Acquire. */ +/** + * Samples for ServerDnsAliases Acquire. + */ public final class ServerDnsAliasesAcquireSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasAcquire.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasAcquire.json */ /** * Sample code: Acquire server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void acquireServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDnsAliases() - .acquire( - "Default", - "dns-alias-new-server", - "dns-alias-name-1", - new ServerDnsAliasAcquisition() - .withOldServerDnsAliasId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"), - Context.NONE); + .acquire("Default", "dns-alias-new-server", "dns-alias-name-1", + new ServerDnsAliasAcquisition().withOldServerDnsAliasId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java index ddc930cfd92d7..c217be8599f2f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDnsAliases CreateOrUpdate. */ +/** + * Samples for ServerDnsAliases CreateOrUpdate. + */ public final class ServerDnsAliasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasCreateOrUpdate.json */ /** * Sample code: Create server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDnsAliases() - .createOrUpdate("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE); + .createOrUpdate("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java index 0c3bf4e31fa94..79a6c02dfc48e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDnsAliases Delete. */ +/** + * Samples for ServerDnsAliases Delete. + */ public final class ServerDnsAliasesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasDelete.json */ /** * Sample code: Delete server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDnsAliases() - .delete("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE); + .delete("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java index 90d6348f3f3f4..6935cab7369c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDnsAliases Get. */ +/** + * Samples for ServerDnsAliases Get. + */ public final class ServerDnsAliasesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasGet.json */ /** * Sample code: Get server DNS alias. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getServerDNSAlias(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDnsAliases() - .getWithResponse("Default", "dns-alias-server", "dns-alias-name-1", Context.NONE); + .getWithResponse("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java index d5e3fa66ce8aa..231ccef745768 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerDnsAliases ListByServer. */ +/** + * Samples for ServerDnsAliases ListByServer. + */ public final class ServerDnsAliasesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDnsAliasList.json */ /** * Sample code: List server DNS aliases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServerDNSAliases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerDnsAliases() - .listByServer("Default", "dns-alias-server", Context.NONE); + .listByServer("Default", "dns-alias-server", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java index 2993628fc3271..e14ebb2ac7f80 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerKeyInner; import com.azure.resourcemanager.sql.models.ServerKeyType; -/** Samples for ServerKeys CreateOrUpdate. */ +/** + * Samples for ServerKeys CreateOrUpdate. + */ public final class ServerKeysCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyCreateOrUpdate.json */ /** * Sample code: Creates or updates a server key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createsOrUpdatesAServerKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerKeys() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", - new ServerKeyInner() - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) + new ServerKeyInner().withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java index 02cf37728dcda..0087a1cc021f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java @@ -4,28 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerKeys Delete. */ +/** + * Samples for ServerKeys Delete. + */ public final class ServerKeysDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyDelete.json */ /** * Sample code: Delete the server key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteTheServerKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerKeys() - .delete( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - Context.NONE); + .delete("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java index b2684d112d5d5..5ba282c8a1667 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java @@ -4,28 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerKeys Get. */ +/** + * Samples for ServerKeys Get. + */ public final class ServerKeysGetSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyGet.json */ /** * Sample code: Get the server key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getTheServerKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerKeys() - .getWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", + "someVault_someKey_01234567890123456789012345678901", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java index 824c6f3ee9bab..50433ff9d6284 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerKeys ListByServer. */ +/** + * Samples for ServerKeys ListByServer. + */ public final class ServerKeysListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerKeyList.json */ /** * Sample code: List the server keys by server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheServerKeysByServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerKeys() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java index 29c105814b760..1d61caeabd260 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerOperations ListByServer. */ +/** + * Samples for ServerOperations ListByServer. + */ public final class ServerOperationsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListServerOperations.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListServerOperations.json */ /** * Sample code: List the server management operations. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheServerManagementOperations(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerOperations() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java index 934e1061b07e3..c61c10167a93b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java @@ -4,64 +4,58 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; import java.util.Arrays; -/** Samples for ServerSecurityAlertPolicies CreateOrUpdate. */ +/** + * Samples for ServerSecurityAlertPolicies CreateOrUpdate. + */ public final class ServerSecurityAlertPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsCreateMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsCreateMin.json */ /** * Sample code: Update a server's threat detection policy with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSThreatDetectionPolicyWithMinimalParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerSecurityAlertPolicies() - .createOrUpdate( - "securityalert-4799", - "securityalert-6440", - SecurityAlertPolicyNameAutoGenerated.DEFAULT, + .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, new ServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsCreateMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsCreateMax.json */ /** * Sample code: Update a server's threat detection policy with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void updateAServerSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + updateAServerSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerSecurityAlertPolicies() - .createOrUpdate( - "securityalert-4799", - "securityalert-6440", - SecurityAlertPolicyNameAutoGenerated.DEFAULT, - new ServerSecurityAlertPolicyInner() - .withState(SecurityAlertPolicyState.ENABLED) + .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, + new ServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) .withEmailAccountAdmins(true) .withStorageEndpoint("https://mystorage.blob.core.windows.net") .withStorageAccountAccessKey("fakeTokenPlaceholder") .withRetentionDays(5), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java index 54fd0b62381b5..36752b6a07355 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; -/** Samples for ServerSecurityAlertPolicies Get. */ +/** + * Samples for ServerSecurityAlertPolicies Get. + */ public final class ServerSecurityAlertPoliciesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsGet.json */ /** * Sample code: Get a server's threat detection policy. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSThreatDetectionPolicy(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE); + .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyNameAutoGenerated.DEFAULT, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java index aa9b9d6be2a35..8e40d8d641a4c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerSecurityAlertPolicies ListByServer. */ +/** + * Samples for ServerSecurityAlertPolicies ListByServer. + */ public final class ServerSecurityAlertPoliciesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsListByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerSecurityAlertsListByServer.json */ /** * Sample code: List the server's threat detection policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listTheServerSThreatDetectionPolicies(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerSecurityAlertPolicies() - .listByServer("securityalert-4799", "securityalert-6440", Context.NONE); + .listByServer("securityalert-4799", "securityalert-6440", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java index 8504aefcb8172..d12b29cdbb846 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java @@ -4,30 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateInner; -/** Samples for ServerTrustCertificates CreateOrUpdate. */ +/** + * Samples for ServerTrustCertificates CreateOrUpdate. + */ public final class ServerTrustCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesCreate.json */ /** * Sample code: Create server trust certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createServerTrustCertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustCertificates() - .createOrUpdate( - "testrg", - "testcl", - "customerCertificateName", + .createOrUpdate("testrg", "testcl", "customerCertificateName", new ServerTrustCertificateInner().withPublicBlob("308203AE30820296A0030201020210"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java index 5c640ee6c44ee..56c4fa937261c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustCertificates Delete. */ +/** + * Samples for ServerTrustCertificates Delete. + */ public final class ServerTrustCertificatesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesDelete.json */ /** * Sample code: Delete server trust certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteServerTrustCertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustCertificates() - .delete("testrg", "testcl", "customerCertificateName", Context.NONE); + .delete("testrg", "testcl", "customerCertificateName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java index f35465305a929..eeda296769a24 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustCertificates Get. */ +/** + * Samples for ServerTrustCertificates Get. + */ public final class ServerTrustCertificatesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesGet.json */ /** * Sample code: Gets server trust certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsServerTrustCertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustCertificates() - .getWithResponse("testrg", "testcl", "customerCertificateName", Context.NONE); + .getWithResponse("testrg", "testcl", "customerCertificateName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java index 27370f86c233b..ab479bf3fe1e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustCertificates ListByInstance. */ +/** + * Samples for ServerTrustCertificates ListByInstance. + */ public final class ServerTrustCertificatesListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesListByInstance.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustCertificatesListByInstance + * .json */ /** * Sample code: Gets a list of server trust certificates on a given server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getsAListOfServerTrustCertificatesOnAGivenServer( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getsAListOfServerTrustCertificatesOnAGivenServer(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerTrustCertificates() - .listByInstance("testrg", "testcl", Context.NONE); + .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java index 86085f21d68e7..d24d45bc1f617 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java @@ -4,47 +4,36 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupInner; import com.azure.resourcemanager.sql.models.ServerInfo; import com.azure.resourcemanager.sql.models.ServerTrustGroupPropertiesTrustScopesItem; import java.util.Arrays; -/** Samples for ServerTrustGroups CreateOrUpdate. */ +/** + * Samples for ServerTrustGroups CreateOrUpdate. + */ public final class ServerTrustGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupCreate.json */ /** * Sample code: Create server trust group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createServerTrustGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustGroups() - .createOrUpdate( - "Default", - "Japan East", - "server-trust-group-test", - new ServerTrustGroupInner() - .withGroupMembers( - Arrays - .asList( - new ServerInfo() - .withServerId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), - new ServerInfo() - .withServerId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"))) - .withTrustScopes( - Arrays - .asList( - ServerTrustGroupPropertiesTrustScopesItem.GLOBAL_TRANSACTIONS, - ServerTrustGroupPropertiesTrustScopesItem.SERVICE_BROKER)), - Context.NONE); + .createOrUpdate("Default", "Japan East", "server-trust-group-test", + new ServerTrustGroupInner().withGroupMembers(Arrays.asList(new ServerInfo().withServerId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), + new ServerInfo().withServerId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"))) + .withTrustScopes(Arrays.asList(ServerTrustGroupPropertiesTrustScopesItem.GLOBAL_TRANSACTIONS, + ServerTrustGroupPropertiesTrustScopesItem.SERVICE_BROKER)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java index a828765e550ff..0e862b434aa16 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustGroups Delete. */ +/** + * Samples for ServerTrustGroups Delete. + */ public final class ServerTrustGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupDelete.json */ /** * Sample code: Drop server trust group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void dropServerTrustGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustGroups() - .delete("Default", "Japan East", "server-trust-group-test", Context.NONE); + .delete("Default", "Japan East", "server-trust-group-test", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java index b7da7991dc18c..6ff070013c79b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustGroups Get. */ +/** + * Samples for ServerTrustGroups Get. + */ public final class ServerTrustGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupGet.json */ /** * Sample code: Get server trust group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getServerTrustGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustGroups() - .getWithResponse("Default", "Japan East", "server-trust-group-test", Context.NONE); + .getWithResponse("Default", "Japan East", "server-trust-group-test", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java index 336f2e673c7f1..bd9ebc66a0911 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustGroups ListByInstance. */ +/** + * Samples for ServerTrustGroups ListByInstance. + */ public final class ServerTrustGroupsListByInstanceSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupListByManagedInstance.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupListByManagedInstance + * .json */ /** * Sample code: List server trust groups by managed instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServerTrustGroupsByManagedInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustGroups() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance-1", Context.NONE); + .listByInstance("Default-SQL-SouthEastAsia", "managedInstance-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java index 630538b8b5b63..8db1df0457b6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerTrustGroups ListByLocation. */ +/** + * Samples for ServerTrustGroups ListByLocation. + */ public final class ServerTrustGroupsListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerTrustGroupList.json */ /** * Sample code: List server trust groups. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServerTrustGroups(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerTrustGroups() - .listByLocation("Default", "Japan East", Context.NONE); + .listByLocation("Default", "Japan East", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java index a0d9f2b5b24f7..53e8bf3260884 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerUsages ListByServer. */ +/** + * Samples for ServerUsages ListByServer. + */ public final class ServerUsagesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerUsageList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerUsageList.json */ /** * Sample code: List servers usages. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServersUsages(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerUsages() - .listByServer("sqlcrudtest-6730", "sqlcrudtest-9007", Context.NONE); + .listByServer("sqlcrudtest-6730", "sqlcrudtest-9007", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java index 486dda991b034..3938f884f2b76 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java @@ -4,94 +4,87 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; -/** Samples for ServerVulnerabilityAssessments CreateOrUpdate. */ +/** + * Samples for ServerVulnerabilityAssessments CreateOrUpdate. + */ public final class ServerVulnerabilityAssessmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentCreateMax.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerVulnerabilityAssessmentCreateMax.json */ /** * Sample code: Create a server's vulnerability assessment with all parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createAServerSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createAServerSVulnerabilityAssessmentWithAllParameters(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ServerVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder") .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - Context.NONE); + .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) + .withEmailSubscriptionAdmins(true) + .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json */ /** * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is * specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ServerVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageAccountAccessKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json */ /** * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is * specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", + .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", VulnerabilityAssessmentName.DEFAULT, new ServerVulnerabilityAssessmentInner() .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") .withStorageContainerSasKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java index 03e2da1401a73..8af3500572fde 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java @@ -4,29 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ServerVulnerabilityAssessments Delete. */ +/** + * Samples for ServerVulnerabilityAssessments Delete. + */ public final class ServerVulnerabilityAssessmentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentDelete. + * json */ /** * Sample code: Remove a server's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void removeAServerSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java index 283f10166ff55..2ec3531e1237b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java @@ -4,29 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -/** Samples for ServerVulnerabilityAssessments Get. */ +/** + * Samples for ServerVulnerabilityAssessments Get. + */ public final class ServerVulnerabilityAssessmentsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentGet.json */ /** * Sample code: Get a server's vulnerability assessment. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAServerSVulnerabilityAssessment(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); + .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java index 1850fc01c55da..cb7686e9a21ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for ServerVulnerabilityAssessments ListByServer. */ +/** + * Samples for ServerVulnerabilityAssessments ListByServer. + */ public final class ServerVulnerabilityAssessmentsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerVulnerabilityAssessmentListByServer.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerVulnerabilityAssessmentListByServer.json */ /** * Sample code: Get a server's vulnerability assessment policies. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAServerSVulnerabilityAssessmentPolicies( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAServerSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServerVulnerabilityAssessments() - .listByServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", Context.NONE); + .listByServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java index 7c5e13c06d936..f3684a37e02e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java @@ -4,59 +4,65 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.CheckNameAvailabilityRequest; -/** Samples for Servers CheckNameAvailability. */ +/** + * Samples for Servers CheckNameAvailability. + */ public final class ServersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CheckNameAvailabilityServerAvailable.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CheckNameAvailabilityServerAvailable. + * json */ /** * Sample code: Check for a server name that is available. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void checkForAServerNameThatIsAvailable(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), Context.NONE); + .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CheckNameAvailabilityServerAlreadyExists.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * CheckNameAvailabilityServerAlreadyExists.json */ /** * Sample code: Check for a server name that already exists. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void checkForAServerNameThatAlreadyExists(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), Context.NONE); + .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CheckNameAvailabilityServerInvalid.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CheckNameAvailabilityServerInvalid. + * json */ /** * Sample code: Check for a server name that is invalid. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void checkForAServerNameThatIsInvalid(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("SERVER1"), Context.NONE); + .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("SERVER1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java index 6b4ac86a90455..ef8d0ca42c98d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java @@ -4,45 +4,40 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerInner; import com.azure.resourcemanager.sql.models.PrincipalType; import com.azure.resourcemanager.sql.models.ServerExternalAdministrator; import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; import java.util.UUID; -/** Samples for Servers CreateOrUpdate. */ +/** + * Samples for Servers CreateOrUpdate. + */ public final class ServersCreateOrUpdateSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerCreate.json */ /** * Sample code: Create server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .createOrUpdate( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - new ServerInner() - .withLocation("Japan East") + .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", + new ServerInner().withLocation("Japan East") .withAdministratorLogin("dummylogin") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withPublicNetworkAccess(ServerNetworkAccessFlag.ENABLED) - .withAdministrators( - new ServerExternalAdministrator() - .withPrincipalType(PrincipalType.USER) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withAzureADOnlyAuthentication(true)) + .withAdministrators(new ServerExternalAdministrator().withPrincipalType(PrincipalType.USER) + .withLogin("bob@contoso.com") + .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) + .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) + .withAzureADOnlyAuthentication(true)) .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java index ce3f6630497c8..6284c5a9b922c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Servers Delete. */ +/** + * Samples for Servers Delete. + */ public final class ServersDeleteSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerDelete.json */ /** * Sample code: Delete server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .delete("sqlcrudtest-7398", "sqlcrudtest-6661", Context.NONE); + .delete("sqlcrudtest-7398", "sqlcrudtest-6661", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java index 073722606b026..ee4f14a1c93bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Servers GetByResourceGroup. */ +/** + * Samples for Servers GetByResourceGroup. + */ public final class ServersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerGetWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerGetWithExpandEqualsAdministrators.json */ /** * Sample code: Get server with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getServerWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getServerWithExpandAdministratorsActivedirectory(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getServers() - .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE); + .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, + com.azure.core.util.Context.NONE); } /* @@ -31,15 +32,15 @@ public static void getServerWithExpandAdministratorsActivedirectory( */ /** * Sample code: Get server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, Context.NONE); + .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java index f6f98bfabf9c6..7acc0f66cf932 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java @@ -4,73 +4,67 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ImportNewDatabaseDefinition; import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; import com.azure.resourcemanager.sql.models.StorageKeyType; -/** Samples for Servers ImportDatabase. */ +/** + * Samples for Servers ImportDatabase. + */ public final class ServersImportDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportNewDatabaseWithNetworkIsolation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportNewDatabaseWithNetworkIsolation + * .json */ /** * Sample code: Imports to a new database, using private link for the SQL server and storage account. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void importsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .importDatabase( - "Default-SQL-SouthEastAsia", - "testsvr", - new ImportNewDatabaseDefinition() - .withDatabaseName("testdb") - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation( - new NetworkIsolationSettings() - .withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - Context.NONE); + .importDatabase("Default-SQL-SouthEastAsia", "testsvr", new ImportNewDatabaseDefinition() + .withDatabaseName("testdb") + .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) + .withStorageKey("fakeTokenPlaceholder") + .withStorageUri("https://test.blob.core.windows.net/test.bacpac") + .withAdministratorLogin("login") + .withAdministratorLoginPassword("fakeTokenPlaceholder") + .withAuthenticationType("Sql") + .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") + .withSqlServerResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportNewDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ImportNewDatabase.json */ /** * Sample code: Imports to a new database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void importsToANewDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .importDatabase( - "Default-SQL-SouthEastAsia", - "testsvr", - new ImportNewDatabaseDefinition() - .withDatabaseName("testdb") + .importDatabase("Default-SQL-SouthEastAsia", "testsvr", + new ImportNewDatabaseDefinition().withDatabaseName("testdb") .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) .withStorageKey("fakeTokenPlaceholder") .withStorageUri("https://test.blob.core.windows.net/test.bacpac") .withAdministratorLogin("login") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withAuthenticationType("Sql"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java index 0d80f150a58d9..ac4e9a800c06c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java @@ -4,42 +4,42 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Servers ListByResourceGroup. */ +/** + * Samples for Servers ListByResourceGroup. + */ public final class ServersListByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerListByResourceGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerListByResourceGroup.json */ /** * Sample code: List servers by resource group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServersByResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .listByResourceGroup("sqlcrudtest-7398", null, Context.NONE); + .listByResourceGroup("sqlcrudtest-7398", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerListByResourceGroupWithExpandEqualsAdministrators.json */ /** * Sample code: List servers by resource group with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServersByResourceGroupWithExpandAdministratorsActivedirectory( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .listByResourceGroup("sqlcrudtest-7398", null, Context.NONE); + .listByResourceGroup("sqlcrudtest-7398", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java index 5d720ea28adb6..af812073905ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java @@ -4,32 +4,33 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Servers List. */ +/** + * Samples for Servers List. + */ public final class ServersListSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerList.json */ /** * Sample code: List servers. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listServers(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getServers().list(null, Context.NONE); + azure.sqlServers().manager().serviceClient().getServers().list(null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerListWithExpandEqualsAdministrators.json + * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ + * ServerListWithExpandEqualsAdministrators.json */ /** * Sample code: List servers with $expand=administrators/activedirectory. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listServersWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getServers().list(null, Context.NONE); + public static void + listServersWithExpandAdministratorsActivedirectory(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers().manager().serviceClient().getServers().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java index d828bb0b699ff..4c1c4cbaef2bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java @@ -4,34 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; import com.azure.resourcemanager.sql.models.ServerUpdate; -/** Samples for Servers Update. */ +/** + * Samples for Servers Update. + */ public final class ServersUpdateSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ServerUpdate.json */ /** * Sample code: Update a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getServers() - .update( - "sqlcrudtest-7398", - "sqlcrudtest-4645", - new ServerUpdate() - .withAdministratorLogin("dummylogin") + .update("sqlcrudtest-7398", "sqlcrudtest-4645", + new ServerUpdate().withAdministratorLogin("dummylogin") .withAdministratorLoginPassword("fakeTokenPlaceholder") .withPublicNetworkAccess(ServerNetworkAccessFlag.DISABLED) .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java index 60b922c01460f..1b604f6cb83fc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java @@ -4,30 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationInner; import com.azure.resourcemanager.sql.models.SqlAgentConfigurationPropertiesState; -/** Samples for SqlAgent CreateOrUpdate. */ +/** + * Samples for SqlAgent CreateOrUpdate. + */ public final class SqlAgentCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlAgentConfigurationPut.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlAgentConfigurationPut.json */ /** * Sample code: Puts new sql agent configuration to instance. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void putsNewSqlAgentConfigurationToInstance(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSqlAgents() - .createOrUpdateWithResponse( - "sqlcrudtest-7398", - "sqlcrudtest-4645", + .createOrUpdateWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", new SqlAgentConfigurationInner().withState(SqlAgentConfigurationPropertiesState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java index 844cdb8fe7f25..f9a70197766c1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SqlAgent Get. */ +/** + * Samples for SqlAgent Get. + */ public final class SqlAgentGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlAgentConfigurationGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlAgentConfigurationGet.json */ /** * Sample code: Gets current instance sql agent configuration. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsCurrentInstanceSqlAgentConfiguration(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSqlAgents() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java index 730aec414c3a8..ab1ecc36a307f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SubscriptionUsages Get. */ +/** + * Samples for SubscriptionUsages Get. + */ public final class SubscriptionUsagesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SubscriptionUsageGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SubscriptionUsageGet.json */ /** * Sample code: Get specific subscription usage in the given location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getSpecificSubscriptionUsageInTheGivenLocation( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getSpecificSubscriptionUsageInTheGivenLocation(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getSubscriptionUsages() - .getWithResponse("WestUS", "ServerQuota", Context.NONE); + .getWithResponse("WestUS", "ServerQuota", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java index 1c87a0702c056..b7e0e450b81b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SubscriptionUsages ListByLocation. */ +/** + * Samples for SubscriptionUsages ListByLocation. + */ public final class SubscriptionUsagesListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SubscriptionUsageListByLocation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SubscriptionUsageListByLocation.json */ /** * Sample code: List subscription usages in the given location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listSubscriptionUsagesInTheGivenLocation(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getSubscriptionUsages().listByLocation("WestUS", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getSubscriptionUsages() + .listByLocation("WestUS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java index 5bebbdf323d5c..47ddb378637d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java @@ -4,56 +4,49 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SyncAgentInner; -/** Samples for SyncAgents CreateOrUpdate. */ +/** + * Samples for SyncAgents CreateOrUpdate. + */ public final class SyncAgentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentCreate.json */ /** * Sample code: Create a new sync agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createANewSyncAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .createOrUpdate( - "syncagentcrud-65440", - "syncagentcrud-8475", - "syncagentcrud-3187", - new SyncAgentInner() - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), - Context.NONE); + .createOrUpdate("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + new SyncAgentInner().withSyncDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentUpdate.json */ /** * Sample code: Update a sync agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateASyncAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .createOrUpdate( - "syncagentcrud-65440", - "syncagentcrud-8475", - "syncagentcrud-3187", - new SyncAgentInner() - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), - Context.NONE); + .createOrUpdate("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + new SyncAgentInner().withSyncDatabaseId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java index 43c5e9539c265..7304d968d34b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncAgents Delete. */ +/** + * Samples for SyncAgents Delete. + */ public final class SyncAgentsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentDelete.json */ /** * Sample code: Delete a sync agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteASyncAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .delete("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE); + .delete("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java index 47c61a8531ce8..a93ed5aeb0433 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncAgents GenerateKey. */ +/** + * Samples for SyncAgents GenerateKey. + */ public final class SyncAgentsGenerateKeySamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentGenerateKey.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentGenerateKey.json */ /** * Sample code: Generate a sync agent key. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void generateASyncAgentKey(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .generateKeyWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE); + .generateKeyWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java index 1a1116830d1fe..974ab1ec03cdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncAgents Get. */ +/** + * Samples for SyncAgents Get. + */ public final class SyncAgentsGetSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentGet.json */ /** * Sample code: Get a sync agent. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getASyncAgent(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .getWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE); + .getWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java index 5fffe1e11fd91..f8bb277b98745 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncAgents ListByServer. */ +/** + * Samples for SyncAgents ListByServer. + */ public final class SyncAgentsListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentListByServer.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentListByServer.json */ /** * Sample code: Get sync agents under a server. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getSyncAgentsUnderAServer(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .listByServer("syncagentcrud-65440", "syncagentcrud-8475", Context.NONE); + .listByServer("syncagentcrud-65440", "syncagentcrud-8475", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java index 3ea6bb1775eda..dcceef55ae025 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncAgents ListLinkedDatabases. */ +/** + * Samples for SyncAgents ListLinkedDatabases. + */ public final class SyncAgentsListLinkedDatabasesSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentGetLinkedDatabases.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncAgentGetLinkedDatabases.json */ /** * Sample code: Get sync agent linked databases. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getSyncAgentLinkedDatabases(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncAgents() - .listLinkedDatabases("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", Context.NONE); + .listLinkedDatabases("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java index 0c34148b53d51..7bae958b483f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups CancelSync. */ +/** + * Samples for SyncGroups CancelSync. + */ public final class SyncGroupsCancelSyncSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupCancelSync.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupCancelSync.json */ /** * Sample code: Cancel a sync group synchronization. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void cancelASyncGroupSynchronization(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .cancelSyncWithResponse( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .cancelSyncWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", + "syncgroupcrud-3187", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java index 8c571e2e9e88b..7a1c8b39b85bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java @@ -4,67 +4,58 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; -/** Samples for SyncGroups CreateOrUpdate. */ +/** + * Samples for SyncGroups CreateOrUpdate. + */ public final class SyncGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupUpdate.json */ /** * Sample code: Update a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .createOrUpdate( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - new SyncGroupInner() - .withInterval(-1) + .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + new SyncGroupInner().withInterval(-1) .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) .withSyncDatabaseId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withHubDatabaseUsername("hubUser") .withUsePrivateLinkConnection(true), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupCreate.json */ /** * Sample code: Create a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .createOrUpdate( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - new SyncGroupInner() - .withInterval(-1) + .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + new SyncGroupInner().withInterval(-1) .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) .withSyncDatabaseId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withHubDatabaseUsername("hubUser") .withUsePrivateLinkConnection(true), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java index 85335f00ff49e..ece2db37638e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups Delete. */ +/** + * Samples for SyncGroups Delete. + */ public final class SyncGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupDelete.json */ /** * Sample code: Delete a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .delete( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .delete("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java index e54e94056c2db..8a22e270aee8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java @@ -4,25 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups Get. */ +/** + * Samples for SyncGroups Get. + */ public final class SyncGroupsGetSamples { /* * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGet.json */ /** * Sample code: Get a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .getWithResponse( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java index 056c1b006d670..7421c8806f1d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups ListByDatabase. */ +/** + * Samples for SyncGroups ListByDatabase. + */ public final class SyncGroupsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupListByDatabase.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupListByDatabase.json */ /** * Sample code: List sync groups under a given database. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listSyncGroupsUnderAGivenDatabase(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .listByDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", Context.NONE); + .listByDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java index 89ed30ae68d98..533106fe8e86e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups ListHubSchemas. */ +/** + * Samples for SyncGroups ListHubSchemas. + */ public final class SyncGroupsListHubSchemasSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetHubSchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetHubSchema.json */ /** * Sample code: Get a hub database schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getAHubDatabaseSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .listHubSchemas( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .listHubSchemas("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java index 60facb0e0ca46..26700521d25a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java @@ -4,34 +4,28 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.SyncGroupsType; -/** Samples for SyncGroups ListLogs. */ +/** + * Samples for SyncGroups ListLogs. + */ public final class SyncGroupsListLogsSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetLog.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetLog.json */ /** * Sample code: Get sync group logs. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getSyncGroupLogs(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .listLogs( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - "2017-01-01T00:00:00", - "2017-12-31T00:00:00", - SyncGroupsType.ALL, - null, - Context.NONE); + .listLogs("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + "2017-01-01T00:00:00", "2017-12-31T00:00:00", SyncGroupsType.ALL, null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java index 20e73ed97eb05..224ca5534929b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java @@ -4,19 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups ListSyncDatabaseIds. */ +/** + * Samples for SyncGroups ListSyncDatabaseIds. + */ public final class SyncGroupsListSyncDatabaseIdsSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetSyncDatabaseId.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupGetSyncDatabaseId.json */ /** * Sample code: Get a sync database ID. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getASyncDatabaseID(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getSyncGroups().listSyncDatabaseIds("westus", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getSyncGroups() + .listSyncDatabaseIds("westus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java index d09518e509847..389a26584fd0b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups RefreshHubSchema. */ +/** + * Samples for SyncGroups RefreshHubSchema. + */ public final class SyncGroupsRefreshHubSchemaSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupRefreshHubSchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupRefreshHubSchema.json */ /** * Sample code: Refresh a hub database schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void refreshAHubDatabaseSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .refreshHubSchema( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .refreshHubSchema("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java index 8f4954a67d49f..6a787ed103466 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncGroups TriggerSync. */ +/** + * Samples for SyncGroups TriggerSync. + */ public final class SyncGroupsTriggerSyncSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupTriggerSync.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupTriggerSync.json */ /** * Sample code: Trigger a sync group synchronization. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void triggerASyncGroupSynchronization(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .triggerSyncWithResponse( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .triggerSyncWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", + "syncgroupcrud-3187", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java index 4f65951a866c4..52403c29c3498 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java @@ -4,39 +4,35 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; -/** Samples for SyncGroups Update. */ +/** + * Samples for SyncGroups Update. + */ public final class SyncGroupsUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupPatch.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncGroupPatch.json */ /** * Sample code: Update a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncGroups() - .update( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - new SyncGroupInner() - .withInterval(-1) + .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + new SyncGroupInner().withInterval(-1) .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) .withSyncDatabaseId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withHubDatabaseUsername("hubUser") .withHubDatabasePassword("fakeTokenPlaceholder") .withUsePrivateLinkConnection(true), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java index f2f0e3f307279..cefd14bbdc19e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java @@ -4,35 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; import com.azure.resourcemanager.sql.models.SyncDirection; import com.azure.resourcemanager.sql.models.SyncMemberDbType; -/** Samples for SyncMembers CreateOrUpdate. */ +/** + * Samples for SyncMembers CreateOrUpdate. + */ public final class SyncMembersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberCreate.json */ /** * Sample code: Create a new sync member. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createANewSyncMember(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .createOrUpdate( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", + .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", - new SyncMemberInner() - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) + new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) .withSyncMemberAzureDatabaseResourceId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withUsePrivateLinkConnection(true) @@ -40,31 +36,26 @@ public static void createANewSyncMember(com.azure.resourcemanager.AzureResourceM .withDatabaseName("syncgroupcrud-7421") .withUsername("myUser") .withSyncDirection(SyncDirection.BIDIRECTIONAL), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberUpdate.json */ /** * Sample code: Update a sync member. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateASyncMember(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .createOrUpdate( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", + .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", - new SyncMemberInner() - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) + new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) .withSyncMemberAzureDatabaseResourceId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withUsePrivateLinkConnection(true) @@ -72,6 +63,6 @@ public static void updateASyncMember(com.azure.resourcemanager.AzureResourceMana .withDatabaseName("syncgroupcrud-7421") .withUsername("myUser") .withSyncDirection(SyncDirection.BIDIRECTIONAL), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java index 6432120e8c21a..6ca5cc6dfe34c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncMembers Delete. */ +/** + * Samples for SyncMembers Delete. + */ public final class SyncMembersDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberDelete.json */ /** * Sample code: Delete a sync member. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteASyncMember(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .delete( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - "syncgroupcrud-4879", - Context.NONE); + .delete("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + "syncgroupcrud-4879", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java index ea868161263ad..f99655d99bfc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncMembers Get. */ +/** + * Samples for SyncMembers Get. + */ public final class SyncMembersGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberGet.json */ /** * Sample code: Get a sync member. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getASyncMember(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .getWithResponse( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - "syncmembercrud-4879", - Context.NONE); + .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + "syncmembercrud-4879", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java index eee3af6fc374b..1b950bd49a410 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncMembers ListBySyncGroup. */ +/** + * Samples for SyncMembers ListBySyncGroup. + */ public final class SyncMembersListBySyncGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberListBySyncGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberListBySyncGroup.json */ /** * Sample code: List sync members under a sync group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listSyncMembersUnderASyncGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .listBySyncGroup( - "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", Context.NONE); + .listBySyncGroup("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java index e63131f54e8ee..da0908c2c3cf6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncMembers ListMemberSchemas. */ +/** + * Samples for SyncMembers ListMemberSchemas. + */ public final class SyncMembersListMemberSchemasSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberGetSchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberGetSchema.json */ /** * Sample code: Get a sync member schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getASyncMemberSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .listMemberSchemas( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - "syncgroupcrud-4879", - Context.NONE); + .listMemberSchemas("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", + "syncgroupcrud-4879", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java index bbff5ab135d81..1efc6e392d52d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for SyncMembers RefreshMemberSchema. */ +/** + * Samples for SyncMembers RefreshMemberSchema. + */ public final class SyncMembersRefreshMemberSchemaSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberRefreshSchema.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberRefreshSchema.json */ /** * Sample code: Refresh a sync member database schema. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void refreshASyncMemberDatabaseSchema(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .refreshMemberSchema( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", - "syncgroupcrud-4879", - Context.NONE); + .refreshMemberSchema("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", + "syncgroupcrud-3187", "syncgroupcrud-4879", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java index baa359dde0561..b552627c91110 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java @@ -4,35 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; import com.azure.resourcemanager.sql.models.SyncDirection; import com.azure.resourcemanager.sql.models.SyncMemberDbType; -/** Samples for SyncMembers Update. */ +/** + * Samples for SyncMembers Update. + */ public final class SyncMembersUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberPatch.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SyncMemberPatch.json */ /** * Sample code: Update an existing sync member. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateAnExistingSyncMember(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getSyncMembers() - .update( - "syncgroupcrud-65440", - "syncgroupcrud-8475", - "syncgroupcrud-4328", - "syncgroupcrud-3187", + .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", - new SyncMemberInner() - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) + new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) .withSyncMemberAzureDatabaseResourceId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") .withUsePrivateLinkConnection(true) @@ -40,6 +36,6 @@ public static void updateAnExistingSyncMember(com.azure.resourcemanager.AzureRes .withDatabaseName("syncgroupcrud-7421") .withUsername("myUser") .withSyncDirection(SyncDirection.BIDIRECTIONAL), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java index c700d2ed1e2b2..c06990a490373 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java @@ -4,25 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.TdeCertificate; -/** Samples for TdeCertificates Create. */ +/** + * Samples for TdeCertificates Create. + */ public final class TdeCertificatesCreateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlTdeCertificateCreate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/SqlTdeCertificateCreate.json */ /** * Sample code: Upload a TDE certificate. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void uploadATDECertificate(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getTdeCertificates() - .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), Context.NONE); + .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java index cb3e2c78033e9..77bfade89f126 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for TimeZones Get. */ +/** + * Samples for TimeZones Get. + */ public final class TimeZonesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTimeZoneGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTimeZoneGet.json */ /** * Sample code: Get managed instance time zone. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getManagedInstanceTimeZone(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getTimeZones() - .getWithResponse("canadaeast", "Haiti Standard Time", Context.NONE); + .getWithResponse("canadaeast", "Haiti Standard Time", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java index 1258158179b51..4d7b6723b1d8c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java @@ -4,19 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for TimeZones ListByLocation. */ +/** + * Samples for TimeZones ListByLocation. + */ public final class TimeZonesListByLocationSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTimeZoneListByLocation.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ManagedInstanceTimeZoneListByLocation + * .json */ /** * Sample code: List managed instance time zones by location. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedInstanceTimeZonesByLocation(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getTimeZones().listByLocation("canadaeast", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getTimeZones() + .listByLocation("canadaeast", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java index 676860a87df10..5a3ee06957c89 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java @@ -4,34 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.LogicalDatabaseTransparentDataEncryptionInner; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; -/** Samples for TransparentDataEncryptions CreateOrUpdate. */ +/** + * Samples for TransparentDataEncryptions CreateOrUpdate. + */ public final class TransparentDataEncryptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionUpdate.json */ /** * Sample code: Update a database's Transparent Data Encryption state with minimal parameters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getTransparentDataEncryptions() - .createOrUpdate( - "securitytde-42-rg", - "securitytde-42", - "testdb", - TransparentDataEncryptionName.CURRENT, + .createOrUpdate("securitytde-42-rg", "securitytde-42", "testdb", TransparentDataEncryptionName.CURRENT, new LogicalDatabaseTransparentDataEncryptionInner().withState(TransparentDataEncryptionState.ENABLED), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java index cd52717063630..4002dfc83107d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java @@ -4,30 +4,27 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; -/** Samples for TransparentDataEncryptions Get. */ +/** + * Samples for TransparentDataEncryptions Get. + */ public final class TransparentDataEncryptionsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionGet.json */ /** * Sample code: Get a database's transparent data encryption. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getADatabaseSTransparentDataEncryption(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getTransparentDataEncryptions() - .getWithResponse( - "security-tde-resourcegroup", - "securitytde", - "testdb", - TransparentDataEncryptionName.CURRENT, - Context.NONE); + .getWithResponse("security-tde-resourcegroup", "securitytde", "testdb", + TransparentDataEncryptionName.CURRENT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java index cfe8703335d12..1f928d2e6788f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for TransparentDataEncryptions ListByDatabase. */ +/** + * Samples for TransparentDataEncryptions ListByDatabase. + */ public final class TransparentDataEncryptionsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/TransparentDataEncryptionList.json */ /** * Sample code: Get a list of the database's transparent data encryption. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getAListOfTheDatabaseSTransparentDataEncryption( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getAListOfTheDatabaseSTransparentDataEncryption(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getTransparentDataEncryptions() - .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", Context.NONE); + .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java index 40f2396be3ee5..a3a8425249dd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java @@ -4,42 +4,42 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for Usages ListByInstancePool. */ +/** + * Samples for Usages ListByInstancePool. + */ public final class UsagesListByInstancePoolSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolUsage.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolUsage.json */ /** * Sample code: List instance pool usages. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listInstancePoolUsages(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getUsages() - .listByInstancePool("group1", "testIP", null, Context.NONE); + .listByInstancePool("group1", "testIP", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolUsageExpanded.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/ListInstancePoolUsageExpanded.json */ /** * Sample code: List instance pool usages expanded with children. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void listInstancePoolUsagesExpandedWithChildren( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + listInstancePoolUsagesExpandedWithChildren(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getUsages() - .listByInstancePool("group1", "testIP", true, Context.NONE); + .listByInstancePool("group1", "testIP", true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java index 7be807d9afa81..0263ce1212724 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualClusters Delete. */ +/** + * Samples for VirtualClusters Delete. + */ public final class VirtualClustersDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterDelete.json */ /** * Sample code: Delete virtual cluster. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteVirtualCluster(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualClusters() - .delete("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", Context.NONE); + .delete("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java index b6b97021c3677..aa0f1265d786f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualClusters GetByResourceGroup. */ +/** + * Samples for VirtualClusters GetByResourceGroup. + */ public final class VirtualClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterGet.json */ /** * Sample code: Get virtual cluster. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getVirtualCluster(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualClusters() - .getByResourceGroupWithResponse("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", Context.NONE); + .getByResourceGroupWithResponse("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java index 27032b1445053..d44c4e8e7c9f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java @@ -4,19 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualClusters ListByResourceGroup. */ +/** + * Samples for VirtualClusters ListByResourceGroup. + */ public final class VirtualClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterListByResourceGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterListByResourceGroup. + * json */ /** * Sample code: List virtual clusters by resource group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listVirtualClustersByResourceGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getVirtualClusters().listByResourceGroup("testrg", Context.NONE); + azure.sqlServers() + .manager() + .serviceClient() + .getVirtualClusters() + .listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java index 0f1fb09cf6a6f..84cb1b5f766d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualClusters List. */ +/** + * Samples for VirtualClusters List. + */ public final class VirtualClustersListSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterList.json */ /** * Sample code: List virtualClusters. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listVirtualClusters(com.azure.resourcemanager.AzureResourceManager azure) { - azure.sqlServers().manager().serviceClient().getVirtualClusters().list(Context.NONE); + azure.sqlServers().manager().serviceClient().getVirtualClusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java index 561f9fc148ee8..e4a7b8b1b95f1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualClusters UpdateDnsServers. */ +/** + * Samples for VirtualClusters UpdateDnsServers. + */ public final class VirtualClustersUpdateDnsServersSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedInstanceDnsServers.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/UpdateManagedInstanceDnsServers.json */ /** * Sample code: Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void synchronizesTheDNSServerSettingsUsedByTheManagedInstancesInsideTheGivenVirtualCluster( com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualClusters() - .updateDnsServersWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", Context.NONE); + .updateDnsServersWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java index da1da411d999e..e354a1462b0b8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java @@ -4,31 +4,29 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.models.VirtualClusterUpdate; -/** Samples for VirtualClusters Update. */ +/** + * Samples for VirtualClusters Update. + */ public final class VirtualClustersUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualClusterUpdate.json */ /** * Sample code: Update virtual cluster with tags. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void updateVirtualClusterWithTags(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualClusters() - .update( - "testrg", - "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", - new VirtualClusterUpdate() - .withMaintenanceConfigurationId( - "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), - Context.NONE); + .update("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", + new VirtualClusterUpdate().withMaintenanceConfigurationId( + "/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java index b41c3e5659069..982e0e0877563 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java @@ -4,33 +4,31 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleInner; -/** Samples for VirtualNetworkRules CreateOrUpdate. */ +/** + * Samples for VirtualNetworkRules CreateOrUpdate. + */ public final class VirtualNetworkRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesCreateOrUpdate.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesCreateOrUpdate. + * json */ /** * Sample code: Create or update a virtual network rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void createOrUpdateAVirtualNetworkRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualNetworkRules() - .createOrUpdate( - "Default", - "vnet-test-svr", - "vnet-firewall-rule", - new VirtualNetworkRuleInner() - .withVirtualNetworkSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet") + .createOrUpdate("Default", "vnet-test-svr", "vnet-firewall-rule", + new VirtualNetworkRuleInner().withVirtualNetworkSubnetId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet") .withIgnoreMissingVnetServiceEndpoint(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java index 8f17959c40763..98ee6cfcbdd8c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualNetworkRules Delete. */ +/** + * Samples for VirtualNetworkRules Delete. + */ public final class VirtualNetworkRulesDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesDelete.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesDelete.json */ /** * Sample code: Delete a virtual network rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAVirtualNetworkRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualNetworkRules() - .delete("Default", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + .delete("Default", "vnet-test-svr", "vnet-firewall-rule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java index ba2242fd78271..ace3652423be0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualNetworkRules Get. */ +/** + * Samples for VirtualNetworkRules Get. + */ public final class VirtualNetworkRulesGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesGet.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesGet.json */ /** * Sample code: Gets a virtual network rule. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAVirtualNetworkRule(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualNetworkRules() - .getWithResponse("Default", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + .getWithResponse("Default", "vnet-test-svr", "vnet-firewall-rule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java index 612e5e3ebe037..786c29c2805b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for VirtualNetworkRules ListByServer. */ +/** + * Samples for VirtualNetworkRules ListByServer. + */ public final class VirtualNetworkRulesListByServerSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/VirtualNetworkRulesList.json */ /** * Sample code: List virtual network rules. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void listVirtualNetworkRules(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getVirtualNetworkRules() - .listByServer("Default", "vnet-test-svr", Context.NONE); + .listByServer("Default", "vnet-test-svr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java index 3bb7bfa35c6a2..5408b6d2e9d74 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java @@ -4,64 +4,57 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierInner; -/** Samples for WorkloadClassifiers CreateOrUpdate. */ +/** + * Samples for WorkloadClassifiers CreateOrUpdate. + */ public final class WorkloadClassifiersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadClassifierMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadClassifierMin. + * json */ /** * Sample code: Create a workload group with the required properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createAWorkloadGroupWithTheRequiredPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadClassifiers() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - "wlm_workloadgroup", - "wlm_workloadclassifier", - new WorkloadClassifierInner().withMemberName("dbo"), - Context.NONE); + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", + "wlm_workloadclassifier", new WorkloadClassifierInner().withMemberName("dbo"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadClassifierMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadClassifierMax. + * json */ /** * Sample code: Create a workload group with all properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createAWorkloadGroupWithAllPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createAWorkloadGroupWithAllPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadClassifiers() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - "wlm_workloadgroup", + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", - new WorkloadClassifierInner() - .withMemberName("dbo") + new WorkloadClassifierInner().withMemberName("dbo") .withLabel("test_label") .withContext("test_context") .withStartTime("12:00") .withEndTime("14:00") .withImportance("high"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java index 3055c8ccc481d..e8f14f881583b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java @@ -4,30 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadClassifiers Delete. */ +/** + * Samples for WorkloadClassifiers Delete. + */ public final class WorkloadClassifiersDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteWorkloadClassifier.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteWorkloadClassifier.json */ /** * Sample code: Delete a workload classifier. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAWorkloadClassifier(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getWorkloadClassifiers() - .delete( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - "wlm_workloadgroup", - "wlm_workloadclassifier", - Context.NONE); + .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java index 28f4a8871a187..c197c371d9d49 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadClassifiers Get. */ +/** + * Samples for WorkloadClassifiers Get. + */ public final class WorkloadClassifiersGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadClassifier.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadClassifier.json */ /** * Sample code: Gets a workload classifier for a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAWorkloadClassifierForADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getWorkloadClassifiers() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_classifier", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_classifier", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java index 741f720b60e0b..ca7af664d2fd3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java @@ -4,25 +4,26 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadClassifiers ListByWorkloadGroup. */ +/** + * Samples for WorkloadClassifiers ListByWorkloadGroup. + */ public final class WorkloadClassifiersListByWorkloadGroupSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadClassifierList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadClassifierList.json */ /** * Sample code: Get the list of workload classifiers for a workload group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheListOfWorkloadClassifiersForAWorkloadGroup( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheListOfWorkloadClassifiersForAWorkloadGroup(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadClassifiers() - .listByWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", Context.NONE); + .listByWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java index d148c31e76467..3f146572bd4b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java @@ -4,65 +4,56 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.WorkloadGroupInner; -/** Samples for WorkloadGroups CreateOrUpdate. */ +/** + * Samples for WorkloadGroups CreateOrUpdate. + */ public final class WorkloadGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadGroupMin.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadGroupMin.json */ /** * Sample code: Create a workload group with the required properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createAWorkloadGroupWithTheRequiredPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadGroups() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - "smallrc", - new WorkloadGroupInner() - .withMinResourcePercent(0) + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", + new WorkloadGroupInner().withMinResourcePercent(0) .withMaxResourcePercent(100) .withMinResourcePercentPerRequest(3.0), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadGroupMax.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/CreateOrUpdateWorkloadGroupMax.json */ /** * Sample code: Create a workload group with all properties specified. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void createAWorkloadGroupWithAllPropertiesSpecified( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + createAWorkloadGroupWithAllPropertiesSpecified(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadGroups() - .createOrUpdate( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - "smallrc", - new WorkloadGroupInner() - .withMinResourcePercent(0) + .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", + new WorkloadGroupInner().withMinResourcePercent(0) .withMaxResourcePercent(100) .withMinResourcePercentPerRequest(3.0) .withMaxResourcePercentPerRequest(3.0D) .withImportance("normal") .withQueryExecutionTimeout(0), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java index 9ae2429d6e7fe..6c2401b9e7e6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadGroups Delete. */ +/** + * Samples for WorkloadGroups Delete. + */ public final class WorkloadGroupsDeleteSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteWorkloadGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/DeleteWorkloadGroup.json */ /** * Sample code: Delete a workload group. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void deleteAWorkloadGroup(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getWorkloadGroups() - .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", Context.NONE); + .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java index a7412d92cd76e..8add2912e42d4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java @@ -4,24 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadGroups Get. */ +/** + * Samples for WorkloadGroups Get. + */ public final class WorkloadGroupsGetSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadGroup.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadGroup.json */ /** * Sample code: Gets a workload group for a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ public static void getsAWorkloadGroupForADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + azure.sqlServers() .manager() .serviceClient() .getWorkloadGroups() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", Context.NONE); + .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java index 382177a33baaf..3b0eb219e7e49 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.sql.generated; -import com.azure.core.util.Context; - -/** Samples for WorkloadGroups ListByDatabase. */ +/** + * Samples for WorkloadGroups ListByDatabase. + */ public final class WorkloadGroupsListByDatabaseSamples { /* - * x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadGroupList.json + * x-ms-original-file: + * specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/GetWorkloadGroupList.json */ /** * Sample code: Get the list of workload groups for a data warehouse. - * + * * @param azure The entry point for accessing resource management APIs in Azure. */ - public static void getTheListOfWorkloadGroupsForADataWarehouse( - com.azure.resourcemanager.AzureResourceManager azure) { - azure - .sqlServers() + public static void + getTheListOfWorkloadGroupsForADataWarehouse(com.azure.resourcemanager.AzureResourceManager azure) { + azure.sqlServers() .manager() .serviceClient() .getWorkloadGroups() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", Context.NONE); + .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); } }